@wistia/eslint-config 0.40.0 → 0.40.2
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": "@wistia/eslint-config",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.2",
|
|
4
4
|
"description": "Wistia's ESLint configurations",
|
|
5
5
|
"packageManager": "yarn@4.8.1",
|
|
6
6
|
"main": "react.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"lint": "ESLINT_USE_FLAT_CONFIG=true eslint --config eslint.config.mjs .",
|
|
36
36
|
"lint:debug": "ESLINT_USE_FLAT_CONFIG=true eslint --config eslint.config.mjs --print-config eslint.config.mjs",
|
|
37
37
|
"outdated": "yarn upgrade-interactive",
|
|
38
|
-
"prepare": "husky
|
|
38
|
+
"prepare": "husky",
|
|
39
39
|
"release": "changeset publish",
|
|
40
40
|
"test": "vitest run",
|
|
41
41
|
"test:export": "check-export-map",
|
|
@@ -247,13 +247,17 @@ module.exports = {
|
|
|
247
247
|
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/tabindex-no-positive.md
|
|
248
248
|
'jsx-a11y/tabindex-no-positive': 'error',
|
|
249
249
|
|
|
250
|
-
//
|
|
251
|
-
//
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
//
|
|
255
|
-
// https://github.com/
|
|
256
|
-
|
|
257
|
-
|
|
250
|
+
// Enforce <a> text to not exactly match "click here", "here", "link", or "a link"
|
|
251
|
+
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/anchor-ambiguous-text.md
|
|
252
|
+
'jsx-a11y/anchor-ambiguous-text': 'error',
|
|
253
|
+
|
|
254
|
+
// Disallow aria-hidden="true" from being set on focusable elements
|
|
255
|
+
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-aria-hidden-on-focusable.md
|
|
256
|
+
'jsx-a11y/no-aria-hidden-on-focusable': 'error',
|
|
257
|
+
|
|
258
|
+
// Enforces using semantic DOM elements over the ARIA role property
|
|
259
|
+
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/prefer-tag-over-role.md
|
|
260
|
+
// decision: best left to the implementer to decide on this
|
|
261
|
+
'jsx-a11y/prefer-tag-over-role': 'off',
|
|
258
262
|
},
|
|
259
263
|
};
|
package/rules/eslint/react.cjs
CHANGED
|
@@ -20,22 +20,22 @@ module.exports = {
|
|
|
20
20
|
'error',
|
|
21
21
|
{
|
|
22
22
|
exceptMethods: [
|
|
23
|
-
'render',
|
|
24
|
-
'getInitialState',
|
|
25
|
-
'getDefaultProps',
|
|
26
|
-
'getChildContext',
|
|
27
|
-
'componentWillMount',
|
|
28
23
|
'UNSAFE_componentWillMount',
|
|
29
|
-
'componentDidMount',
|
|
30
|
-
'componentWillReceiveProps',
|
|
31
24
|
'UNSAFE_componentWillReceiveProps',
|
|
32
|
-
'shouldComponentUpdate',
|
|
33
|
-
'componentWillUpdate',
|
|
34
25
|
'UNSAFE_componentWillUpdate',
|
|
26
|
+
'componentDidCatch',
|
|
27
|
+
'componentDidMount',
|
|
35
28
|
'componentDidUpdate',
|
|
29
|
+
'componentWillMount',
|
|
30
|
+
'componentWillReceiveProps',
|
|
36
31
|
'componentWillUnmount',
|
|
37
|
-
'
|
|
32
|
+
'componentWillUpdate',
|
|
33
|
+
'getChildContext',
|
|
34
|
+
'getDefaultProps',
|
|
35
|
+
'getInitialState',
|
|
38
36
|
'getSnapshotBeforeUpdate',
|
|
37
|
+
'render',
|
|
38
|
+
'shouldComponentUpdate',
|
|
39
39
|
],
|
|
40
40
|
},
|
|
41
41
|
],
|
|
@@ -628,7 +628,7 @@ module.exports = {
|
|
|
628
628
|
|
|
629
629
|
// Enforce using `onChange` or `readonly` attribute when `checked` is used
|
|
630
630
|
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/checked-requires-onchange-or-readonly.md
|
|
631
|
-
|
|
631
|
+
'react/checked-requires-onchange-or-readonly': 'error',
|
|
632
632
|
|
|
633
633
|
// Disallow usage of referential-type variables as default param in functional component
|
|
634
634
|
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-object-type-as-default-prop.md
|
|
@@ -638,6 +638,14 @@ module.exports = {
|
|
|
638
638
|
// This rule is deprecated. It was replaced by `react/sort-default-props`
|
|
639
639
|
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-sort-default-props.md
|
|
640
640
|
'react/jsx-sort-default-props': 'off',
|
|
641
|
+
|
|
642
|
+
// Require all forwardRef components include a ref parameter
|
|
643
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forward-ref-uses-ref.md
|
|
644
|
+
'react/forward-ref-uses-ref': 'error',
|
|
645
|
+
|
|
646
|
+
// Disallow JSX prop spreading the same identifier multiple times
|
|
647
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spread-multi.md
|
|
648
|
+
'react/jsx-props-no-spread-multi': 'error',
|
|
641
649
|
},
|
|
642
650
|
|
|
643
651
|
settings: {
|
|
@@ -123,6 +123,10 @@ module.exports = {
|
|
|
123
123
|
// https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/render-result-naming-convention.md
|
|
124
124
|
'testing-library/render-result-naming-convention': 'error',
|
|
125
125
|
|
|
126
|
+
// Suggest using implicit assertions for getBy* & findBy* queries
|
|
127
|
+
// https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-implicit-assert.md
|
|
128
|
+
'testing-library/prefer-implicit-assert': 'error',
|
|
129
|
+
|
|
126
130
|
// Prefer toBeChecked over checking attributes
|
|
127
131
|
// https://github.com/testing-library/eslint-plugin-jest-dom/blob/main/docs/rules/prefer-checked.md
|
|
128
132
|
'jest-dom/prefer-checked': 'error',
|