@perfective/eslint-config-react 0.12.3 → 0.14.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perfective/eslint-config-react",
3
- "version": "0.12.3",
3
+ "version": "0.14.0",
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,14 +11,14 @@
11
11
  },
12
12
  "license": "MIT",
13
13
  "dependencies": {
14
- "@perfective/eslint-config": "~0.23.4"
14
+ "@perfective/eslint-config": "~0.25.1"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "eslint-plugin-jsx-a11y": "^6.8.0",
18
- "eslint-plugin-react": "^7.33.2",
19
- "eslint-plugin-react-hooks": "^4.6.0",
18
+ "eslint-plugin-react": "^7.34.2",
19
+ "eslint-plugin-react-hooks": "^4.6.2",
20
20
  "eslint-plugin-react-hooks-ssr": "^0.1.5",
21
- "eslint-plugin-react-perf": "^3.3.1"
21
+ "eslint-plugin-react-perf": "^3.3.2"
22
22
  },
23
23
  "overrides": {
24
24
  "glob-parent": "^5.1.2"
@@ -17,6 +17,7 @@ module.exports = {
17
17
  submit: true,
18
18
  reset: true,
19
19
  }],
20
+ 'react/checked-requires-onchange-or-readonly': 'error',
20
21
  'react/default-props-match-prop-types': 'error',
21
22
  'react/destructuring-assignment': ['error', 'never'],
