From ace820c8b39f3299ad99ffc977483a6946d23e93 Mon Sep 17 00:00:00 2001 From: weiren Date: Mon, 2 Dec 2024 10:47:09 +0800 Subject: [PATCH 1/4] chore: upgrade deps --- lib/rules/test-case-property-ordering.js | 2 +- package.json | 41 ++++++++++++------------ 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/lib/rules/test-case-property-ordering.js b/lib/rules/test-case-property-ordering.js index 5b161aba..8ffe1336 100644 --- a/lib/rules/test-case-property-ordering.js +++ b/lib/rules/test-case-property-ordering.js @@ -68,7 +68,7 @@ module.exports = { // current < lastChecked to catch unordered; // and lastChecked === -1 to catch extra properties before. if ( - current > -1 && + current !== -1 && (current < lastChecked || lastChecked === -1) ) { let orderMsg = order.filter((item) => diff --git a/package.json b/package.json index f779d139..a0d325a6 100644 --- a/package.json +++ b/package.json @@ -50,41 +50,40 @@ "statements": 99 }, "devDependencies": { - "@commitlint/cli": "^19.2.2", - "@commitlint/config-conventional": "^19.2.2", + "@commitlint/cli": "^19.6.0", + "@commitlint/config-conventional": "^19.6.0", "@eslint-community/eslint-plugin-eslint-comments": "^4.3.0", "@eslint/eslintrc": "^3.0.2", - "@eslint/js": "^9.0.0", - "@release-it/conventional-changelog": "^8.0.1", - "@types/eslint": "^8.56.9", + "@eslint/js": "^9.16.0", + "@release-it/conventional-changelog": "^9.0.3", + "@types/eslint": "^9.6.1", "@types/estree": "^1.0.5", - "@typescript-eslint/parser": "^7.7.0", - "@typescript-eslint/utils": "^7.7.0", - "chai": "^4.4.1", - "dirty-chai": "^2.0.1", - "eslint": "9.14.0", + "@typescript-eslint/parser": "^8.16.0", + "@typescript-eslint/utils": "^8.16.0", + "chai": "^4.5.0", + "eslint": "^9.16.0", "eslint-config-not-an-aardvark": "^2.1.0", "eslint-config-prettier": "^9.1.0", "eslint-doc-generator": "^1.7.0", "eslint-plugin-eslint-plugin": "file:./", "eslint-plugin-markdown": "^5.0.0", - "eslint-plugin-n": "^17.2.1", + "eslint-plugin-n": "^17.14.0", "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-unicorn": "^53.0.0", - "eslint-remote-tester": "^3.0.1", + "eslint-plugin-unicorn": "^56.0.1", + "eslint-remote-tester": "^4.0.1", "eslint-scope": "^8.0.1", "espree": "^10.0.1", - "globals": "^15.0.0", - "husky": "^9.0.11", + "globals": "^15.13.0", + "husky": "^9.1.7", "lodash": "^4.17.21", - "markdownlint-cli": "^0.41.0", + "markdownlint-cli": "^0.43.0", "mocha": "^10.4.0", - "npm-package-json-lint": "^7.1.0", - "npm-run-all2": "^6.1.2", - "nyc": "^15.1.0", - "prettier": "^3.2.5", + "npm-package-json-lint": "^8.0.0", + "npm-run-all2": "^7.0.1", + "nyc": "^17.1.0", + "prettier": "^3.4.1", "release-it": "^17.2.0", - "typescript": "^5.4.3" + "typescript": "^5.7.2" }, "peerDependencies": { "eslint": ">=8.23.0" From 88a83c0de5372b838809eab747a19a0d0172525e Mon Sep 17 00:00:00 2001 From: weiren Date: Mon, 2 Dec 2024 12:46:54 +0800 Subject: [PATCH 2/4] fix: revert tseslint v7 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a0d325a6..a1f84e51 100644 --- a/package.json +++ b/package.json @@ -58,8 +58,8 @@ "@release-it/conventional-changelog": "^9.0.3", "@types/eslint": "^9.6.1", "@types/estree": "^1.0.5", - "@typescript-eslint/parser": "^8.16.0", - "@typescript-eslint/utils": "^8.16.0", + "@typescript-eslint/parser": "^7.7.0", + "@typescript-eslint/utils": "^7.7.0", "chai": "^4.5.0", "eslint": "^9.16.0", "eslint-config-not-an-aardvark": "^2.1.0", From 28a8c6a86a740006879855bbeca808647c633a67 Mon Sep 17 00:00:00 2001 From: weiren Date: Mon, 2 Dec 2024 14:02:08 +0800 Subject: [PATCH 3/4] chore: update eslint-remote-tester config --- ...nfig.js => eslint-remote-tester.config.mjs | 29 ++++++++++--------- eslint.config.js | 2 +- package.json | 2 +- 3 files changed, 17 insertions(+), 16 deletions(-) rename eslint-remote-tester.config.js => eslint-remote-tester.config.mjs (79%) diff --git a/eslint-remote-tester.config.js b/eslint-remote-tester.config.mjs similarity index 79% rename from eslint-remote-tester.config.js rename to eslint-remote-tester.config.mjs index daf06010..313c3349 100644 --- a/eslint-remote-tester.config.js +++ b/eslint-remote-tester.config.mjs @@ -1,7 +1,8 @@ -'use strict'; +import eslintPlugin from 'eslint-plugin-eslint-plugin'; +import tsparser from '@typescript-eslint/parser'; /** @type {import('eslint-remote-tester').Config} */ -module.exports = { +export default { /** Repositories to scan */ repositories: [ // A few dozen top ESLint plugins. @@ -41,18 +42,18 @@ module.exports = { /** Optional boolean flag used to enable caching of cloned repositories. For CIs it's ideal to disable caching. Defaults to true. */ cache: false, - pathIgnorePattern: 'fixtures', - /** ESLint configuration */ - eslintrc: { - root: true, - extends: ['plugin:eslint-plugin/all'], - // ignorePatterns: ['fixtures/**/*'], // not working somehow - using `pathIgnorePattern` as of now. - overrides: [ - { - files: ['*.ts', '*.mts', '*.cts'], - parser: '@typescript-eslint/parser', + eslintConfig: [ + { + files: ['**/*.{js,mjs,cjs,ts,mts,cts}'], + ...eslintPlugin.configs['flat/all'], + }, + { + files: ['*.ts', '*.mts', '*.cts'], + ...eslintPlugin.configs['flat/all-type-checked'], + languageOptions: { + parser: tsparser, }, - ], - }, + }, + ], }; diff --git a/eslint.config.js b/eslint.config.js index ecc609db..0b4d95f6 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -19,7 +19,7 @@ module.exports = [ 'plugin:prettier/recommended', 'plugin:unicorn/recommended', ), - pluginN.configs['flat/recommended'], + ...pluginN.configs['flat/mixed-esm-and-cjs'], { rules: { '@eslint-community/eslint-comments/no-unused-disable': 'error', diff --git a/package.json b/package.json index a1f84e51..22ba4cd5 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "lint:package-json": "npmPkgJsonLint .", "release": "release-it", "test": "nyc --all --check-coverage --include lib mocha tests --recursive", - "test:remote": "eslint-remote-tester", + "test:remote": "eslint-remote-tester -c eslint-remote-tester.config.mjs", "update:eslint-docs": "eslint-doc-generator" }, "files": [ From c82cd8cd976235c754fd37ee801e6de8ad634ff5 Mon Sep 17 00:00:00 2001 From: weiren Date: Mon, 2 Dec 2024 14:12:13 +0800 Subject: [PATCH 4/4] chore: update test:remote -c --- .github/workflows/main.yml | 1 - package.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7659f8b0..470964ab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,5 +56,4 @@ jobs: with: node-version: "lts/*" - run: npm install - - run: npm install --save-dev eslint@8 # eslint-remote-tester does not support eslint v9. - run: npm run test:remote diff --git a/package.json b/package.json index 22ba4cd5..b4d17e6e 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "lint:package-json": "npmPkgJsonLint .", "release": "release-it", "test": "nyc --all --check-coverage --include lib mocha tests --recursive", - "test:remote": "eslint-remote-tester -c eslint-remote-tester.config.mjs", + "test:remote": "eslint-remote-tester -c ./eslint-remote-tester.config.mjs", "update:eslint-docs": "eslint-doc-generator" }, "files": [