From b1ddf93285d8d23e639a7464a22f8cb4311268c4 Mon Sep 17 00:00:00 2001 From: Jon Ursenbach Date: Sun, 1 Jun 2025 13:26:34 -0700 Subject: [PATCH 1/7] feat: dropping support for node 18 --- package-lock.json | 8 ++++---- packages/eslint-config/package.json | 2 +- packages/eslint-plugin/package.json | 2 +- packages/spectral-config/package.json | 2 +- packages/stylelint-config/package.json | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4b08f3fb..40dbdcce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20459,7 +20459,7 @@ "typescript": "^5.8.3" }, "engines": { - "node": ">=18" + "node": ">=20" }, "peerDependencies": { "eslint": "^8.0.0", @@ -20478,7 +20478,7 @@ "vitest": "^3.1.2" }, "engines": { - "node": ">=18" + "node": ">=20" }, "peerDependencies": { "eslint": "^8.0.0" @@ -20500,7 +20500,7 @@ "vitest": "^3.0.5" }, "engines": { - "node": ">=18" + "node": ">=20" }, "peerDependencies": { "@stoplight/spectral-cli": "^6.6.0" @@ -20524,7 +20524,7 @@ "vitest": "^3.0.5" }, "engines": { - "node": ">=18" + "node": ">=20" }, "peerDependencies": { "postcss": "^8.4.12" diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 250578a6..6dc11b97 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -14,7 +14,7 @@ }, "homepage": "https://github.com/readmeio/standards#readme", "engines": { - "node": ">=18" + "node": ">=20" }, "scripts": { "lint": "eslint .", diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index dd9e53e6..c869fda9 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -15,7 +15,7 @@ }, "homepage": "https://github.com/readmeio/standards#readme", "engines": { - "node": ">=18" + "node": ">=20" }, "publishConfig": { "access": "public" diff --git a/packages/spectral-config/package.json b/packages/spectral-config/package.json index 58105645..1f81d91e 100644 --- a/packages/spectral-config/package.json +++ b/packages/spectral-config/package.json @@ -5,7 +5,7 @@ "main": "dist/index.js", "type": "module", "engines": { - "node": ">=18" + "node": ">=20" }, "scripts": { "build": "tsup", diff --git a/packages/stylelint-config/package.json b/packages/stylelint-config/package.json index e295f8d2..691f463e 100644 --- a/packages/stylelint-config/package.json +++ b/packages/stylelint-config/package.json @@ -8,7 +8,7 @@ "test": "vitest run" }, "engines": { - "node": ">=18" + "node": ">=20" }, "repository": { "type": "git", From 628cad0082bd05eaf099a453500bc00dbf987a36 Mon Sep 17 00:00:00 2001 From: Jon Ursenbach Date: Sun, 1 Jun 2025 13:29:34 -0700 Subject: [PATCH 2/7] chore: removing `eslint-plugin-jest-formatting` --- package-lock.json | 11 ----------- packages/eslint-config/package.json | 1 - packages/eslint-config/testing/jest.js | 12 +++++++++++- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 40dbdcce..fd95d4e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8155,16 +8155,6 @@ } } }, - "node_modules/eslint-plugin-jest-formatting": { - "version": "3.1.0", - "integrity": "sha512-XyysraZ1JSgGbLSDxjj5HzKKh0glgWf+7CkqxbTqb7zEhW7X2WHo5SBQ8cGhnszKN+2Lj3/oevBlHNbHezoc/A==", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": ">=0.8.0" - } - }, "node_modules/eslint-plugin-jsx-a11y": { "version": "6.10.2", "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz", @@ -20439,7 +20429,6 @@ "eslint-plugin-import": "^2.28.1", "eslint-plugin-jest": "^28.3.0", "eslint-plugin-jest-dom": "^5.2.0", - "eslint-plugin-jest-formatting": "^3.0.0", "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-perfectionist": "^4.9.0", diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 6dc11b97..37aae559 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -32,7 +32,6 @@ "eslint-plugin-import": "^2.28.1", "eslint-plugin-jest": "^28.3.0", "eslint-plugin-jest-dom": "^5.2.0", - "eslint-plugin-jest-formatting": "^3.0.0", "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-perfectionist": "^4.9.0", diff --git a/packages/eslint-config/testing/jest.js b/packages/eslint-config/testing/jest.js index 69ae8d3b..9eb09ae0 100644 --- a/packages/eslint-config/testing/jest.js +++ b/packages/eslint-config/testing/jest.js @@ -4,18 +4,28 @@ const common = require('./common.config'); /** @type {import("eslint-define-config").ESLintConfig} */ const config = merge(common, { - extends: ['plugin:jest/recommended', 'plugin:jest/style', 'plugin:jest-formatting/recommended'], + extends: ['plugin:jest/recommended', 'plugin:jest/style'], env: { 'jest/globals': true, }, rules: { 'jest/consistent-test-it': ['warn', { fn: 'test', withinDescribe: 'it' }], + 'jest/no-disabled-tests': 'off', 'jest/no-duplicate-hooks': 'warn', + + 'jest/padding-around-after-all-blocks': 'warn', + 'jest/padding-around-after-each-blocks': 'warn', + 'jest/padding-around-before-all-blocks': 'warn', + 'jest/padding-around-before-each-blocks': 'warn', + 'jest/padding-around-describe-blocks': 'warn', + 'jest/padding-around-test-blocks': 'warn', + 'jest/prefer-expect-resolves': 'warn', 'jest/prefer-hooks-on-top': 'warn', 'jest/prefer-strict-equal': 'error', 'jest/prefer-todo': 'warn', + 'jest/require-to-throw-message': 'error', }, }); From c27a8878ce682c24ad42ba5b9834999e95f221de Mon Sep 17 00:00:00 2001 From: Jon Ursenbach Date: Sun, 1 Jun 2025 13:31:40 -0700 Subject: [PATCH 3/7] chore: replacing `eslint-plugin-node` with `eslint-plugin-n` --- package-lock.json | 175 ++++++++++-------- packages/eslint-config/esm.js | 2 +- packages/eslint-config/index.js | 8 +- packages/eslint-config/package.json | 2 +- .../eslint-config/testing/common.config.js | 4 +- 5 files changed, 109 insertions(+), 82 deletions(-) diff --git a/package-lock.json b/package-lock.json index fd95d4e2..2fef1e04 100644 --- a/package-lock.json +++ b/package-lock.json @@ -957,9 +957,10 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -7394,6 +7395,19 @@ "once": "^1.4.0" } }, + "node_modules/enhanced-resolve": { + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", + "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -7744,6 +7758,21 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-compat-utils": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz", + "integrity": "sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==", + "license": "MIT", + "dependencies": { + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "eslint": ">=6.0.0" + } + }, "node_modules/eslint-config-airbnb-base": { "version": "15.0.0", "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", @@ -7995,41 +8024,25 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-plugin-es": { - "version": "3.0.1", - "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", + "node_modules/eslint-plugin-es-x": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.8.0.tgz", + "integrity": "sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==", + "funding": [ + "https://github.com/sponsors/ota-meshi", + "https://opencollective.com/eslint" + ], + "license": "MIT", "dependencies": { - "eslint-utils": "^2.0.0", - "regexpp": "^3.0.0" + "@eslint-community/eslint-utils": "^4.1.2", + "@eslint-community/regexpp": "^4.11.0", + "eslint-compat-utils": "^0.5.1" }, "engines": { - "node": ">=8.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" + "node": "^14.18.0 || >=16.0.0" }, "peerDependencies": { - "eslint": ">=4.19.1" - } - }, - "node_modules/eslint-plugin-es/node_modules/eslint-utils": { - "version": "2.1.0", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/eslint-plugin-es/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "engines": { - "node": ">=4" + "eslint": ">=8" } }, "node_modules/eslint-plugin-eslint-comments": { @@ -8187,50 +8200,65 @@ "version": "9.2.2", "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" }, - "node_modules/eslint-plugin-node": { - "version": "11.1.0", - "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", + "node_modules/eslint-plugin-n": { + "version": "17.18.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.18.0.tgz", + "integrity": "sha512-hvZ/HusueqTJ7VDLoCpjN0hx4N4+jHIWTXD4TMLHy9F23XkDagR9v+xQWRWR57yY55GPF8NnD4ox9iGTxirY8A==", + "license": "MIT", "dependencies": { - "eslint-plugin-es": "^3.0.0", - "eslint-utils": "^2.0.0", - "ignore": "^5.1.1", - "minimatch": "^3.0.4", - "resolve": "^1.10.1", - "semver": "^6.1.0" + "@eslint-community/eslint-utils": "^4.5.0", + "enhanced-resolve": "^5.17.1", + "eslint-plugin-es-x": "^7.8.0", + "get-tsconfig": "^4.8.1", + "globals": "^15.11.0", + "ignore": "^5.3.2", + "minimatch": "^9.0.5", + "semver": "^7.6.3" }, "engines": { - "node": ">=8.10.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" }, "peerDependencies": { - "eslint": ">=5.16.0" + "eslint": ">=8.23.0" } }, - "node_modules/eslint-plugin-node/node_modules/eslint-utils": { - "version": "2.1.0", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "node_modules/eslint-plugin-n/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, + "balanced-match": "^1.0.0" + } + }, + "node_modules/eslint-plugin-n/node_modules/globals": { + "version": "15.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", + "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", + "license": "MIT", "engines": { - "node": ">=6" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint-plugin-node/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "node_modules/eslint-plugin-n/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-node/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "bin": { - "semver": "bin/semver.js" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/eslint-plugin-perfectionist": { @@ -16175,16 +16203,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/registry-auth-token": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.2.tgz", @@ -18003,6 +18021,15 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, + "node_modules/tapable": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz", + "integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/tar": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", @@ -20430,7 +20457,7 @@ "eslint-plugin-jest": "^28.3.0", "eslint-plugin-jest-dom": "^5.2.0", "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-node": "^11.1.0", + "eslint-plugin-n": "^17.18.0", "eslint-plugin-perfectionist": "^4.9.0", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^5.0.0", diff --git a/packages/eslint-config/esm.js b/packages/eslint-config/esm.js index d3ae1bd2..a8656c2f 100644 --- a/packages/eslint-config/esm.js +++ b/packages/eslint-config/esm.js @@ -7,7 +7,7 @@ const config = { // https://gist.github.com/Jaid/164668c0151ae09d2bc81be78a203dd5 'import/no-commonjs': 'error', - 'node/no-extraneous-import': 'error', + 'n/no-extraneous-import': 'error', 'unicorn/prefer-module': 'error', 'unicorn/prefer-node-protocol': 'error', }, diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index 2c2076b0..4298b800 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -10,7 +10,7 @@ const config = { 'plugin:you-dont-need-lodash-underscore/compatible', 'prettier', ], - plugins: ['node', 'unicorn'], + plugins: ['n', 'unicorn'], rules: { 'arrow-body-style': 'off', // This rule clashes with our Prettier config. @@ -50,9 +50,9 @@ const config = { // acceptable. 'no-shadow': ['error', { allow: ['err'] }], - 'node/no-deprecated-api': 'error', - 'node/no-exports-assign': 'error', - 'node/no-extraneous-require': 'error', + 'n/no-deprecated-api': 'error', + 'n/no-exports-assign': 'error', + 'n/no-extraneous-require': 'error', 'prefer-arrow-callback': 'off', // This rule clashes with our Prettier config. 'prefer-destructuring': 'off', diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 37aae559..daac6153 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -33,7 +33,7 @@ "eslint-plugin-jest": "^28.3.0", "eslint-plugin-jest-dom": "^5.2.0", "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-node": "^11.1.0", + "eslint-plugin-n": "^17.18.0", "eslint-plugin-perfectionist": "^4.9.0", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^5.0.0", diff --git a/packages/eslint-config/testing/common.config.js b/packages/eslint-config/testing/common.config.js index e2dfc145..47bf9b7a 100644 --- a/packages/eslint-config/testing/common.config.js +++ b/packages/eslint-config/testing/common.config.js @@ -1,6 +1,6 @@ /** @type {import("eslint-define-config").ESLintConfig} */ const config = { - plugins: ['import', 'node'], + plugins: ['import', 'n'], rules: { // A failing `JSON.parse()` will fail the unit test it's in so it's safe to ignore. 'try-catch-failsafe/json-parse': 'off', @@ -9,7 +9,7 @@ const config = { 'import/no-extraneous-dependencies': 'off', - 'node/no-extraneous-require': 'off', + 'n/no-extraneous-require': 'off', // Sniff out tests that have useless `async` declarations. Since there's valid usecases for // having a function be async and not return or await a Promise, we're only running this rule From 587d3c6fa20f6f7ce20f6346eebbcf237df8815b Mon Sep 17 00:00:00 2001 From: Jon Ursenbach Date: Sun, 1 Jun 2025 14:41:25 -0700 Subject: [PATCH 4/7] chore: removing our circular dependency on eslint-config --- package-lock.json | 1 - packages/eslint-plugin/.eslintrc | 6 ------ packages/eslint-plugin/eslint.config.mjs | 13 +++++++++++++ packages/eslint-plugin/package.json | 1 - 4 files changed, 13 insertions(+), 8 deletions(-) delete mode 100644 packages/eslint-plugin/.eslintrc create mode 100644 packages/eslint-plugin/eslint.config.mjs diff --git a/package-lock.json b/package-lock.json index 2fef1e04..a9e18662 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20488,7 +20488,6 @@ "license": "ISC", "devDependencies": { "@babel/eslint-parser": "^7.27.1", - "@readme/eslint-config": "file:../eslint-config", "@typescript-eslint/parser": "^8.24.1", "eslint-doc-generator": "^2.0.2", "vitest": "^3.1.2" diff --git a/packages/eslint-plugin/.eslintrc b/packages/eslint-plugin/.eslintrc deleted file mode 100644 index 910f522f..00000000 --- a/packages/eslint-plugin/.eslintrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "@readme/eslint-config", - "parserOptions": { - "ecmaVersion": 2022 - } -} diff --git a/packages/eslint-plugin/eslint.config.mjs b/packages/eslint-plugin/eslint.config.mjs new file mode 100644 index 00000000..b2fe11b1 --- /dev/null +++ b/packages/eslint-plugin/eslint.config.mjs @@ -0,0 +1,13 @@ +import eslint from '@eslint/js'; +import globals from 'globals'; + +/** @type {import("eslint-define-config").ESLintConfig} */ +const config = { + languageOptions: { + globals: { + ...globals.node, + }, + }, +}; + +export default [eslint.configs.recommended, config]; diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index c869fda9..615717ab 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -30,7 +30,6 @@ }, "devDependencies": { "@babel/eslint-parser": "^7.27.1", - "@readme/eslint-config": "file:../eslint-config", "@typescript-eslint/parser": "^8.24.1", "eslint-doc-generator": "^2.0.2", "vitest": "^3.1.2" From d7f6b8d7c52d25b0128bebd250ca197a8d2092c9 Mon Sep 17 00:00:00 2001 From: Jon Ursenbach Date: Sun, 1 Jun 2025 18:50:13 -0700 Subject: [PATCH 5/7] chore(release): publish - @readme/eslint-config@15.0.0-alpha.0 - eslint-plugin-readme@3.0.0-alpha.0 - @readme/spectral-config@6.0.0-alpha.0 - @readme/stylelint-config@8.0.0-alpha.0 --- package-lock.json | 8 ++++---- packages/eslint-config/package.json | 2 +- packages/eslint-plugin/package.json | 2 +- packages/spectral-config/package.json | 2 +- packages/stylelint-config/package.json | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index a9e18662..d1e7baf0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20442,7 +20442,7 @@ }, "packages/eslint-config": { "name": "@readme/eslint-config", - "version": "14.7.2", + "version": "15.0.0-alpha.0", "license": "ISC", "dependencies": { "@typescript-eslint/eslint-plugin": "^8.31.1", @@ -20484,7 +20484,7 @@ }, "packages/eslint-plugin": { "name": "eslint-plugin-readme", - "version": "2.1.2", + "version": "3.0.0-alpha.0", "license": "ISC", "devDependencies": { "@babel/eslint-parser": "^7.27.1", @@ -20501,7 +20501,7 @@ }, "packages/spectral-config": { "name": "@readme/spectral-config", - "version": "5.0.16", + "version": "6.0.0-alpha.0", "license": "MIT", "dependencies": { "@stoplight/spectral-rulesets": "^1.22.0", @@ -20523,7 +20523,7 @@ }, "packages/stylelint-config": { "name": "@readme/stylelint-config", - "version": "7.1.2", + "version": "8.0.0-alpha.0", "license": "MIT", "dependencies": { "stylelint": "^16.19.1", diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index daac6153..0b6a4e16 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@readme/eslint-config", - "version": "14.7.2", + "version": "15.0.0-alpha.0", "description": "ReadMe coding standards", "main": "index.js", "author": "Jon Ursenbach ", diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 615717ab..19092d6a 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-readme", - "version": "2.1.2", + "version": "3.0.0-alpha.0", "description": "ESLint plugin providing custom rules for ReadMe's coding standards", "main": "index.js", "author": "Jon Ursenbach ", diff --git a/packages/spectral-config/package.json b/packages/spectral-config/package.json index 1f81d91e..d3087049 100644 --- a/packages/spectral-config/package.json +++ b/packages/spectral-config/package.json @@ -1,6 +1,6 @@ { "name": "@readme/spectral-config", - "version": "5.0.16", + "version": "6.0.0-alpha.0", "description": "ReadMe coding standards for API documentation", "main": "dist/index.js", "type": "module", diff --git a/packages/stylelint-config/package.json b/packages/stylelint-config/package.json index 691f463e..dcdf8a65 100644 --- a/packages/stylelint-config/package.json +++ b/packages/stylelint-config/package.json @@ -1,6 +1,6 @@ { "name": "@readme/stylelint-config", - "version": "7.1.2", + "version": "8.0.0-alpha.0", "description": "ReadMe coding standards for styles", "main": "src/index.js", "scripts": { From 328bde7b7c472c31d959361c3237220fee07b8c2 Mon Sep 17 00:00:00 2001 From: Jon Ursenbach Date: Sun, 1 Jun 2025 19:18:10 -0700 Subject: [PATCH 6/7] feat: replacing `eslint-plugin-eslint-comments` with a community fork --- package-lock.json | 50 ++++++++++++++++++----------- packages/eslint-config/index.js | 8 ++--- packages/eslint-config/package.json | 2 +- 3 files changed, 37 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index d1e7baf0..2e8b700e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -938,6 +938,37 @@ "node": ">=18" } }, + "node_modules/@eslint-community/eslint-plugin-eslint-comments": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-4.5.0.tgz", + "integrity": "sha512-MAhuTKlr4y/CE3WYX26raZjy+I/kS2PLKSzvfmDCGrBLTFHOYwqROZdr4XwPgXwX3K9rjzMr4pSmUWGnzsUyMg==", + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^4.0.0", + "ignore": "^5.2.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0" + } + }, + "node_modules/@eslint-community/eslint-plugin-eslint-comments/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", @@ -8045,23 +8076,6 @@ "eslint": ">=8" } }, - "node_modules/eslint-plugin-eslint-comments": { - "version": "3.2.0", - "integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==", - "dependencies": { - "escape-string-regexp": "^1.0.5", - "ignore": "^5.0.5" - }, - "engines": { - "node": ">=6.5.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=4.19.1" - } - }, "node_modules/eslint-plugin-import": { "version": "2.31.0", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", @@ -20445,6 +20459,7 @@ "version": "15.0.0-alpha.0", "license": "ISC", "dependencies": { + "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0", "@typescript-eslint/eslint-plugin": "^8.31.1", "@typescript-eslint/parser": "^8.31.1", "@typescript-eslint/utils": "^8.31.1", @@ -20452,7 +20467,6 @@ "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^10.1.2", "eslint-import-resolver-typescript": "^4.3.4", - "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.28.1", "eslint-plugin-jest": "^28.3.0", "eslint-plugin-jest-dom": "^5.2.0", diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index 4298b800..4c51f9df 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -3,7 +3,7 @@ const config = { extends: [ 'airbnb-base', 'eslint:recommended', - 'plugin:eslint-comments/recommended', + 'plugin:@eslint-community/eslint-comments/recommended', 'plugin:import/errors', 'plugin:import/warnings', 'plugin:try-catch-failsafe/default', @@ -12,10 +12,10 @@ const config = { ], plugins: ['n', 'unicorn'], rules: { - 'arrow-body-style': 'off', // This rule clashes with our Prettier config. + '@eslint-community/eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }], + '@eslint-community/eslint-comments/no-unused-disable': 'error', - 'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }], - 'eslint-comments/no-unused-disable': 'error', + 'arrow-body-style': 'off', // This rule clashes with our Prettier config. // This rule is enabled in our `typescript` config, eventually it will be enabled here as well. 'func-names': 'off', diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 0b6a4e16..24eecbe9 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -21,6 +21,7 @@ "test": "tsc" }, "dependencies": { + "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0", "@typescript-eslint/eslint-plugin": "^8.31.1", "@typescript-eslint/parser": "^8.31.1", "@typescript-eslint/utils": "^8.31.1", @@ -28,7 +29,6 @@ "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^10.1.2", "eslint-import-resolver-typescript": "^4.3.4", - "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.28.1", "eslint-plugin-jest": "^28.3.0", "eslint-plugin-jest-dom": "^5.2.0", From 7ba0f445352eed25d87b07f1530c93867207dabc Mon Sep 17 00:00:00 2001 From: Jon Ursenbach Date: Sun, 1 Jun 2025 19:29:06 -0700 Subject: [PATCH 7/7] chore(release): publish - @readme/eslint-config@15.0.1-alpha.0 - @readme/spectral-config@6.0.1-alpha.0 - @readme/stylelint-config@8.0.1-alpha.0 --- package-lock.json | 6 +++--- packages/eslint-config/package.json | 2 +- packages/spectral-config/package.json | 2 +- packages/stylelint-config/package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2e8b700e..de69f576 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20456,7 +20456,7 @@ }, "packages/eslint-config": { "name": "@readme/eslint-config", - "version": "15.0.0-alpha.0", + "version": "15.0.1-alpha.0", "license": "ISC", "dependencies": { "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0", @@ -20515,7 +20515,7 @@ }, "packages/spectral-config": { "name": "@readme/spectral-config", - "version": "6.0.0-alpha.0", + "version": "6.0.1-alpha.0", "license": "MIT", "dependencies": { "@stoplight/spectral-rulesets": "^1.22.0", @@ -20537,7 +20537,7 @@ }, "packages/stylelint-config": { "name": "@readme/stylelint-config", - "version": "8.0.0-alpha.0", + "version": "8.0.1-alpha.0", "license": "MIT", "dependencies": { "stylelint": "^16.19.1", diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 24eecbe9..65373d4a 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@readme/eslint-config", - "version": "15.0.0-alpha.0", + "version": "15.0.1-alpha.0", "description": "ReadMe coding standards", "main": "index.js", "author": "Jon Ursenbach ", diff --git a/packages/spectral-config/package.json b/packages/spectral-config/package.json index d3087049..f6ecb0a6 100644 --- a/packages/spectral-config/package.json +++ b/packages/spectral-config/package.json @@ -1,6 +1,6 @@ { "name": "@readme/spectral-config", - "version": "6.0.0-alpha.0", + "version": "6.0.1-alpha.0", "description": "ReadMe coding standards for API documentation", "main": "dist/index.js", "type": "module", diff --git a/packages/stylelint-config/package.json b/packages/stylelint-config/package.json index dcdf8a65..9883dcc1 100644 --- a/packages/stylelint-config/package.json +++ b/packages/stylelint-config/package.json @@ -1,6 +1,6 @@ { "name": "@readme/stylelint-config", - "version": "8.0.0-alpha.0", + "version": "8.0.1-alpha.0", "description": "ReadMe coding standards for styles", "main": "src/index.js", "scripts": {