eslint-config-entva-typescript 2.17.0 → 2.19.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/index.js +61 -64
- package/package.json +4 -3
package/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { ignoreRule, mainRule as baseMainRule, testRule as baseTestRule } from 'eslint-config-entva-base';
|
|
2
|
+
import { mainRule as reactMainRule } from 'eslint-config-entva';
|
|
3
|
+
import { mainRule as tsMainRule, testRule as tsTestRule } from 'eslint-config-entva-typescript-base';
|
|
3
4
|
import react from 'eslint-plugin-react';
|
|
4
5
|
import jsxA11Y from 'eslint-plugin-jsx-a11y';
|
|
5
6
|
import reactHooks from 'eslint-plugin-react-hooks';
|
|
@@ -9,81 +10,77 @@ import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
|
9
10
|
import tsParser from '@typescript-eslint/parser';
|
|
10
11
|
import stylisticTs from '@stylistic/eslint-plugin-ts';
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
export const mainRule = {
|
|
14
|
+
files: ['**/*.{ts,tsx}'],
|
|
15
|
+
plugins: {
|
|
16
|
+
react,
|
|
17
|
+
'jsx-a11y': jsxA11Y,
|
|
18
|
+
'react-hooks': reactHooks,
|
|
19
|
+
import: importPlugin,
|
|
20
|
+
'@typescript-eslint': typescriptEslint,
|
|
21
|
+
'@stylistic/ts': stylisticTs,
|
|
22
|
+
},
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
plugins: {
|
|
27
|
-
react,
|
|
28
|
-
'jsx-a11y': jsxA11Y,
|
|
29
|
-
'react-hooks': reactHooks,
|
|
30
|
-
import: importPlugin,
|
|
31
|
-
'@typescript-eslint': typescriptEslint,
|
|
32
|
-
'@stylistic/ts': stylisticTs,
|
|
24
|
+
languageOptions: {
|
|
25
|
+
globals: {
|
|
26
|
+
...globals.browser,
|
|
27
|
+
...globals.node,
|
|
33
28
|
},
|
|
34
29
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
...globals.node,
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
parser: tsParser,
|
|
42
|
-
ecmaVersion: 'latest',
|
|
43
|
-
sourceType: 'module',
|
|
30
|
+
parser: tsParser,
|
|
31
|
+
ecmaVersion: 'latest',
|
|
32
|
+
sourceType: 'module',
|
|
44
33
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
34
|
+
parserOptions: {
|
|
35
|
+
parser: '@typescript-eslint/parser',
|
|
36
|
+
project: './tsconfig.json',
|
|
48
37
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
},
|
|
38
|
+
ecmaFeatures: {
|
|
39
|
+
generators: false,
|
|
40
|
+
objectLiteralDuplicateProperties: false,
|
|
41
|
+
jsx: true,
|
|
54
42
|
},
|
|
55
43
|
},
|
|
44
|
+
},
|
|
56
45
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
46
|
+
settings: {
|
|
47
|
+
'import/parsers': {
|
|
48
|
+
'@typescript-eslint/parser': ['.ts', '.tsx', '.d.ts'],
|
|
49
|
+
},
|
|
61
50
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
},
|
|
51
|
+
'import/resolver': {
|
|
52
|
+
node: {
|
|
53
|
+
extensions: ['.js', '.mjs', '.cjs', '.jsx', '.ts', '.tsx', '.d.ts', '.json'],
|
|
66
54
|
},
|
|
55
|
+
},
|
|
67
56
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
react: {
|
|
74
|
-
pragma: 'React',
|
|
75
|
-
version: 'detect',
|
|
76
|
-
},
|
|
57
|
+
'import/extensions': ['.js', '.mjs', '.cjs', '.jsx', '.ts', '.tsx', '.d.ts', '.json'],
|
|
58
|
+
'import/external-module-folders': ['node_modules', 'node_modules/@types'],
|
|
59
|
+
'import/core-modules': [],
|
|
60
|
+
'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$'],
|
|
77
61
|
|
|
78
|
-
|
|
62
|
+
react: {
|
|
63
|
+
pragma: 'React',
|
|
64
|
+
version: 'detect',
|
|
79
65
|
},
|
|
80
66
|
|
|
81
|
-
|
|
82
|
-
...baseConfigRules.base,
|
|
83
|
-
'react/jsx-filename-extension': ['error', {
|
|
84
|
-
extensions: ['.jsx', '.tsx'],
|
|
85
|
-
}],
|
|
86
|
-
},
|
|
67
|
+
propWrapperFunctions: ['forbidExtraProps', 'exact', 'Object.freeze'],
|
|
87
68
|
},
|
|
88
|
-
|
|
69
|
+
|
|
70
|
+
rules: {
|
|
71
|
+
...reactMainRule.rules,
|
|
72
|
+
'react/jsx-filename-extension': ['error', {
|
|
73
|
+
extensions: ['.jsx', '.tsx'],
|
|
74
|
+
}],
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export default [
|
|
79
|
+
ignoreRule,
|
|
80
|
+
baseMainRule,
|
|
81
|
+
tsMainRule,
|
|
82
|
+
reactMainRule,
|
|
83
|
+
mainRule,
|
|
84
|
+
baseTestRule,
|
|
85
|
+
tsTestRule,
|
|
89
86
|
];
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "https://github.com/entva/styleguide"
|
|
10
10
|
},
|
|
11
11
|
"bugs": "https://github.com/entva/styleguide/issues",
|
|
12
|
-
"version": "2.
|
|
12
|
+
"version": "2.19.0",
|
|
13
13
|
"keywords": [
|
|
14
14
|
"linter",
|
|
15
15
|
"config",
|
|
@@ -39,8 +39,9 @@
|
|
|
39
39
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
40
40
|
"eslint-plugin-react": "^7.37.2",
|
|
41
41
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
42
|
-
"eslint-config-entva": "^2.
|
|
43
|
-
"eslint-config-entva-
|
|
42
|
+
"eslint-config-entva": "^2.18.1",
|
|
43
|
+
"eslint-config-entva-base": "^2.18.0",
|
|
44
|
+
"eslint-config-entva-typescript-base": "^2.19.0",
|
|
44
45
|
"eslint-plugin-import": "^2.31.0",
|
|
45
46
|
"globals": "^15.14.0"
|
|
46
47
|
},
|