From b56fbc8e69d70ce41284ed0768d8b3111f68908b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Tue, 7 Jun 2022 18:29:06 +0200 Subject: [PATCH] feat: update dependencies & add new rules (#131) --- .github/workflows/validate.yml | 2 +- index.js | 1 + jest.js | 1 + package.json | 22 +++++++++++----------- react.js | 1 + 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index aed0cdb..dc06876 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -16,7 +16,7 @@ jobs: if: ${{ !contains(github.head_ref, 'all-contributors') }} strategy: matrix: - node: [12.22.0, 12, 14.17.0, 14, 16.0.0, 16] + node: [12.22.0, 12, 14.17.0, 14, 16.0.0, 16, 18] runs-on: ubuntu-latest steps: - name: 🛑 Cancel Previous Runs diff --git a/index.js b/index.js index 1473f30..5706d79 100644 --- a/index.js +++ b/index.js @@ -74,6 +74,7 @@ module.exports = { 'no-cond-assign': 'error', 'no-console': 'off', 'no-const-assign': 'error', + 'no-constant-binary-expression': 'error', 'no-constant-condition': 'error', 'no-constructor-return': 'error', 'no-continue': 'off', diff --git a/jest.js b/jest.js index dcb3f9b..117796e 100644 --- a/jest.js +++ b/jest.js @@ -71,6 +71,7 @@ module.exports = { 'jest/prefer-equality-matcher': 'error', 'jest/prefer-expect-assertions': 'off', 'jest/prefer-expect-resolves': 'off', + 'jest/prefer-hooks-in-order': 'error', 'jest/prefer-hooks-on-top': 'error', 'jest/prefer-lowercase-title': 'off', 'jest/prefer-snapshot-hint': 'error', diff --git a/package.json b/package.json index 4610f85..6e4d30d 100644 --- a/package.json +++ b/package.json @@ -33,23 +33,23 @@ }, "homepage": "https://github.com/kentcdodds/eslint-config-kentcdodds#readme", "dependencies": { - "@typescript-eslint/eslint-plugin": "^5.18.0", - "@typescript-eslint/parser": "^5.18.0", + "@typescript-eslint/eslint-plugin": "^5.27.1", + "@typescript-eslint/parser": "^5.27.1", "eslint-config-prettier": "^8.5.0", - "eslint-plugin-import": "^2.25.4", - "eslint-plugin-jest": "^26.1.3", - "eslint-plugin-jest-dom": "^4.0.1", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-jest": "^26.5.3", + "eslint-plugin-jest-dom": "^4.0.2", "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-react": "^7.29.4", - "eslint-plugin-react-hooks": "^4.4.0", - "eslint-plugin-testing-library": "^5.2.1", + "eslint-plugin-react": "^7.30.0", + "eslint-plugin-react-hooks": "^4.5.0", + "eslint-plugin-testing-library": "^5.5.1", "read-pkg-up": "^7.0.1", - "semver": "^7.3.5" + "semver": "^7.3.7" }, "devDependencies": { "@testing-library/dom": "^8.13.0", "@testing-library/jest-dom": "^5.16.4", - "eslint": "^8.12.0", + "eslint": "^8.17.0", "eslint-find-rules": "^4.1.0", "husky": "^7.0.4", "jest": "^27.5.1", @@ -57,7 +57,7 @@ "prettier": "2.6.2", "pretty-quick": "^3.1.3", "react": "^17.0.2", - "typescript": "^4.6.3" + "typescript": "^4.7.3" }, "peerDependencies": { "eslint": "^8.0.0", diff --git a/react.js b/react.js index 469e3f8..018cde4 100644 --- a/react.js +++ b/react.js @@ -68,6 +68,7 @@ module.exports = { 'react/jsx-no-comment-textnodes': 'error', 'react/jsx-no-constructed-context-values': 'off', 'react/jsx-no-duplicate-props': 'error', + 'react/jsx-no-leaked-render': ['error', {validStrategies: ['ternary']}], 'react/jsx-no-literals': 'off', 'react/jsx-no-script-url': 'error', 'react/jsx-no-target-blank': 'error',