t095: fix package.json lint coverage and quality gate (#103)

* fix: address PR #85 package.json review feedback (issue #95)

* fix: add trailing commas to cypress.config.js for comma-dangle rule

ESLint comma-dangle rule (always-multiline) requires trailing commas on
the last property and closing brace of multiline objects. Adding lint:js
coverage of cypress.config.js in package.json exposed these two missing
trailing commas at lines 15 and 16.

* fix: resolve ESLint errors blocking CI on PR #103

- Remove 'cypress/globals' env key from .eslintrc.js; this key requires
  eslint-plugin-cypress to be globally installed, which CI tools (Codacy,
  CodeFactor) do not have. Cypress globals are already declared explicitly
  in the globals block, making the env key redundant.
- Remove trailing commas from cypress.config.js to comply with the
  comma-dangle: never ESLint rule defined in .eslintrc.js.
- Update package-lock.json to include stylelint and stylelint-config-standard
  which were in devDependencies but missing from the lock file.
This commit is contained in:
2026-03-18 21:33:54 +00:00
committed by GitHub
parent 81e5b14604
commit 7c272b5399
3 changed files with 1152 additions and 10 deletions

View File

@@ -2,8 +2,7 @@ module.exports = {
env: {
browser: true,
es2021: true,
node: true,
'cypress/globals': true
node: true
},
extends: [
'eslint:recommended'

1157
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -28,7 +28,7 @@
"test:phpunit": "composer test",
"test:phpunit:multisite": "WP_MULTISITE=1 composer test",
"build": "./build.sh",
"lint:js": "eslint cypress/",
"lint:js": "eslint cypress/ cypress.config.js",
"lint:css": "stylelint \"**/*.css\" --allow-empty-input",
"lint:php": "composer run-script phpcs",
"lint:php:simple": "composer run-script phpcs:simple",