diff --git a/.github/workflows/test-measure.yml b/.github/workflows/test-measure.yml index b316e12..608d430 100644 --- a/.github/workflows/test-measure.yml +++ b/.github/workflows/test-measure.yml @@ -36,5 +36,7 @@ jobs: php-versions: '["8.2", "8.3", "8.4"]' wp-versions: '["6.7", "6.8", "6.9", "7.0", "7.1"]' test-php-exclude: '[]' + lint-js-files-command: npm run lint:js:files + lint-css-files-command: npm run lint:css:files # No tokens: every rtCamp dependency is public and the shared workflow falls # back to GITHUB_TOKEN. A PAT here breaks all dist downloads once it expires. diff --git a/.lintstagedrc.js b/.lintstagedrc.js index aa18565..0eb99c9 100644 --- a/.lintstagedrc.js +++ b/.lintstagedrc.js @@ -1,6 +1,6 @@ module.exports = { '**/*.php': [ 'npm run lint:php' ], - '**/*.js': [ 'npm run lint:js' ], - '**/*.{css,scss}': [ 'npm run lint:css' ], + '**/*.js': [ 'npm run lint:js:files' ], + '**/*.{css,scss}': [ 'npm run lint:css:files' ], 'package.json': [ 'npm run lint:package-json' ], }; diff --git a/package.json b/package.json index dc232d3..e801c87 100644 --- a/package.json +++ b/package.json @@ -85,9 +85,11 @@ "release:zip": "wp-tooling release:zip", "prepare": "wp-tooling install-hooks || true && npm run sync-ai", "lint": "npm-run-all --parallel lint:css lint:js lint:php lint:package-json", - "lint:css": "wp-scripts lint-style ./src", + "lint:css": "npm run lint:css:files -- ./src", + "lint:css:files": "wp-scripts lint-style --allow-empty-input=true", "lint:css:fix": "npm run lint:css -- --fix ./src", - "lint:js": "wp-scripts lint-js ./src", + "lint:js": "npm run lint:js:files -- ./src", + "lint:js:files": "wp-scripts lint-js", "lint:js:fix": "npm run lint:js -- --fix ./src", "lint:js:report": "npm run lint:js -- --output-file lint-js-report.json --format json .", "lint:php": "vendor/bin/phpcs", diff --git a/webpack.config.js b/webpack.config.js index 5c65fd7..0522091 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -88,7 +88,7 @@ const getBrowserSyncPlugins = () => { key: process.env.WP_SSL_KEY, cert: process.env.WP_SSL_CERT, }, - } + } : {} ), files: BROWSER_SYNC_FILES, notify: false,