@wistia/eslint-config 0.40.2 → 0.41.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": "@wistia/eslint-config",
3
- "version": "0.40.2",
3
+ "version": "0.41.0",
4
4
  "description": "Wistia's ESLint configurations",
5
5
  "packageManager": "yarn@4.8.1",
6
6
  "main": "react.js",
@@ -14,7 +14,6 @@
14
14
  "./cypress": "./configs/eslint/cypress.cjs",
15
15
  "./functional-programming": "./configs/eslint/functional-programming.cjs",
16
16
  "./jest": "./configs/eslint/jest.cjs",
17
- "./jsdoc": "./configs/eslint/jsdoc.cjs",
18
17
  "./node": "./configs/eslint/node.cjs",
19
18
  "./prettier": "./configs/eslint/prettier.cjs",
20
19
  "./react": "./configs/eslint/react.cjs",
@@ -72,7 +71,6 @@
72
71
  "eslint-plugin-jest": "^28.11.0",
73
72
  "eslint-plugin-jest-dom": "^5.5.0",
74
73
  "eslint-plugin-jest-formatting": "^3.1.0",
75
- "eslint-plugin-jsdoc": "^50.6.9",
76
74
  "eslint-plugin-jsx-a11y": "^6.10.2",
77
75
  "eslint-plugin-n": "^17.17.0",
78
76
  "eslint-plugin-no-only-tests": "^3.3.0",
@@ -319,17 +319,19 @@ module.exports = {
319
319
  // https://eslint.org/docs/rules/no-restricted-globals
320
320
  'no-restricted-globals': [
321
321
  'error',
322
+ ...confusingBrowserGlobals.map((name) => ({
323
+ name,
324
+ message: `'${name}' should be written as 'window.${name}' or 'document.${name}' instead.`,
325
+ })),
322
326
  {
323
327
  name: 'isFinite',
324
- message:
325
- 'Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite',
328
+ message: 'Use Number.isFinite instead...',
326
329
  },
327
330
  {
328
331
  name: 'isNaN',
329
- message:
330
- 'Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan',
332
+ message: 'Use Number.isNaN instead...',
331
333
  },
332
- ].concat(confusingBrowserGlobals),
334
+ ],
333
335
 
334
336
  // disallow specific imports
335
337
  // https://eslint.org/docs/rules/no-restricted-imports
@@ -125,7 +125,8 @@ module.exports = {
125
125
 
126
126
  // Suggest using implicit assertions for getBy* & findBy* queries
127
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',
128
+ // decision: this is an alternative to `prefer-explicit-assert` and both cannot be used together
129
+ 'testing-library/prefer-implicit-assert': 'off',
129
130
 
130
131
  // Prefer toBeChecked over checking attributes
131
132
  // https://github.com/testing-library/eslint-plugin-jest-dom/blob/main/docs/rules/prefer-checked.md
@@ -1,9 +0,0 @@
1
- require('@rushstack/eslint-patch/modern-module-resolution');
2
-
3
- module.exports = {
4
- env: {
5
- node: true,
6
- },
7
-
8
- extends: ['../../rules/eslint/jsdoc.cjs'].map(require.resolve),
9
- };
@@ -1,56 +0,0 @@
1
- // only add jsdocs rules
2
- // see: https://github.com/gajus/eslint-plugin-jsdoc#rules
3
-
4
- module.exports = {
5
- plugins: ['eslint-plugin-jsdoc'],
6
-
7
- rules: {
8
- 'jsdoc/check-access': 'error',
9
- 'jsdoc/check-alignment': 'error',
10
- 'jsdoc/check-examples': 'error',
11
- 'jsdoc/check-indentation': 'error',
12
- 'jsdoc/check-line-alignment': 'error',
13
- 'jsdoc/check-param-names': 'error',
14
- 'jsdoc/check-property-names': 'error',
15
- 'jsdoc/check-syntax': 'error',
16
- 'jsdoc/check-tag-names': 'error',
17
- 'jsdoc/check-types': 'error',
18
- 'jsdoc/check-values': 'error',
19
- 'jsdoc/empty-tags': 'error',
20
- 'jsdoc/implements-on-classes': 'error',
21
- 'jsdoc/match-description': 'error',
22
- 'jsdoc/multiline-blocks': 'error',
23
- 'jsdoc/newline-after-description': 'error',
24
- 'jsdoc/no-bad-blocks': 'error',
25
- 'jsdoc/no-defaults': 'error',
26
- 'jsdoc/no-missing-syntax': 'error',
27
- 'jsdoc/no-multi-asterisks': 'error',
28
- 'jsdoc/no-restricted-syntax': 'error',
29
- 'jsdoc/no-types': 'error',
30
- 'jsdoc/no-undefined-types': 'error',
31
- 'jsdoc/require-asterisk-prefix': 'error',
32
- 'jsdoc/require-description': 'error',
33
- 'jsdoc/require-description-complete-sentence': 'error',
34
- 'jsdoc/require-example': 'error',
35
- 'jsdoc/require-file-overview': 'error',
36
- 'jsdoc/require-hyphen-before-param-description': 'error',
37
- 'jsdoc/require-jsdoc': 'error',
38
- 'jsdoc/require-param': 'error',
39
- 'jsdoc/require-param-description': 'error',
40
- 'jsdoc/require-param-name': 'error',
41
- 'jsdoc/require-param-type': 'error',
42
- 'jsdoc/require-property': 'error',
43
- 'jsdoc/require-property-description': 'error',
44
- 'jsdoc/require-property-name': 'error',
45
- 'jsdoc/require-property-type': 'error',
46
- 'jsdoc/require-returns': 'error',
47
- 'jsdoc/require-returns-check': 'error',
48
- 'jsdoc/require-returns-description': 'error',
49
- 'jsdoc/require-returns-type': 'error',
50
- 'jsdoc/require-throws': 'error',
51
- 'jsdoc/require-yields': 'error',
52
- 'jsdoc/require-yields-check': 'error',
53
- 'jsdoc/tag-lines': 'error',
54
- 'jsdoc/valid-types': 'error',
55
- },
56
- };