@perfective/eslint-config-react 0.7.0 → 0.8.0-beta.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perfective/eslint-config-react",
3
- "version": "0.7.0",
3
+ "version": "0.8.0-beta.1",
4
4
  "description": "ESLint shareable rules configuration for React",
5
5
  "keywords": ["react", "code quality", "code standard", "code style", "eslint", "eslint-config", "lint", "perfective", "typescript"],
6
6
  "author": "Andrey Mikheychik <a.mikheychik@gmail.com>",
@@ -11,12 +11,12 @@
11
11
  },
12
12
  "license": "MIT",
13
13
  "dependencies": {
14
- "@perfective/eslint-config": "~0.17.0"
14
+ "@perfective/eslint-config": "~0.18.0-beta.1"
15
15
  },
16
16
  "peerDependencies": {
17
- "eslint-plugin-jsx-a11y": "^6.5.1",
18
- "eslint-plugin-react": "^7.28.0",
19
- "eslint-plugin-react-hooks": "^4.3.0",
17
+ "eslint-plugin-jsx-a11y": "^6.6.0",
18
+ "eslint-plugin-react": "^7.30.1",
19
+ "eslint-plugin-react-hooks": "^4.6.0",
20
20
  "eslint-plugin-react-hooks-ssr": "^0.1.5",
21
21
  "eslint-plugin-react-perf": "^3.3.1"
22
22
  },
@@ -18,6 +18,7 @@ module.exports = {
18
18
  'jsx-a11y/aria-props': 'error',
19
19
  'jsx-a11y/aria-proptypes': 'error',
20
20
  'jsx-a11y/aria-role': ['error', {
21
+ allowedInvalidRoles: [],
21
22
  ignoreNonDOM: false,
22
23
  }],
23
24
  'jsx-a11y/aria-unsupported-elements': 'error',
@@ -39,6 +39,8 @@ module.exports = {
39
39
  namedComponents: 'function-declaration',
40
40
  unnamedComponents: 'function-expression',
41
41
  }],
42
+ 'react/hook-use-state': 'error',
43
+ 'react/iframe-missing-sandbox': 'error',
42
44
  'react/no-access-state-in-setstate': 'error',
43
45
  'react/no-adjacent-inline-elements': 'error',
44
46
  'react/no-array-index-key': 'error',
@@ -11,6 +11,7 @@ module.exports = {
11
11
  'react/jsx-curly-brace-presence': ['warn', {
12
12
  props: 'never',
13
13
  children: 'always',
14
+ propElementValues: 'always',
14
15
  }],
15
16
  'react/jsx-curly-newline': ['warn', 'never'],
16
17
  'react/jsx-curly-spacing': ['warn', {
@@ -46,6 +47,7 @@ module.exports = {
46
47
  'react/jsx-key': ['error', {
47
48
  checkFragmentShorthand: true,
48
49
  checkKeyMustBeforeSpread: true,
50
+ warnDuplicates: true,
49
51
  }],
50
52
  'react/jsx-max-depth': ['error', {
51
53
  max: 4,
@@ -66,6 +68,9 @@ module.exports = {
66
68
  'react/jsx-no-duplicate-props': ['error', {
67
69
  ignoreCase: true,
68
70
  }],
71
+ 'react/jsx-no-leaked-render': ['warn', {
72
+ validStrategies: ['ternary'],
73
+ }],
69
74
  'react/jsx-no-literals': ['error', {
70
75
  noStrings: false,
71
76
  allowedStrings: [],
@@ -110,8 +115,10 @@ module.exports = {
110
115
  callbacksLast: true,
111
116
  shorthandFirst: true,
112
117
  shorthandLast: false,
118
+ multiline: 'ignore',
113
119
  noSortAlphabetically: false,
114
120
  reservedFirst: true,
121
+ locale: 'auto',
115
122
  }],
116
123
  'react/jsx-space-before-closing': 'off',
117
124
  'react/jsx-tag-spacing': ['warn', {