eslint-config-react-app 7.0.0-next.91 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +3 -9
  2. package/base.js +1 -1
  3. package/jest.js +15 -2
  4. package/package.json +17 -17
package/README.md CHANGED
@@ -16,10 +16,10 @@ The easiest way to use this configuration is with [Create React App](https://git
16
16
 
17
17
  If you want to use this ESLint configuration in a project not built with Create React App, you can install it with the following steps.
18
18
 
19
- First, install this package, ESLint and the necessary plugins. Note that when using npm 7 (or greater) this step is not required, as npm will automatically install peer dependencies.
19
+ First, install this package and ESLint.
20
20
 
21
21
  ```sh
22
- npm install --save-dev eslint-config-react-app @babel/eslint-parser@^7.14.7 @typescript-eslint/eslint-plugin@^4.0.0 @typescript-eslint/parser@^4.0.0 babel-preset-react-app@^10.0.0 eslint@^7.5.0 eslint-plugin-flowtype@^5.2.0 eslint-plugin-import@^2.22.0 eslint-plugin-jsx-a11y@^6.3.1 eslint-plugin-react@^7.20.3 eslint-plugin-react-hooks@^4.0.8
22
+ npm install --save-dev eslint-config-react-app eslint@^8.0.0
23
23
  ```
24
24
 
25
25
  Then create a file named `.eslintrc.json` with following contents in the root folder of your project:
@@ -36,13 +36,7 @@ That's it! You can override the settings from `eslint-config-react-app` by editi
36
36
 
37
37
  This config also ships with optional Jest rules for ESLint (based on [`eslint-plugin-jest`](https://github.com/jest-community/eslint-plugin-jest)).
38
38
 
39
- You'll first need to add the ESLint plugin for Jest (if you don't already have it installed).
40
-
41
- ```sh
42
- npm install --save-dev eslint-plugin-jest@^24.0.0 eslint-plugin-testing-library@^3.9.0
43
- ```
44
-
45
- You can then enable these rules by adding the Jest config to the `extends` array in your ESLint config.
39
+ You can enable these rules by adding the Jest config to the `extends` array in your ESLint config.
46
40
 
47
41
  ```json
48
42
  {
package/base.js CHANGED
@@ -33,7 +33,7 @@ module.exports = {
33
33
  sourceType: 'module',
34
34
  requireConfigFile: false,
35
35
  babelOptions: {
36
- presets: ['babel-preset-react-app/prod'],
36
+ presets: [require.resolve('babel-preset-react-app/prod')],
37
37
  },
38
38
  },
39
39
 
package/jest.js CHANGED
@@ -31,7 +31,7 @@ module.exports = {
31
31
  'jest/no-jasmine-globals': 'error',
32
32
  'jest/no-jest-import': 'error',
33
33
  'jest/no-mocks-import': 'error',
34
- 'jest/valid-describe': 'error',
34
+ 'jest/valid-describe-callback': 'error',
35
35
  'jest/valid-expect': 'error',
36
36
  'jest/valid-expect-in-promise': 'error',
37
37
  'jest/valid-title': 'warn',
@@ -39,10 +39,23 @@ module.exports = {
39
39
  // https://github.com/testing-library/eslint-plugin-testing-library
40
40
  'testing-library/await-async-query': 'error',
41
41
  'testing-library/await-async-utils': 'error',
42
- 'testing-library/no-await-sync-query': 'warn',
42
+ 'testing-library/no-await-sync-query': 'error',
43
+ 'testing-library/no-container': 'error',
44
+ 'testing-library/no-debugging-utils': 'error',
43
45
  'testing-library/no-dom-import': ['error', 'react'],
46
+ 'testing-library/no-node-access': 'error',
47
+ 'testing-library/no-promise-in-fire-event': 'error',
48
+ 'testing-library/no-render-in-setup': 'error',
49
+ 'testing-library/no-unnecessary-act': 'error',
44
50
  'testing-library/no-wait-for-empty-callback': 'error',
51
+ 'testing-library/no-wait-for-multiple-assertions': 'error',
52
+ 'testing-library/no-wait-for-side-effects': 'error',
45
53
  'testing-library/no-wait-for-snapshot': 'error',
54
+ 'testing-library/prefer-find-by': 'error',
55
+ 'testing-library/prefer-presence-queries': 'error',
56
+ 'testing-library/prefer-query-by-disappearance': 'error',
57
+ 'testing-library/prefer-screen-queries': 'error',
58
+ 'testing-library/render-result-naming-convention': 'error',
46
59
  },
47
60
  },
48
61
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-react-app",
3
- "version": "7.0.0-next.91+1465357b",
3
+ "version": "7.0.0",
4
4
  "description": "ESLint configuration used by Create React App",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,26 +17,26 @@
17
17
  "jest.js"
18
18
  ],
19
19
  "peerDependencies": {
20
- "eslint": "^7.30.0"
20
+ "eslint": "^8.0.0"
21
21
  },
22
22
  "dependencies": {
23
- "@babel/core": "^7.14.2",
24
- "@babel/eslint-parser": "^7.14.7",
25
- "@rushstack/eslint-patch": "^1.0.6",
26
- "@typescript-eslint/eslint-plugin": "^4.0.0",
27
- "@typescript-eslint/parser": "^4.0.0",
28
- "babel-preset-react-app": "11.0.0-next.91+1465357b",
29
- "confusing-browser-globals": "2.0.0-next.91+1465357b",
30
- "eslint-plugin-flowtype": "^5.2.0",
31
- "eslint-plugin-import": "^2.22.0",
32
- "eslint-plugin-jest": "^24.0.0",
33
- "eslint-plugin-jsx-a11y": "^6.3.1",
34
- "eslint-plugin-react": "^7.20.3",
35
- "eslint-plugin-react-hooks": "^4.0.8",
36
- "eslint-plugin-testing-library": "^3.9.0"
23
+ "@babel/core": "^7.16.0",
24
+ "@babel/eslint-parser": "^7.16.3",
25
+ "@rushstack/eslint-patch": "^1.1.0",
26
+ "@typescript-eslint/eslint-plugin": "^5.5.0",
27
+ "@typescript-eslint/parser": "^5.5.0",
28
+ "babel-preset-react-app": "^10.0.1",
29
+ "confusing-browser-globals": "^1.0.11",
30
+ "eslint-plugin-flowtype": "^8.0.3",
31
+ "eslint-plugin-import": "^2.25.3",
32
+ "eslint-plugin-jest": "^25.3.0",
33
+ "eslint-plugin-jsx-a11y": "^6.5.1",
34
+ "eslint-plugin-react": "^7.27.1",
35
+ "eslint-plugin-react-hooks": "^4.3.0",
36
+ "eslint-plugin-testing-library": "^5.0.1"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=14.0.0"
40
40
  },
41
- "gitHead": "1465357b842eae16b2b52243d2e55db9a17f0425"
41
+ "gitHead": "221e511730ca51c036c6954a9d2ee7659ff860f9"
42
42
  }