22
23
  'react/display-name': ['error', {
@@ -76,7 +77,10 @@ module.exports = {
76
77
  'react/no-unescaped-entities': ['error', {
77
78
  forbid: ['>', '}'],
78
79
  }],
79
- 'react/no-unknown-property': 'warn',
80
+ 'react/no-unknown-property': ['warn', {
81
+ ignore: [],
82
+ requireDataLowercase: true,
83
+ }],
80
84
  'react/no-unsafe': 'error',
81
85
  'react/no-unstable-nested-components': ['error', {
82
86
  allowAsProps: false,
@@ -2,33 +2,19 @@
2
2
  module.exports = {
3
3
  rules: {
4
4
  'react/jsx-boolean-value': ['warn', 'always'],
5
- 'react/jsx-child-element-spacing': 'error',
6
- 'react/jsx-closing-bracket-location': ['warn', {
7
- selfClosing: 'after-props',
8
- nonEmpty: 'after-props',
9
- }],
10
- 'react/jsx-closing-tag-location': 'warn',
11
- 'react/jsx-curly-brace-presence': ['warn', {
12
- props: 'never',
13
- children: 'always',
14
- propElementValues: 'always',
15
- }],
16
- 'react/jsx-curly-newline': ['warn', 'never'],
17
- 'react/jsx-curly-spacing': ['warn', {
18
- when: 'never',
19
- attributes: {
20
- allowMultiline: false,
21
- },
22
- children: {
23
- allowMultiline: false,
24
- },
25
- }],
26
- 'react/jsx-equals-spacing': ['warn', 'never'],
5
+ 'react/jsx-child-element-spacing': 'off',
6
+ 'react/jsx-closing-bracket-location': 'off',
7
+ 'react/jsx-closing-tag-location': 'off',
8
+ 'react/jsx-curly-brace-presence': 'off',
9
+ 'react/jsx-curly-newline': 'off',
10
+ 'react/jsx-curly-spacing': 'off',
11
+ 'react/jsx-equals-spacing': 'off',
27
12
  'react/jsx-filename-extension': ['error', {
28
13
  allow: 'always',
29
14
  extensions: ['.jsx', '.tsx'],
15
+ ignoreFilesWithoutCode: false,
30
16
  }],
31
- 'react/jsx-first-prop-new-line': ['warn', 'multiline-multiprop'],
17
+ 'react/jsx-first-prop-new-line': 'off',
32
18
  'react/jsx-fragments': ['warn', 'element'],
33
19
  'react/jsx-handler-names': ['error', {
34
20
  eventHandlerPrefix: 'handle',
@@ -36,14 +22,8 @@ module.exports = {
36
22
  checkLocalVariables: true,
37
23
  checkInlineFunction: true,
38
24
  }],
39
- 'react/jsx-indent': ['warn', 4, {
40
- checkAttributes: true,
41
- indentLogicalExpressions: true,
42
- }],
43
- 'react/jsx-indent-props': ['warn', {
44
- indentMode: 1,
45
- ignoreTernaryOperator: false,
46
- }],
25
+ 'react/jsx-indent': 'off',
26
+ 'react/jsx-indent-props': 'off',
47
27
  'react/jsx-key': ['error', {
48
28
  checkFragmentShorthand: true,
49
29
  checkKeyMustBeforeSpread: true,
@@ -52,10 +32,7 @@ module.exports = {
52
32
  'react/jsx-max-depth': ['error', {
53
33
  max: 4,
54
34
  }],
55
- 'react/jsx-max-props-per-line': ['warn', {
56
- maximum: 1,
57
- when: 'always',
58
- }],
35
+ 'react/jsx-max-props-per-line': 'off',
59
36
  'react/jsx-newline': 'off',
60
37
  'react/jsx-no-bind': ['error', {
61
38
  ignoreDOMComponents: false,
@@ -77,7 +54,9 @@ module.exports = {
77
54
  ignoreProps: true,
78
55
  noAttributeStrings: false,
79
56
  }],
80
- 'react/jsx-no-script-url': 'error',
57
+ 'react/jsx-no-script-url': ['error', {
58
+ includeFromSettings: false,
59
+ }],
81
60
  'react/jsx-no-target-blank': ['warn', {
82
61
  allowReferrer: false,
83
62
  enforceDynamicLinks: 'always',
@@ -91,16 +70,9 @@ module.exports = {
91
70
  'react/jsx-no-useless-fragment': ['warn', {
92
71
  allowExpressions: true,
93
72
  }],
94
- 'react/jsx-one-expression-per-line': ['warn', {
95
- allow: 'single-child',
96
- }],
97
- 'react/jsx-pascal-case': ['error', {
98
- allowAllCaps: false,
99
- allowLeadingUnderscore: false,
100
- allowNamespace: false,
101
- ignore: [],
102
- }],
103
- 'react/jsx-props-no-multi-spaces': 'warn',
73
+ 'react/jsx-one-expression-per-line': 'off',
74
+ 'react/jsx-pascal-case': 'off',
75
+ 'react/jsx-props-no-multi-spaces': 'off',
104
76
  'react/jsx-props-no-spreading': ['error', {
105
77
  html: 'enforce',
106
78
  custom: 'enforce',
@@ -108,33 +80,11 @@ module.exports = {
108
80
  exceptions: [],
109
81
  }],
110
82
  'react/jsx-sort-default-props': 'off',
111
- 'react/jsx-sort-props': ['warn', {
112
- ignoreCase: false,
113
- callbacksLast: true,
114
- shorthandFirst: true,
115
- shorthandLast: false,
116
- multiline: 'ignore',
117
- noSortAlphabetically: false,
118
- reservedFirst: true,
119
- locale: 'auto',
120
- }],
83
+ 'react/jsx-sort-props': 'off',
121
84
  'react/jsx-space-before-closing': 'off',
122
- 'react/jsx-tag-spacing': ['warn', {
123
- closingSlash: 'never',
124
- beforeSelfClosing: 'always',
125
- afterOpening: 'never',
126
- beforeClosing: 'never',
127
- }],
85
+ 'react/jsx-tag-spacing': 'off',
128
86
  'react/jsx-uses-react': 'error',
129
87
  'react/jsx-uses-vars': 'error',
130
- 'react/jsx-wrap-multilines': ['warn', {
131
- declaration: 'parens-new-line',
132
- assignment: 'parens-new-line',
133
- return: 'parens-new-line',
134
- arrow: 'parens-new-line',
135
- condition: 'parens-new-line',
136
- logical: 'parens-new-line',
137
- prop: 'parens-new-line',
138
- }],
88
+ 'react/jsx-wrap-multilines': 'off',
139
89
  },
140
90
  };