From ed7570ff9194cb166d893965e16b2e6b44e9307e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Mon, 7 Mar 2022 18:20:53 +0100 Subject: [PATCH] feat: update dependencies & add new rules (#129) Co-authored-by: Kent C. Dodds --- jest.js | 4 ++++ package.json | 22 +++++++++++----------- react.js | 2 ++ 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/jest.js b/jest.js index db94088..f94be54 100644 --- a/jest.js +++ b/jest.js @@ -47,6 +47,7 @@ module.exports = { 'jest/no-alias-methods': 'off', 'jest/no-commented-out-tests': 'warn', 'jest/no-conditional-expect': 'error', + 'jest/no-conditional-in-test': 'error', 'jest/no-deprecated-functions': 'error', 'jest/no-disabled-tests': 'warn', 'jest/no-done-callback': 'error', @@ -66,10 +67,13 @@ module.exports = { 'jest/no-test-prefixes': 'error', 'jest/no-test-return-statement': 'off', 'jest/prefer-called-with': 'error', + 'jest/prefer-comparison-matcher': 'error', + 'jest/prefer-equality-matcher': 'error', 'jest/prefer-expect-assertions': 'off', 'jest/prefer-expect-resolves': 'off', 'jest/prefer-hooks-on-top': 'error', 'jest/prefer-lowercase-title': 'off', + 'jest/prefer-snapshot-hint': 'error', 'jest/prefer-spy-on': 'off', 'jest/prefer-strict-equal': 'off', 'jest/prefer-to-be': 'off', diff --git a/package.json b/package.json index 1878c04..c362b0c 100644 --- a/package.json +++ b/package.json @@ -33,31 +33,31 @@ }, "homepage": "https://github.com/kentcdodds/eslint-config-kentcdodds#readme", "dependencies": { - "@typescript-eslint/eslint-plugin": "^5.9.0", - "@typescript-eslint/parser": "^5.9.0", - "eslint-config-prettier": "^8.3.0", + "@typescript-eslint/eslint-plugin": "^5.13.0", + "@typescript-eslint/parser": "^5.13.0", + "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.25.4", - "eslint-plugin-jest": "^25.3.4", + "eslint-plugin-jest": "^26.1.1", "eslint-plugin-jest-dom": "^4.0.1", "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-react": "^7.28.0", + "eslint-plugin-react": "^7.29.3", "eslint-plugin-react-hooks": "^4.3.0", - "eslint-plugin-testing-library": "^5.0.1", + "eslint-plugin-testing-library": "^5.0.6", "read-pkg-up": "^7.0.1", "semver": "^7.3.5" }, "devDependencies": { - "@testing-library/dom": "^8.11.1", - "@testing-library/jest-dom": "^5.16.1", - "eslint": "^8.6.0", + "@testing-library/dom": "^8.11.3", + "@testing-library/jest-dom": "^5.16.2", + "eslint": "^8.10.0", "eslint-find-rules": "^4.1.0", "husky": "^7.0.4", - "jest": "^27.4.7", + "jest": "^27.5.1", "npm-run-all": "^4.1.5", "prettier": "^2.5.1", "pretty-quick": "^3.1.3", "react": "^17.0.2", - "typescript": "^4.5.4" + "typescript": "^4.6.2" }, "peerDependencies": { "eslint": "^8.0.0", diff --git a/react.js b/react.js index 77405a5..469e3f8 100644 --- a/react.js +++ b/react.js @@ -51,6 +51,8 @@ module.exports = { 'react/forbid-foreign-prop-types': hasPropTypes ? 'error' : 'off', 'react/forbid-prop-types': 'off', 'react/function-component-definition': 'off', + 'react/hook-use-state': 'off', + 'react/iframe-missing-sandbox': 'warn', 'react/jsx-boolean-value': 'off', 'react/jsx-curly-brace-presence': [ 'warn',