diff --git a/eslint-configs/eslint-config-seekingalpha-base/CHANGELOG.md b/eslint-configs/eslint-config-seekingalpha-base/CHANGELOG.md index a22fea9a..78864cbb 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/CHANGELOG.md +++ b/eslint-configs/eslint-config-seekingalpha-base/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 11.0.0 - 2025-03-09 + +- [deps] update `eslint` to version `9.22.0` +- [breaking] enable `unicorn/prefer-math-min-max` rule +- [breaking] enable `no-useless-assignment` rule + ## 10.0.0 - 2025-03-09 - [breaking] migrate to ESM and make flat config default diff --git a/eslint-configs/eslint-config-seekingalpha-base/README.md b/eslint-configs/eslint-config-seekingalpha-base/README.md index 371d459e..295d9a62 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/README.md +++ b/eslint-configs/eslint-config-seekingalpha-base/README.md @@ -6,7 +6,7 @@ This package includes the shareable ESLint config used by [SeekingAlpha](https:/ Install ESLint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/): - npm install eslint@8.57.1 eslint-plugin-array-func@5.0.2 eslint-plugin-import@2.31.0 eslint-plugin-promise@7.2.1 eslint-plugin-unicorn@56.0.1 --save-dev + npm install eslint@9.22.0 eslint-plugin-array-func@5.0.2 eslint-plugin-import@2.31.0 eslint-plugin-promise@7.2.1 eslint-plugin-unicorn@56.0.1 --save-dev Install SeekingAlpha shareable ESLint: diff --git a/eslint-configs/eslint-config-seekingalpha-base/package.json b/eslint-configs/eslint-config-seekingalpha-base/package.json index 2b03a6f3..f4306956 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/package.json +++ b/eslint-configs/eslint-config-seekingalpha-base/package.json @@ -1,11 +1,11 @@ { "name": "eslint-config-seekingalpha-base", - "version": "10.0.0", + "version": "11.0.0", "description": "SeekingAlpha's sharable base ESLint config", "main": "index.js", "type": "module", "scripts": { - "eslint-find-rules": "eslint-find-rules -u ./index.js", + "eslint-find-rules": "eslint-find-rules --flatConfig -u ./index.js", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { @@ -48,14 +48,14 @@ "node": ">= 22" }, "peerDependencies": { - "eslint": "8.57.1", + "eslint": "9.22.0", "eslint-plugin-array-func": "5.0.2", "eslint-plugin-import": "2.31.0", "eslint-plugin-promise": "7.2.1", "eslint-plugin-unicorn": "56.0.1" }, "devDependencies": { - "eslint": "8.57.1", + "eslint": "9.22.0", "eslint-find-rules": "5.0.0", "eslint-plugin-array-func": "5.0.2", "eslint-plugin-import": "2.31.0", diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-promise/index.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-promise/index.js index f091591d..b270ecc5 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-promise/index.js +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint-plugin-promise/index.js @@ -55,6 +55,9 @@ export default { // https://github.com/xjamundx/eslint-plugin-promise/blob/master/docs/rules/prefer-await-to-then.md 'promise/prefer-await-to-then': 'off', + // https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-catch.md + 'promise/prefer-catch': 'error', + // https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/spec-only.md 'promise/spec-only': 'error', }, diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/layout-and-formatting.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/layout-and-formatting.js index 70f28792..198d2fb5 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/layout-and-formatting.js +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/layout-and-formatting.js @@ -1,15 +1,5 @@ // https://eslint.org/docs/rules/#layout-formatting export default { - // https://eslint.org/docs/rules/line-comment-position - 'line-comment-position': [ - 'error', - { - position: 'above', - ignorePattern: '', - applyDefaultPatterns: true, - }, - ], - /* * https://eslint.org/docs/rules/unicode-bom * disabled to work with prettier diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/possible-problems.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/possible-problems.js index 94e23c2b..b19c7528 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/possible-problems.js +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/possible-problems.js @@ -201,6 +201,9 @@ export default { }, ], + // https://eslint.org/docs/latest/rules/no-useless-assignment + 'no-useless-assignment': 'error', + // https://eslint.org/docs/rules/no-useless-backreference 'no-useless-backreference': 'error', diff --git a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/suggestions.js b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/suggestions.js index ee71aa32..f38805d9 100644 --- a/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/suggestions.js +++ b/eslint-configs/eslint-config-seekingalpha-base/rules/eslint/suggestions.js @@ -182,9 +182,6 @@ export default { // https://eslint.org/docs/rules/max-statements 'max-statements': ['error', config.maxStatements], - // https://eslint.org/docs/rules/multiline-comment-style - 'multiline-comment-style': ['error', 'starred-block'], - // https://eslint.org/docs/rules/new-cap 'new-cap': [ 'error', diff --git a/eslint-configs/eslint-config-seekingalpha-node/CHANGELOG.md b/eslint-configs/eslint-config-seekingalpha-node/CHANGELOG.md index 87481a00..87b8a27a 100644 --- a/eslint-configs/eslint-config-seekingalpha-node/CHANGELOG.md +++ b/eslint-configs/eslint-config-seekingalpha-node/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 9.0.0 - 2025-03-09 + +- [deps] update `eslint` to version `9.22.0` + ## 8.0.0 - 2025-03-09 - [breaking] migrate to ESM and make flat config default diff --git a/eslint-configs/eslint-config-seekingalpha-node/README.md b/eslint-configs/eslint-config-seekingalpha-node/README.md index 0cdf9057..343037eb 100644 --- a/eslint-configs/eslint-config-seekingalpha-node/README.md +++ b/eslint-configs/eslint-config-seekingalpha-node/README.md @@ -6,7 +6,7 @@ This package includes the shareable ESLint config used by [SeekingAlpha](https:/ Install ESLint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/): - npm install eslint@8.57.1 eslint-plugin-n@17.16.2 --save-dev + npm install eslint@9.22.0 eslint-plugin-n@17.16.2 --save-dev Install SeekingAlpha shareable ESLint: diff --git a/eslint-configs/eslint-config-seekingalpha-node/package.json b/eslint-configs/eslint-config-seekingalpha-node/package.json index 55c3434f..bdffd239 100644 --- a/eslint-configs/eslint-config-seekingalpha-node/package.json +++ b/eslint-configs/eslint-config-seekingalpha-node/package.json @@ -1,11 +1,11 @@ { "name": "eslint-config-seekingalpha-node", - "version": "8.0.0", + "version": "9.0.0", "description": "SeekingAlpha's sharable node.js ESLint config", "main": "index.js", "type": "module", "scripts": { - "eslint-find-rules": "eslint-find-rules -u ./index.js", + "eslint-find-rules": "eslint-find-rules --flatConfig -u ./index.js", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { @@ -50,11 +50,11 @@ "node": ">= 22" }, "peerDependencies": { - "eslint": "8.57.1", + "eslint": "9.22.0", "eslint-plugin-n": "17.16.2" }, "devDependencies": { - "eslint": "8.57.1", + "eslint": "9.22.0", "eslint-find-rules": "5.0.0", "eslint-plugin-n": "17.16.2" } diff --git a/eslint-configs/eslint-config-seekingalpha-react/CHANGELOG.md b/eslint-configs/eslint-config-seekingalpha-react/CHANGELOG.md index 47a73038..77967f9e 100644 --- a/eslint-configs/eslint-config-seekingalpha-react/CHANGELOG.md +++ b/eslint-configs/eslint-config-seekingalpha-react/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 10.0.0 - 2025-03-09 + +- [deps] upgrade `eslint` to version `9.22.0` + ## 9.0.2 - 2025-03-09 - [breaking] migrate to ESM and make flat config default diff --git a/eslint-configs/eslint-config-seekingalpha-react/README.md b/eslint-configs/eslint-config-seekingalpha-react/README.md index 578516d3..c6be9bd2 100644 --- a/eslint-configs/eslint-config-seekingalpha-react/README.md +++ b/eslint-configs/eslint-config-seekingalpha-react/README.md @@ -6,7 +6,7 @@ This package includes the shareable ESLint config used by [SeekingAlpha](https:/ Install ESLint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/): - npm install eslint@8.57.1 eslint-plugin-jsx-a11y@6.10.2 eslint-plugin-react@7.37.4 eslint-plugin-react-hooks@5.2.0 --save-dev + npm install eslint@9.22.0 eslint-plugin-jsx-a11y@6.10.2 eslint-plugin-react@7.37.4 eslint-plugin-react-hooks@5.2.0 --save-dev Install SeekingAlpha shareable ESLint: diff --git a/eslint-configs/eslint-config-seekingalpha-react/package.json b/eslint-configs/eslint-config-seekingalpha-react/package.json index 22040e25..51b80409 100644 --- a/eslint-configs/eslint-config-seekingalpha-react/package.json +++ b/eslint-configs/eslint-config-seekingalpha-react/package.json @@ -1,11 +1,11 @@ { "name": "eslint-config-seekingalpha-react", - "version": "9.0.2", + "version": "10.0.0", "description": "SeekingAlpha's sharable React.js ESLint config", "main": "index.js", "type": "module", "scripts": { - "eslint-find-rules": "eslint-find-rules -u ./index.js", + "eslint-find-rules": "eslint-find-rules --flatConfig -u ./index.js", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { @@ -50,13 +50,13 @@ "node": ">= 22" }, "peerDependencies": { - "eslint": "8.57.1", + "eslint": "9.22.0", "eslint-plugin-jsx-a11y": "6.10.2", "eslint-plugin-react": "7.37.4", "eslint-plugin-react-hooks": "5.2.0" }, "devDependencies": { - "eslint": "8.57.1", + "eslint": "9.22.0", "eslint-find-rules": "5.0.0", "eslint-plugin-jsx-a11y": "6.10.2", "eslint-plugin-react": "7.37.4", diff --git a/eslint-configs/eslint-config-seekingalpha-tests/CHANGELOG.md b/eslint-configs/eslint-config-seekingalpha-tests/CHANGELOG.md index f90f1bdc..a698c682 100644 --- a/eslint-configs/eslint-config-seekingalpha-tests/CHANGELOG.md +++ b/eslint-configs/eslint-config-seekingalpha-tests/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 4.0.0 - 2025-03-09 + +- [deps] upgrade `eslint` to version `9.22.0` + ## 3.0.0 - 2025-03-09 - [breaking] migrate to ESM and make flat config default diff --git a/eslint-configs/eslint-config-seekingalpha-tests/README.md b/eslint-configs/eslint-config-seekingalpha-tests/README.md index 3f67a945..2a0e628a 100644 --- a/eslint-configs/eslint-config-seekingalpha-tests/README.md +++ b/eslint-configs/eslint-config-seekingalpha-tests/README.md @@ -6,7 +6,7 @@ This package includes the shareable ESLint config used by [SeekingAlpha](https:/ Install ESLint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/): - npm install eslint@8.57.1 eslint-plugin-jest@28.11.0 eslint-plugin-testing-library@7.1.1 --save-dev + npm install eslint@9.22.0 eslint-plugin-jest@28.11.0 eslint-plugin-testing-library@7.1.1 --save-dev Install SeekingAlpha shareable ESLint: diff --git a/eslint-configs/eslint-config-seekingalpha-tests/package.json b/eslint-configs/eslint-config-seekingalpha-tests/package.json index 0d6b1cb2..38541e1e 100644 --- a/eslint-configs/eslint-config-seekingalpha-tests/package.json +++ b/eslint-configs/eslint-config-seekingalpha-tests/package.json @@ -1,11 +1,11 @@ { "name": "eslint-config-seekingalpha-tests", - "version": "3.0.0", + "version": "4.0.0", "description": "SeekingAlpha's sharable testing ESLint config", "main": "index.js", "type": "module", "scripts": { - "eslint-find-rules": "eslint-find-rules -u ./index.js", + "eslint-find-rules": "eslint-find-rules --flatConfig -u ./index.js", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { @@ -39,12 +39,12 @@ "node": ">= 22" }, "peerDependencies": { - "eslint": "8.57.1", + "eslint": "9.22.0", "eslint-plugin-jest": "28.11.0", "eslint-plugin-testing-library": "7.1.1" }, "devDependencies": { - "eslint": "8.57.1", + "eslint": "9.22.0", "eslint-find-rules": "5.0.0", "eslint-plugin-jest": "28.11.0", "eslint-plugin-testing-library": "7.1.1" diff --git a/eslint-configs/eslint-config-seekingalpha-typescript/CHANGELOG.md b/eslint-configs/eslint-config-seekingalpha-typescript/CHANGELOG.md index e2cbf1ad..3b7f0f4c 100644 --- a/eslint-configs/eslint-config-seekingalpha-typescript/CHANGELOG.md +++ b/eslint-configs/eslint-config-seekingalpha-typescript/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 8.0.0 - 2025-03-09 + +- [deps] upgrade `eslint` to version `9.22.0` + ## 7.0.1 - 2025-03-09 - [breaking] migrate to ESM and make flat config default diff --git a/eslint-configs/eslint-config-seekingalpha-typescript/README.md b/eslint-configs/eslint-config-seekingalpha-typescript/README.md index 73104b90..60bfaad4 100644 --- a/eslint-configs/eslint-config-seekingalpha-typescript/README.md +++ b/eslint-configs/eslint-config-seekingalpha-typescript/README.md @@ -6,7 +6,7 @@ This package includes the shareable ESLint config used by [SeekingAlpha](https:/ Install ESLint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/): - npm install eslint@8.57.1 typescript-eslint@8.26.0 @typescript-eslint/eslint-plugin@8.26.0 @typescript-eslint/parser@8.26.0 --save-dev + npm install eslint@9.22.0 typescript-eslint@8.26.0 @typescript-eslint/eslint-plugin@8.26.0 @typescript-eslint/parser@8.26.0 --save-dev Install SeekingAlpha shareable ESLint: diff --git a/eslint-configs/eslint-config-seekingalpha-typescript/package.json b/eslint-configs/eslint-config-seekingalpha-typescript/package.json index 1079e06c..e705ef82 100644 --- a/eslint-configs/eslint-config-seekingalpha-typescript/package.json +++ b/eslint-configs/eslint-config-seekingalpha-typescript/package.json @@ -1,11 +1,11 @@ { "name": "eslint-config-seekingalpha-typescript", - "version": "7.0.1", + "version": "8.0.0", "description": "SeekingAlpha's sharable typescript ESLint config", "main": "index.js", "type": "module", "scripts": { - "eslint-find-rules": "eslint-find-rules -u ./index.js", + "eslint-find-rules": "eslint-find-rules --flatConfig -u ./index.js", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { @@ -40,14 +40,14 @@ "peerDependencies": { "@typescript-eslint/eslint-plugin": "8.26.0", "@typescript-eslint/parser": "8.26.0", - "typescript-eslint": "8.26.0", - "eslint": "8.57.1" + "eslint": "9.22.0", + "typescript-eslint": "8.26.0" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "8.26.0", "@typescript-eslint/parser": "8.26.0", - "typescript-eslint": "8.26.0", - "eslint": "8.57.1", - "eslint-find-rules": "5.0.0" + "eslint": "9.22.0", + "eslint-find-rules": "5.0.0", + "typescript-eslint": "8.26.0" } } diff --git a/package.json b/package.json index f482be2c..4c5dd0e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "seekingalpha-javascript-style", - "version": "7.1.3", + "version": "8.0.0", "description": "Set of linting rules, guides and best practices for best Javascript code", "main": "index.js", "type": "module",