From 1be7c94d783bdcb88bf79bf5b303fdf791d2d4ca Mon Sep 17 00:00:00 2001 From: Sergey Krylov Date: Fri, 5 Jul 2024 05:58:17 +0300 Subject: [PATCH 1/2] feat: update packages --- package.json | 21 +++++++++++---------- rules/.eslint-ts.js | 4 ++++ rules/react/.eslint-react.js | 6 +++++- rules/style/.eslint-style-jsx.js | 1 + yarn.lock | 21 +++++++++++++++++++++ 5 files changed, 42 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 4766778..30cdf93 100644 --- a/package.json +++ b/package.json @@ -28,25 +28,26 @@ "@commitlint/config-conventional": "19.1.0", "eslint": "8.56.0", "husky": "9.0.11", - "standard-version": "9.5.0" + "standard-version": "9.5.0", + "typescript": "5.4.0" }, "main": "index.js", "engines": { "node": ">=16.13.0" }, "dependencies": { - "@stylistic/eslint-plugin": "1.5.4", - "@typescript-eslint/eslint-plugin": "6.20.0", - "@typescript-eslint/parser": "6.20.0", + "@stylistic/eslint-plugin": "2.3.0", + "@typescript-eslint/eslint-plugin": "7.15.0", + "@typescript-eslint/parser": "7.15.0", "eslint-import-resolver-typescript": "3.6.1", "eslint-plugin-import": "2.29.1", - "eslint-plugin-jest": "27.9.0", - "eslint-plugin-jest-dom": "5.2.0", + "eslint-plugin-jest": "28.6.0", + "eslint-plugin-jest-dom": "5.4.0", "eslint-plugin-jest-formatting": "3.1.0", - "eslint-plugin-jsx-a11y": "6.8.0", - "eslint-plugin-react": "7.33.2", - "eslint-plugin-react-hooks": "4.6.0", - "eslint-plugin-testing-library": "6.2.0" + "eslint-plugin-jsx-a11y": "6.9.0", + "eslint-plugin-react": "7.34.3", + "eslint-plugin-react-hooks": "4.6.2", + "eslint-plugin-testing-library": "6.2.2" }, "peerDependencies": { "eslint": ">=8.56.0", diff --git a/rules/.eslint-ts.js b/rules/.eslint-ts.js index 4806a28..59ebb68 100644 --- a/rules/.eslint-ts.js +++ b/rules/.eslint-ts.js @@ -121,6 +121,9 @@ module.exports = { 'require-await': 'off', '@typescript-eslint/require-await': baseRules['require-await'], + "consistent-return": "off", + "@typescript-eslint/consistent-return": baseRules['consistent-return'], + '@typescript-eslint/return-await': ['error', 'in-try-catch'], 'import/extensions': [ @@ -268,5 +271,6 @@ module.exports = { '@typescript-eslint/typedef': 'error', '@typescript-eslint/unbound-method': 'error', '@typescript-eslint/unified-signatures': 'error', + "@typescript-eslint/prefer-find": "error" }, } diff --git a/rules/react/.eslint-react.js b/rules/react/.eslint-react.js index e968137..bdcdc36 100644 --- a/rules/react/.eslint-react.js +++ b/rules/react/.eslint-react.js @@ -55,6 +55,10 @@ module.exports = { 'submit': true, 'reset': false, }], + "react/checked-requires-onchange-or-readonly": ['error', { + "ignoreMissingProperties": false, + "ignoreExclusiveCheckedAttribute": false, + }], 'react/default-props-match-prop-types': ['error', { 'allowRequiredDefaults': false, }], @@ -111,7 +115,7 @@ module.exports = { ], }], 'react/jsx-first-prop-new-line': 'off', - 'react/jsx-fragments': ['error', 'syntax' ], + 'react/jsx-fragments': ['error', 'syntax'], 'react/jsx-handler-names': ['off', { 'eventHandlerPrefix': 'handle', 'eventHandlerPropPrefix': 'on', diff --git a/rules/style/.eslint-style-jsx.js b/rules/style/.eslint-style-jsx.js index 8863f93..0009aca 100644 --- a/rules/style/.eslint-style-jsx.js +++ b/rules/style/.eslint-style-jsx.js @@ -56,5 +56,6 @@ module.exports = { 'logical': 'parens-new-line', 'prop': 'parens-new-line', }], + "@stylistic/jsx-function-call-newline": ["error", "multiline"] } } diff --git a/yarn.lock b/yarn.lock index 21d4c6a..01e0bf3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1876,6 +1876,7 @@ __metadata: eslint-plugin-testing-library: "npm:6.2.0" husky: "npm:9.0.11" standard-version: "npm:9.5.0" + typescript: "npm:^5.5.3" peerDependencies: eslint: ">=8.56.0" typescript: ">=4.2.2" @@ -4831,6 +4832,26 @@ __metadata: languageName: node linkType: hard +"typescript@npm:^5.5.3": + version: 5.5.3 + resolution: "typescript@npm:5.5.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/f52c71ccbc7080b034b9d3b72051d563601a4815bf3e39ded188e6ce60813f75dbedf11ad15dd4d32a12996a9ed8c7155b46c93a9b9c9bad1049766fe614bbdd + languageName: node + linkType: hard + +"typescript@patch:typescript@npm%3A^5.5.3#optional!builtin": + version: 5.5.3 + resolution: "typescript@patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=5adc0c" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/5a437c416251334deeaf29897157032311f3f126547cfdc4b133768b606cb0e62bcee733bb97cf74c42fe7268801aea1392d8e40988cdef112e9546eba4c03c5 + languageName: node + linkType: hard + "uglify-js@npm:^3.1.4": version: 3.17.4 resolution: "uglify-js@npm:3.17.4" -- 2.47.2 From e74f4d8bba7eff8272035138b6f6e0fc2ddd958b Mon Sep 17 00:00:00 2001 From: Sergey Krylov Date: Fri, 5 Jul 2024 06:39:58 +0300 Subject: [PATCH 2/2] build: v0.0.3 --- CHANGELOG.md | 10 ++++++++++ package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a6cb9d..f760756 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,14 @@ # ksv741 Eslint Config +### 0.0.3 (2024-07-05) + + +### 🚀 New Features + +* add github actions ([4e38a6f](https://github.com/ksv741/eslint-config-ksv741/commit/4e38a6fef61144b8a8afc3d70c66d2ed82edc80b)) +* add jest ruleset ([139a4a6](https://github.com/ksv741/eslint-config-ksv741/commit/139a4a6766a593d9fbc27a504c24bc9e4b5c6e5a)) +* update packages ([1be7c94](https://github.com/ksv741/eslint-config-ksv741/commit/1be7c94d783bdcb88bf79bf5b303fdf791d2d4ca)) +* upgrade yarn, add linting packages ([a738e8c](https://github.com/ksv741/eslint-config-ksv741/commit/a738e8c415c6b91610128e04dd591bf4a1bbd43e)) + ### 0.0.2 (2024-04-08) diff --git a/package.json b/package.json index 30cdf93..c88619c 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "type": "git", "url": "https://github.com/ksv741/eslint-config-ksv741" }, - "version": "0.0.2", + "version": "0.0.3", "devDependencies": { "@commitlint/cli": "19.2.1", "@commitlint/config-conventional": "19.1.0", -- 2.47.2