@interface-technologies/eslint-config 0.4.7 → 0.5.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.
Files changed (2) hide show
  1. package/index.cjs +12 -1
  2. package/package.json +13 -13
package/index.cjs CHANGED
@@ -28,6 +28,7 @@ module.exports = {
28
28
  },
29
29
  rules: {
30
30
  'default-case': 'off',
31
+ 'default-case-last': 'off',
31
32
  'max-classes-per-file': 'off',
32
33
  'no-console': ['error', { allow: ['warn', 'error'] }],
33
34
  'no-continue': 'off',
@@ -35,7 +36,7 @@ module.exports = {
35
36
  'no-plusplus': 'off',
36
37
  'no-restricted-syntax': [
37
38
  'error',
38
- // Options from https://github.com/airbnb/javascript/blob/651280e5a22d08170187bea9a2b1697832c87ebc/packages/eslint-config-airbnb-base/rules/style.js
39
+ // Options from https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js
39
40
  // with for-of removed
40
41
  {
41
42
  selector: 'ForInStatement',
@@ -128,6 +129,7 @@ module.exports = {
128
129
  'react/destructuring-assignment': 'off',
129
130
  'react/jsx-props-no-spreading': 'off',
130
131
  'react/prop-types': 'off',
132
+ 'react/function-component-definition': ['error', {}],
131
133
  'react/require-default-props': 'off',
132
134
  'react/state-in-constructor': 'off',
133
135
  'react/static-property-placement': ['error', 'static public field'],
@@ -150,4 +152,13 @@ module.exports = {
150
152
  'testing-library/no-await-sync-events': 'error',
151
153
  'testing-library/prefer-explicit-assert': 'warn',
152
154
  },
155
+ overrides: [
156
+ // Allow using `const Basic: React.VFC = () => <div />` syntax in stories
157
+ {
158
+ files: ['*.stories.tsx'],
159
+ rules: {
160
+ 'react/function-component-definition': 'off',
161
+ },
162
+ },
163
+ ],
153
164
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interface-technologies/eslint-config",
3
- "version": "0.4.7",
3
+ "version": "0.5.0",
4
4
  "description": "ESLint config for projects using TypeScript and React.",
5
5
  "homepage": "https://github.com/srmagura/iti-react",
6
6
  "license": "MIT",
@@ -12,20 +12,20 @@
12
12
  "index.cjs"
13
13
  ],
14
14
  "peerDependencies": {
15
- "@typescript-eslint/eslint-plugin": ">=4.33.0",
16
- "@typescript-eslint/parser": ">=4.33.0",
17
- "eslint": ">=7.32.0",
18
- "eslint-config-airbnb": ">=18.2.1",
19
- "eslint-config-airbnb-typescript": ">=14.0.0",
15
+ "@typescript-eslint/eslint-plugin": ">=5.4.0",
16
+ "@typescript-eslint/parser": ">=5.4.0",
17
+ "eslint": ">=8.3.0",
18
+ "eslint-config-airbnb": ">=19.0.0",
19
+ "eslint-config-airbnb-typescript": ">=16.0.0",
20
20
  "eslint-config-prettier": ">=8.3.0",
21
21
  "eslint-import-resolver-typescript": ">=2.5.0",
22
- "eslint-plugin-import": ">=2.24.2",
23
- "eslint-plugin-jest": ">=24.5.2",
22
+ "eslint-plugin-import": ">=2.25.3",
23
+ "eslint-plugin-jest": ">=25.2.4",
24
24
  "eslint-plugin-jest-dom": ">=3.9.2",
25
- "eslint-plugin-jsx-a11y": ">=6.4.1",
26
- "eslint-plugin-promise": ">=5.1.0",
27
- "eslint-plugin-react": ">=7.26.1",
28
- "eslint-plugin-react-hooks": ">=4.2.0",
29
- "eslint-plugin-testing-library": ">=4.12.4"
25
+ "eslint-plugin-jsx-a11y": ">=6.5.1",
26
+ "eslint-plugin-promise": ">=5.1.1",
27
+ "eslint-plugin-react": ">=7.27.1",
28
+ "eslint-plugin-react-hooks": ">=4.3.0",
29
+ "eslint-plugin-testing-library": ">=5.0.0"
30
30
  }
31
31
  }