eslint-config-seekingalpha-react 6.3.0 → 6.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 6.4.0 - 2023-01-11
4
+ - [deps] upgrade `eslint-plugin-jsx-a11y` to version `6.7.0`
5
+ - [deps] upgrade `eslint-plugin-react` to version `7.32.0`
6
+ - [breaking] update `react/hook-use-state` rule
7
+ - [breaking] introduce `jsx-a11y/prefer-tag-over-role` rule
8
+ - [breaking] introduce `react/no-object-type-as-default-prop` rule
9
+ - [breaking] `react/jsx-sort-default-props` deprecated, replace with `react/sort-default-props`
10
+
3
11
  ## 6.3.0 - 2023-01-03
4
12
  - [deps] upgrade `eslint` to version `8.31.0`
5
13
 
package/README.md CHANGED
@@ -6,7 +6,7 @@ This package includes the shareable ESLint config used by [SeekingAlpha](https:/
6
6
 
7
7
  Install ESLint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/):
8
8
 
9
- npm install eslint@8.31.0 eslint-plugin-jsx-a11y@6.6.1 eslint-plugin-react@7.31.11 eslint-plugin-react-hooks@4.6.0 --save-dev
9
+ npm install eslint@8.31.0 eslint-plugin-jsx-a11y@6.7.0 eslint-plugin-react@7.32.0 eslint-plugin-react-hooks@4.6.0 --save-dev
10
10
 
11
11
  Install SeekingAlpha shareable ESLint:
12
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-seekingalpha-react",
3
- "version": "6.3.0",
3
+ "version": "6.4.0",
4
4
  "description": "SeekingAlpha's sharable React.js ESLint config",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -50,15 +50,15 @@
50
50
  },
51
51
  "peerDependencies": {
52
52
  "eslint": "8.31.0",
53
- "eslint-plugin-jsx-a11y": "6.6.1",
54
- "eslint-plugin-react": "7.31.11",
53
+ "eslint-plugin-jsx-a11y": "6.7.0",
54
+ "eslint-plugin-react": "7.32.0",
55
55
  "eslint-plugin-react-hooks": "4.6.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "eslint": "8.31.0",
59
59
  "eslint-find-rules": "4.1.0",
60
- "eslint-plugin-jsx-a11y": "6.6.1",
61
- "eslint-plugin-react": "7.31.11",
60
+ "eslint-plugin-jsx-a11y": "6.7.0",
61
+ "eslint-plugin-react": "7.32.0",
62
62
  "eslint-plugin-react-hooks": "4.6.0"
63
63
  }
64
64
  }
@@ -295,6 +295,8 @@ module.exports = {
295
295
 
296
296
  'jsx-a11y/control-has-associated-label': 'error',
297
297
 
298
+ 'jsx-a11y/prefer-tag-over-role': 'error',
299
+
298
300
  },
299
301
 
300
302
  };
@@ -188,13 +188,8 @@ module.exports = {
188
188
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-multi-spaces.md
189
189
  'react/jsx-props-no-multi-spaces': 'error',
190
190
 
191
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-default-props.md
192
- 'react/jsx-sort-default-props': [
193
- 'off',
194
- {
195
- ignoreCase: true,
196
- },
197
- ],
191
+ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-default-props.md
192
+ 'react/sort-default-props': 'off',
198
193
 
199
194
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
200
195
  'react/jsx-sort-props': [
@@ -271,6 +266,9 @@ module.exports = {
271
266
 
272
267
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md
273
268
  'react/jsx-no-script-url': 'error',
269
+
270
+ 'react/no-object-type-as-default-prop': 'error',
271
+
274
272
  },
275
273
 
276
274
  };
@@ -157,7 +157,12 @@ module.exports = {
157
157
  ],
158
158
 
159
159
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md
160
- 'react/hook-use-state': 'error',
160
+ 'react/hook-use-state': [
161
+ 'error',
162
+ {
163
+ allowDestructuredState: true,
164
+ },
165
+ ],
161
166
 
162
167
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/iframe-missing-sandbox.md
163
168
  'react/iframe-missing-sandbox': 'error',