@interface-technologies/eslint-config 0.4.5 → 0.5.1

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/README.md CHANGED
@@ -1 +1 @@
1
- See https://srmagura.github.io/iti-react/.
1
+ See https://srmagura.github.io/iti-react/.
@@ -3,7 +3,7 @@ module.exports = {
3
3
  parserOptions: {
4
4
  project: './tsconfig.json',
5
5
  tsconfigRootDir: '.',
6
- ecmaVersion: 2017,
6
+ ecmaVersion: 2019,
7
7
  sourceType: 'module',
8
8
  },
9
9
  extends: [
@@ -27,16 +27,16 @@ module.exports = {
27
27
  'testing-library/custom-renders': 'off',
28
28
  },
29
29
  rules: {
30
- 'consistent-return': 'off',
31
30
  'default-case': 'off',
31
+ 'default-case-last': 'off',
32
32
  'max-classes-per-file': 'off',
33
33
  'no-console': ['error', { allow: ['warn', 'error'] }],
34
34
  'no-continue': 'off',
35
35
  'no-param-reassign': 'off',
36
- 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
36
+ 'no-plusplus': 'off',
37
37
  'no-restricted-syntax': [
38
38
  'error',
39
- // 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
40
40
  // with for-of removed
41
41
  {
42
42
  selector: 'ForInStatement',
@@ -101,7 +101,9 @@ module.exports = {
101
101
  devDependencies: [
102
102
  '**/*.test.ts?(x)',
103
103
  '**/*.stories.ts?(x)',
104
+ '**/__devHelpers__/**/*',
104
105
  '**/__DevHelpers__/**/*',
106
+ '**/__testHelpers__/**/*',
105
107
  '**/__TestHelpers__/**/*',
106
108
  ],
107
109
  },
@@ -127,6 +129,10 @@ module.exports = {
127
129
  'react/destructuring-assignment': 'off',
128
130
  'react/jsx-props-no-spreading': 'off',
129
131
  'react/prop-types': 'off',
132
+ 'react/function-component-definition': [
133
+ 'error',
134
+ { unnamedComponents: 'arrow-function' },
135
+ ],
130
136
  'react/require-default-props': 'off',
131
137
  'react/state-in-constructor': 'off',
132
138
  'react/static-property-placement': ['error', 'static public field'],
@@ -149,4 +155,13 @@ module.exports = {
149
155
  'testing-library/no-await-sync-events': 'error',
150
156
  'testing-library/prefer-explicit-assert': 'warn',
151
157
  },
158
+ overrides: [
159
+ // Allow using `const Basic: React.VFC = () => <div />` syntax in stories
160
+ {
161
+ files: ['*.stories.tsx'],
162
+ rules: {
163
+ 'react/function-component-definition': 'off',
164
+ },
165
+ },
166
+ ],
152
167
  }
package/package.json CHANGED
@@ -1,31 +1,31 @@
1
1
  {
2
2
  "name": "@interface-technologies/eslint-config",
3
- "version": "0.4.5",
3
+ "version": "0.5.1",
4
4
  "description": "ESLint config for projects using TypeScript and React.",
5
5
  "homepage": "https://github.com/srmagura/iti-react",
6
6
  "license": "MIT",
7
7
  "author": {
8
8
  "name": "Interface Technologies, Inc."
9
9
  },
10
- "main": "index.js",
10
+ "main": "index.cjs",
11
11
  "files": [
12
- "index.js"
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
  }