Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ bun.lock
# Configuration files.
.editorconfig
.babelrc
.eslintrc.js
.gitattributes
.gitignore
.nvmrc
Expand Down
30 changes: 30 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* ESLint configuration.
*
* Mirrors the default @wordpress/scripts config and adds the TypeScript import
* resolver, so `import/no-unresolved` understands the `@fp/*` path alias that
* tsconfig.json, webpack.config.js and Jest already map to src/resources/packages.
*/
module.exports = {
root: true,
extends: [ 'plugin:@wordpress/eslint-plugin/recommended' ],
// Vendored third-party builds (qs, Select2 3.5); not ours to lint.
ignorePatterns: [ 'src/resources/js/qs.js', 'src/resources/js/select2.js' ],
settings: {
'import/resolver': {
typescript: {
project: './tsconfig.json',
},
node: {
extensions: [ '.js', '.jsx', '.ts', '.tsx' ],
},
},
},
overrides: [
{
// Unit test files and their helpers only.
files: [ '**/@(test|__tests__)/**/*.js', '**/?(*.)test.js' ],
extends: [ 'plugin:@wordpress/eslint-plugin/test-unit' ],
},
],
};
112 changes: 107 additions & 5 deletions bun.lock

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,25 @@
"main": "Gruntfile.js",
"devDependencies": {
"@stellarwp/tyson": "^0.0.7",
"@tailwindcss/postcss": "^4.0.0",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
"@wordpress/api-fetch": "^7.57.0",
"@wordpress/i18n": "^6.30.0",
"@wordpress/scripts": "^30.16.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"eslint-import-resolver-typescript": "^3.10.1",
"lucide-react": "^0.576.0",
"postcss-import": "^16.1.0",
"postcss-mixins": "^11.0.3",
"postcss-nested": "^7.0.2",
"postcss-preset-env": "^10.1.5",
"tailwind-merge": "^3.5.0",
"tailwindcss": "^4.0.0",
"@tailwindcss/postcss": "^4.0.0"
"tailwindcss": "^4.0.0"
},
"dependencies": {
"@hookform/resolvers": "^5.2.2",
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ For help with or questions about FakerPress, visit the [WordPress Plugin Forums]
* Fix - The Users generator accepts a boolean `use_html` from the REST API (the `on` value still works). [[#187](https://github.com/bordoni/fakerpress/pull/187)]
* Tests - Add Jest coverage for the admin, REST payload tests for every generate endpoint, and build the JS before WPUnit in CI. [[#187](https://github.com/bordoni/fakerpress/pull/187)]
* Tweak - Format the JavaScript and TypeScript sources with Prettier; no behaviour change. [[#235](https://github.com/bordoni/fakerpress/pull/235)]
* Tweak - Clear every JavaScript lint and TypeScript error: WordPress package types, the `@fp` import alias in ESLint, the zod v4 meta-rule schema, `…` in translated strings, and `let`/`const` in the legacy jQuery scripts. [[#236](https://github.com/bordoni/fakerpress/pull/236)]

= 0.9.2 — 20 of July 2026 =

Expand Down
21 changes: 7 additions & 14 deletions src/resources/js/field.dependency.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
( function ( $, _ ) {
( function ( $ ) {
'use strict';
$.fn.conditional = function ( _opt ) {
var $elements = this,
defaults = {
conditional: function () {
return false;
},
},
opt = $.extend( defaults, _opt );

$elements.each( function ( index, element ) {
var $element = $( element ),
$condition = $element.data( 'condition' );
// Stub: conditional field logic was never implemented. It only reads
// each element's `data-condition` and does nothing with it yet.
$.fn.conditional = function () {
this.each( function ( index, element ) {
$( element ).data( 'condition' );
} );
};

$( document ).ready( function () {
$( '.fp-conditional' ).conditional();
} );
} )( window.jQuery, window._ );
} )( window.jQuery );
Loading
Loading