From 9f2db85502c20dc475bc8e0596288a901c6e2337 Mon Sep 17 00:00:00 2001 From: Jonathan Sharpe Date: Thu, 16 Jan 2025 13:42:25 +0000 Subject: [PATCH] Upgrade CYF and Prettier ESLint configs --- eslint.config.js | 4 +-- package-lock.json | 73 ++++++++++++++++++++++++++++++++++++++++------- package.json | 4 +-- 3 files changed, 67 insertions(+), 14 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index c4dc435d..88dde197 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -12,9 +12,9 @@ import reactRefreshPlugin from "eslint-plugin-react-refresh"; import testingLibraryPlugin from "eslint-plugin-testing-library"; import globals from "globals"; -/** @type {import("eslint").Linter.FlatConfig} */ +/** @type {import("eslint").Linter.Config[]} */ export default [ - cyfConfig, + ...cyfConfig.configs.standard, prettierConfig, { plugins: { diff --git a/package-lock.json b/package-lock.json index e6544d55..820f22bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "e2e" ], "devDependencies": { - "@codeyourfuture/eslint-config-standard": "^5.1.0", + "@codeyourfuture/eslint-config-standard": "^6.0.1", "@types/eslint": "^9.6.1", "@types/node": "^20.17.12", "@vitest/coverage-v8": "^2.1.8", @@ -22,7 +22,7 @@ "concurrently": "^9.1.2", "cross-env": "^7.0.3", "eslint": "^9.18.0", - "eslint-config-prettier": "^9.1.0", + "eslint-config-prettier": "^10.0.1", "eslint-plugin-import": "^2.31.0", "eslint-plugin-n": "^17.15.1", "globals": "^15.14.0", @@ -476,16 +476,23 @@ } }, "node_modules/@codeyourfuture/eslint-config-standard": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@codeyourfuture/eslint-config-standard/-/eslint-config-standard-5.1.0.tgz", - "integrity": "sha512-61ags0UxQFPHVtjTLaKY6mymIc7khlOBNwjOD4kpYADSWLA1OHFj/eZszhrzF3yKF4gAds4XXhRzZzw54gX/WQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@codeyourfuture/eslint-config-standard/-/eslint-config-standard-6.0.1.tgz", + "integrity": "sha512-l8fIuuODn6QSh1CKX55DUG1Lyse2ya8jyWp/fWHfc/84eEz22p5+72u50n3VVYpOtkXdfeawvqQViMcAauyEZg==", "dev": true, "license": "ISC", + "dependencies": { + "@eslint/js": "^9.18.0", + "@stylistic/eslint-plugin": "^2.13.0" + }, + "engines": { + "node": "^18.18 || ^20.9 || >=22" + }, "funding": { "url": "https://github.com/sponsors/CodeYourFuture" }, "peerDependencies": { - "eslint": "^8.27 || ^9" + "eslint": "^8.45 || ^9" } }, "node_modules/@colors/colors": { @@ -2080,6 +2087,52 @@ "dev": true, "license": "MIT" }, + "node_modules/@stylistic/eslint-plugin": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-2.13.0.tgz", + "integrity": "sha512-RnO1SaiCFHn666wNz2QfZEFxvmiNRqhzaMXHXxXXKt+MEP7aajlPxUSMIQpKAaJfverpovEYqjBOXDq6dDcaOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/utils": "^8.13.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "estraverse": "^5.3.0", + "picomatch": "^4.0.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/@swc/core": { "version": "1.10.7", "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.10.7.tgz", @@ -5167,13 +5220,13 @@ } }, "node_modules/eslint-config-prettier": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", - "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.0.1.tgz", + "integrity": "sha512-lZBts941cyJyeaooiKxAtzoPHTN+GbQTJFAIdQbRhA4/8whaAraEh47Whw/ZFfrjNSnlAxqfm9i0XVAEkULjCw==", "dev": true, "license": "MIT", "bin": { - "eslint-config-prettier": "bin/cli.js" + "eslint-config-prettier": "build/bin/cli.js" }, "peerDependencies": { "eslint": ">=7.0.0" diff --git a/package.json b/package.json index e0ae3c96..673ed577 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "useTabs": true }, "devDependencies": { - "@codeyourfuture/eslint-config-standard": "^5.1.0", + "@codeyourfuture/eslint-config-standard": "^6.0.1", "@types/eslint": "^9.6.1", "@types/node": "^20.17.12", "@vitest/coverage-v8": "^2.1.8", @@ -51,7 +51,7 @@ "concurrently": "^9.1.2", "cross-env": "^7.0.3", "eslint": "^9.18.0", - "eslint-config-prettier": "^9.1.0", + "eslint-config-prettier": "^10.0.1", "eslint-plugin-import": "^2.31.0", "eslint-plugin-n": "^17.15.1", "globals": "^15.14.0",