@wistia/eslint-config 0.19.2 → 0.19.4

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.19.2",
3
+ "version": "0.19.4",
4
4
  "description": "Wistia's ESLint configurations",
5
5
  "main": "react.js",
6
6
  "exports": {
@@ -37,7 +37,7 @@
37
37
  "@typescript-eslint/eslint-plugin": "^5.58.0",
38
38
  "@typescript-eslint/parser": "^5.58.0",
39
39
  "confusing-browser-globals": "^1.0.11",
40
- "eslint": "^8.38.0",
40
+ "eslint": "^8.41.0",
41
41
  "eslint-config-prettier": "^8.8.0",
42
42
  "eslint-import-resolver-typescript": "^3.5.5",
43
43
  "eslint-plugin-better-styled-components": "^1.1.2",
@@ -47,7 +47,7 @@
47
47
  "eslint-plugin-jest": "^27.2.1",
48
48
  "eslint-plugin-jest-dom": "^4.0.3",
49
49
  "eslint-plugin-jest-formatting": "^3.1.0",
50
- "eslint-plugin-jsdoc": "^41.1.0",
50
+ "eslint-plugin-jsdoc": "^44.2.4",
51
51
  "eslint-plugin-jsx-a11y": "^6.7.1",
52
52
  "eslint-plugin-no-only-tests": "^3.1.0",
53
53
  "eslint-plugin-no-snapshot-testing": "^1.0.61",
@@ -58,7 +58,7 @@
58
58
  "eslint-plugin-react-hooks": "^4.6.0",
59
59
  "eslint-plugin-sonarjs": "^0.19.0",
60
60
  "eslint-plugin-storybook": "^0.6.11",
61
- "eslint-plugin-styled-components-a11y": "^0.1.0",
61
+ "eslint-plugin-styled-components-a11y": "^2.0.0",
62
62
  "eslint-plugin-testing-library": "^5.10.2",
63
63
  "postcss": "^8.4.21",
64
64
  "postcss-scss": "^4.0.6",
@@ -68,7 +68,7 @@
68
68
  "stylelint-config-prettier": "^9.0.5",
69
69
  "stylelint-declaration-block-no-ignored-properties": "^2.7.0",
70
70
  "stylelint-prettier": "^3.0.0",
71
- "stylelint-scss": "^4.6.0"
71
+ "stylelint-scss": "^5.0.0"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@commitlint/cli": "^17.5.1",
@@ -5,62 +5,67 @@ module.exports = {
5
5
  plugins: ['eslint-plugin-storybook'],
6
6
 
7
7
  rules: {
8
- // storybook 6 requires default exports in stories
8
+ // storybook 7 requires default exports in stories
9
9
  'import/no-anonymous-default-export': 'off',
10
10
  'import/no-default-export': 'off',
11
11
  'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
12
12
  'import/prefer-default-export': 'error',
13
13
 
14
+ // ...and the default export is always called `meta` so the filenames
15
+ // will never match the exported name
16
+ 'filenames/match-exported': 'off',
17
+
14
18
  // Interactions should be awaited
15
- // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/storybook/await-interactions.md
19
+ // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/await-interactions.md
16
20
  'storybook/await-interactions': 'error',
17
21
 
18
22
  // Pass a context when invoking play function of another story
19
- // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/storybook/context-in-play-function.md
23
+ // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/context-in-play-function.md
20
24
  'storybook/context-in-play-function': 'error',
21
25
 
22
26
  // The component property should be set
23
- // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/storybook/csf-component.md
27
+ // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/csf-component.md
24
28
  'storybook/csf-component': 'error',
25
29
 
26
30
  // Story files should have a default export
27
- // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/storybook/default-exports.md
31
+ // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/default-exports.md
28
32
  'storybook/default-exports': 'error',
29
33
 
30
34
  // Deprecated hierarchy separator in title property
31
- // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/storybook/hierarchy-separator.md
35
+ // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/hierarchy-separator.md
32
36
  'storybook/hierarchy-separator': 'error',
33
37
 
34
38
  // A story should not have a redundant name property
35
- // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/storybook/no-redundant-story-name.md
39
+ // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/no-redundant-story-name.md
36
40
  'storybook/no-redundant-story-name': 'error',
37
41
 
38
42
  // storiesOf is deprecated and should not be used
39
- // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/storybook/no-stories-of.md
43
+ // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/no-stories-of.md
40
44
  'storybook/no-stories-of': 'error',
41
45
 
42
46
  // Do not define a title in meta
43
- // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/storybook/no-title-property-in-meta.md
44
- 'storybook/no-title-property-in-meta': 'error',
47
+ // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/no-title-property-in-meta.md
48
+ // decision: we use the title property to group stories in the sidepanel
49
+ 'storybook/no-title-property-in-meta': 'off',
45
50
 
46
51
  // This rule identifies storybook addons that are invalid because they are either not installed or contain a typo in their name
47
- // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/storybook/no-uninstalled-addons.md
52
+ // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/no-uninstalled-addons.md
48
53
  'storybook/no-uninstalled-addons': 'error',
49
54
 
50
55
  // Stories should use PascalCase
51
- // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/storybook/prefer-pascal-case.md
56
+ // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/prefer-pascal-case.md
52
57
  'storybook/prefer-pascal-case': 'error',
53
58
 
54
59
  // A story file must contain at least one story export
55
- // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/storybook/story-exports.md
60
+ // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/story-exports.md
56
61
  'storybook/story-exports': 'error',
57
62
 
58
63
  // Use expect from @storybook/jest
59
- // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/storybook/use-storybook-expect.md
64
+ // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/use-storybook-expect.md
60
65
  'storybook/use-storybook-expect': 'error',
61
66
 
62
67
  // Do not use testing-library directly on stories
63
- // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/storybook/use-storybook-testing-library.md
68
+ // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/use-storybook-testing-library.md
64
69
  'storybook/use-storybook-testing-library': 'error',
65
70
  },
66
71
  };
@@ -125,7 +125,9 @@ module.exports = {
125
125
 
126
126
  // Enforce type definitions to consistently use either <code>interface</code> or <code>type</code>
127
127
  // https://typescript-eslint.io/rules/consistent-type-definitions
128
- '@typescript-eslint/consistent-type-definitions': 'off',
128
+ // decision: prefer type to interface for consistency; type is more flexible, but
129
+ // on the other hand, interface is potentially more familiar so they can override if necessary
130
+ '@typescript-eslint/consistent-type-definitions': ['error', 'type'],
129
131
 
130
132
  // Enforce consistent usage of type exports
131
133
  // https://typescript-eslint.io/rules/consistent-type-exports