@tinkoff/eslint-config 5.2.1 → 5.2.2
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/CHANGELOG.md +9 -0
- package/README.md +96 -92
- package/app.js +6 -2
- package/errors/index.js +13 -16
- package/index.js +14 -24
- package/internal/base.js +78 -89
- package/internal/import.js +31 -40
- package/internal/prettier.js +3 -16
- package/internal/promise.js +8 -11
- package/internal/sort-class-members.js +54 -57
- package/internal/test-files.js +16 -14
- package/internal/typescript.js +157 -170
- package/jest.js +17 -18
- package/lib.js +10 -11
- package/package.json +14 -26
- package/test/import/import-happy.test.js +11 -15
- package/test/import/import-unhappy.test.js +11 -15
- package/test/index.test.js +26 -26
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
### [5.2.2](https://github.com/tramvaijs/linters/compare/v5.2.1...v5.2.2) (2026-05-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Reverts
|
|
10
|
+
|
|
11
|
+
* Revert "migrate to eslint v9" ([634f3b5](https://github.com/tramvaijs/linters/commit/634f3b5f8e88d7581efb11c700c9097846aaaa0c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
### [5.2.1](https://github.com/tramvaijs/linters/compare/v5.2.0...v5.2.1) (2026-04-23)
|
|
7
16
|
|
|
8
17
|
**Note:** Version bump only for package @tinkoff/eslint-config
|
package/README.md
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
# @tinkoff/eslint-config
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Requirements
|
|
6
|
-
|
|
7
|
-
ESLint >= 9 is required.
|
|
3
|
+
ESlint plugin includes rules for JS and TS codebase. Better to use with framework-oriented packages `@tinkoff/eslint-config-react` or `@tinkoff/eslint-config-angular`
|
|
8
4
|
|
|
9
5
|
## Usage
|
|
10
6
|
|
|
@@ -14,60 +10,62 @@ Install from npm
|
|
|
14
10
|
npm i --save-dev @tinkoff/eslint-config
|
|
15
11
|
```
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
Then, need to include necessary configurations sets to `.eslintrc`. Wee need to choose base configuration, and any
|
|
14
|
+
necessary additional configs. Package include eslint and prettier dependencies, so you should remove eslint, prettier from your project package.json because those packages are transitive dependencies.
|
|
18
15
|
|
|
19
16
|
### Base configurations
|
|
20
17
|
|
|
21
18
|
#### For application
|
|
22
19
|
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
```bash
|
|
21
|
+
{
|
|
22
|
+
"extends": ["@tinkoff/eslint-config/app"]
|
|
23
|
+
}
|
|
27
24
|
```
|
|
28
25
|
|
|
29
26
|
#### For library
|
|
30
27
|
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
```bash
|
|
29
|
+
{
|
|
30
|
+
"extends": ["@tinkoff/eslint-config/lib"]
|
|
31
|
+
}
|
|
35
32
|
```
|
|
36
33
|
|
|
37
34
|
### Additional configurations
|
|
38
35
|
|
|
39
|
-
####
|
|
36
|
+
#### If we use Jest
|
|
40
37
|
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
export default [...appConfig, ...jestConfig];
|
|
38
|
+
```bash
|
|
39
|
+
{
|
|
40
|
+
"extends": ["@tinkoff/eslint-config/app", "@tinkoff/eslint-config/jest"]
|
|
41
|
+
}
|
|
46
42
|
```
|
|
47
43
|
|
|
48
44
|
## Configurations overview
|
|
49
45
|
|
|
50
|
-
Main configurations
|
|
46
|
+
Main configurations sets contains common rules
|
|
51
47
|
|
|
52
|
-
- `@tinkoff/eslint-config/app`
|
|
53
|
-
- `@tinkoff/eslint-config/lib`
|
|
48
|
+
- `@tinkoff/eslint-config/app` - common rules and specific rules for applications
|
|
49
|
+
- `@tinkoff/eslint-config/lib` - common rules and specific rules for libraries
|
|
54
50
|
|
|
55
|
-
Additional configurations.
|
|
51
|
+
Additional configurations sets. This configs **not** contain common eslint rules, and must be included with main
|
|
52
|
+
configurations
|
|
56
53
|
|
|
57
|
-
- `@tinkoff/eslint-config/jest`
|
|
54
|
+
- `@tinkoff/eslint-config/jest` - rules for lint Jest test suits
|
|
58
55
|
|
|
59
56
|
## Internal used plugins
|
|
60
57
|
|
|
61
58
|
`@tinkoff/eslint-config/app` and `@tinkoff/eslint-config/lib` include:
|
|
62
59
|
|
|
63
|
-
- `eslint-config-airbnb
|
|
64
|
-
-
|
|
65
|
-
- `eslint-plugin-import`
|
|
66
|
-
- `eslint-plugin-promise`
|
|
67
|
-
- `eslint-plugin-jest`
|
|
68
|
-
- `@typescript-eslint/eslint-plugin`
|
|
69
|
-
|
|
70
|
-
|
|
60
|
+
- `eslint-config-airbnb` - common and popular configuration
|
|
61
|
+
- `eslint-plugin-eslint-comments` - validate `eslint` comments
|
|
62
|
+
- `eslint-plugin-import` - validate proper imports
|
|
63
|
+
- `eslint-plugin-promise` - enforce best practices for promises
|
|
64
|
+
- `eslint-plugin-jest` - validate jest tests
|
|
65
|
+
- `@typescript-eslint/eslint-plugin` - lint TypeScript files, adopt many eslint rules to TS code, and provide specific
|
|
66
|
+
TS rules
|
|
67
|
+
- `eslint-plugin-prettier` - disable code formatting using eslint tools and transfers all the logic to a prettier, and
|
|
68
|
+
report differences as eslint issues
|
|
71
69
|
|
|
72
70
|
## Troubleshooting
|
|
73
71
|
|
|
@@ -82,80 +80,86 @@ then reinstall dependencies.
|
|
|
82
80
|
|
|
83
81
|
#### In root config
|
|
84
82
|
|
|
85
|
-
|
|
83
|
+
1. Add `"@tinkoff/eslint-config"` to extends section on config.
|
|
84
|
+
2. Set parserOptions.project for typescript files
|
|
86
85
|
|
|
87
|
-
```
|
|
88
|
-
|
|
86
|
+
```json5
|
|
87
|
+
{
|
|
89
88
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
"root": true,
|
|
90
|
+
"ignorePatterns": ["**/*"],
|
|
91
|
+
"extends": ["@tinkoff/eslint-config"]
|
|
92
|
+
// ...optionally some other configs
|
|
93
|
+
"overrides": [
|
|
94
|
+
{
|
|
95
|
+
"files": ["*.ts", "*.tsx"],
|
|
96
|
+
"parserOptions": {
|
|
97
|
+
"project": ["./tsconfig.base.json"]
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
96
102
|
```
|
|
97
103
|
|
|
98
104
|
#### In apps and non-buildable/non-publishable libs
|
|
99
105
|
|
|
100
|
-
|
|
106
|
+
Add `"@tinkoff/eslint-config/app"` in extends section after root config
|
|
101
107
|
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
...appConfig,
|
|
109
|
-
{
|
|
110
|
-
files: ['**/*.ts', '**/*.tsx'],
|
|
111
|
-
languageOptions: {
|
|
112
|
-
parserOptions: {
|
|
113
|
-
project: ['./tsconfig.json'],
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
];
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"extends": ["../../.eslintrc.json", "@tinkoff/eslint-config/app"],
|
|
111
|
+
"ignorePatterns": ["!**/*"]
|
|
112
|
+
...optionally some other configs
|
|
113
|
+
}
|
|
118
114
|
```
|
|
119
115
|
|
|
120
116
|
#### In buildable/publishable libs
|
|
121
117
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
files: ['**/*.ts', '**/*.tsx'],
|
|
131
|
-
languageOptions: {
|
|
132
|
-
parserOptions: {
|
|
133
|
-
project: ['./tsconfig.json'],
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
];
|
|
118
|
+
Add `"@tinkoff/eslint-config/lib"` in extends section after root config
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"extends": ["../../.eslintrc.json", "@tinkoff/eslint-config/lib"],
|
|
123
|
+
"ignorePatterns": ["!**/*"]
|
|
124
|
+
...optionally some other configs
|
|
125
|
+
}
|
|
138
126
|
```
|
|
139
127
|
|
|
140
|
-
###
|
|
128
|
+
### Non-JSON configs usage
|
|
129
|
+
|
|
130
|
+
Nx means usage `.eslintrc.json` for configure ESLint. Just provide it! In `.eslintrc.json` add extension of actual root config file:
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
{
|
|
134
|
+
"extends": ["./.eslintrc.js"]
|
|
135
|
+
}
|
|
136
|
+
```
|
|
141
137
|
|
|
142
|
-
|
|
138
|
+
After that:
|
|
143
139
|
|
|
144
|
-
|
|
145
|
-
|
|
140
|
+
- Nx see what they need and don't re-initialize lint infrastructure
|
|
141
|
+
- You can use [better config formats](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#configuration-file-formats) and nx generators
|
|
146
142
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
],
|
|
143
|
+
### Disable false-positive detections from `import/no-unresolved`
|
|
144
|
+
|
|
145
|
+
override rule in `.eslintrc` of apps/libs that contains problem:
|
|
146
|
+
|
|
147
|
+
```json5
|
|
148
|
+
{
|
|
149
|
+
// ...some other configs...
|
|
150
|
+
// disable detection for packages starts with @tinkoff/
|
|
151
|
+
overrides: [
|
|
152
|
+
{
|
|
153
|
+
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
|
|
154
|
+
rules: {
|
|
155
|
+
'import/no-unresolved': [
|
|
156
|
+
'error',
|
|
157
|
+
{
|
|
158
|
+
ignore: ['^@tinkoff/'],
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
},
|
|
158
162
|
},
|
|
159
|
-
|
|
160
|
-
|
|
163
|
+
],
|
|
164
|
+
}
|
|
161
165
|
```
|
package/app.js
CHANGED
package/errors/index.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
module.exports = {
|
|
2
|
+
overrides: [
|
|
3
|
+
{
|
|
4
|
+
files: ['*.js', '*.ts', '*.tsx'],
|
|
5
|
+
parser: '@typescript-eslint/parser',
|
|
6
|
+
extends: ['eslint-config-airbnb-base/rules/errors'],
|
|
7
|
+
rules: {
|
|
8
|
+
// eslint-config-airbnb-base/errors
|
|
9
|
+
'no-empty': ['error', { allowEmptyCatch: true }],
|
|
10
|
+
'no-await-in-loop': 'off',
|
|
11
|
+
},
|
|
9
12
|
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// Overrides
|
|
13
|
-
'no-empty': ['error', { allowEmptyCatch: true }],
|
|
14
|
-
'no-await-in-loop': 'off',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
];
|
|
13
|
+
],
|
|
14
|
+
};
|
package/index.js
CHANGED
|
@@ -1,26 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: [
|
|
3
|
+
'./internal/base',
|
|
4
|
+
'./internal/sort-class-members',
|
|
5
|
+
'./internal/import',
|
|
6
|
+
'./internal/promise',
|
|
7
|
+
'./internal/test-files',
|
|
8
|
+
'./internal/typescript',
|
|
9
|
+
'./internal/prettier',
|
|
10
|
+
],
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
...importConfig,
|
|
14
|
-
...promise,
|
|
15
|
-
...testFiles,
|
|
16
|
-
...typescript,
|
|
17
|
-
...prettier,
|
|
18
|
-
{
|
|
19
|
-
languageOptions: {
|
|
20
|
-
globals: {
|
|
21
|
-
...globals.browser,
|
|
22
|
-
...globals.node,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
12
|
+
env: {
|
|
13
|
+
browser: true,
|
|
14
|
+
node: true,
|
|
25
15
|
},
|
|
26
|
-
|
|
16
|
+
};
|
package/internal/base.js
CHANGED
|
@@ -1,94 +1,83 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: [
|
|
3
|
+
'eslint-config-airbnb-base',
|
|
4
|
+
'plugin:eslint-comments/recommended',
|
|
5
|
+
'../errors/index.js',
|
|
6
|
+
],
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
parser: '@babel/eslint-parser',
|
|
9
|
+
|
|
10
|
+
settings: {
|
|
11
|
+
'import/parser': '@babel/eslint-parser',
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
plugins: ['@babel'],
|
|
15
|
+
|
|
16
|
+
parserOptions: {
|
|
17
|
+
ecmaFeatures: {
|
|
18
|
+
legacyDecorators: true,
|
|
12
19
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
requireConfigFile: false,
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
rules: {
|
|
24
|
+
'no-unused-expressions': [
|
|
25
|
+
'error',
|
|
26
|
+
{
|
|
27
|
+
allowShortCircuit: true,
|
|
28
|
+
allowTernary: true,
|
|
20
29
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
'
|
|
24
|
-
|
|
30
|
+
],
|
|
31
|
+
'no-use-before-define': [
|
|
32
|
+
'error',
|
|
33
|
+
{
|
|
34
|
+
functions: false,
|
|
35
|
+
classes: false,
|
|
36
|
+
variables: true,
|
|
25
37
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
'
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
'
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
'error',
|
|
71
|
-
'declaration',
|
|
72
|
-
{
|
|
73
|
-
allowArrowFunctions: true,
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
'max-depth': 'off',
|
|
77
|
-
'max-params': 'off',
|
|
78
|
-
'max-classes-per-file': ['error', 4],
|
|
79
|
-
complexity: ['error', 25],
|
|
80
|
-
'max-statements': ['error', 25],
|
|
81
|
-
'no-underscore-dangle': 'off',
|
|
82
|
-
'no-return-assign': ['error', 'except-parens'],
|
|
83
|
-
'lines-between-class-members': [
|
|
84
|
-
'error',
|
|
85
|
-
'always',
|
|
86
|
-
{ exceptAfterSingleLine: true },
|
|
87
|
-
],
|
|
88
|
-
'spaced-comment': ['error', 'always', { exceptions: ['*'] }],
|
|
89
|
-
'max-nested-callbacks': ['error', 4],
|
|
90
|
-
'no-bitwise': 'warn',
|
|
91
|
-
'no-useless-escape': 'warn',
|
|
92
|
-
},
|
|
38
|
+
],
|
|
39
|
+
'func-name-matching': 'off',
|
|
40
|
+
'global-require': 'off',
|
|
41
|
+
'class-methods-use-this': 'off',
|
|
42
|
+
'no-continue': 'off',
|
|
43
|
+
'no-restricted-syntax': 'off',
|
|
44
|
+
'guard-for-in': 'off',
|
|
45
|
+
'default-case': 'off',
|
|
46
|
+
'no-plusplus': 'off',
|
|
47
|
+
'func-names': 'off',
|
|
48
|
+
'consistent-return': 'warn',
|
|
49
|
+
'vars-on-top': 'warn',
|
|
50
|
+
'no-var': 'warn',
|
|
51
|
+
camelcase: [
|
|
52
|
+
'warn',
|
|
53
|
+
{
|
|
54
|
+
allow: ['^UNSAFE_'],
|
|
55
|
+
ignoreDestructuring: false,
|
|
56
|
+
properties: 'never',
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
'func-style': [
|
|
60
|
+
'error',
|
|
61
|
+
'declaration',
|
|
62
|
+
{
|
|
63
|
+
allowArrowFunctions: true,
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
'max-depth': 'off',
|
|
67
|
+
'max-params': 'off',
|
|
68
|
+
'max-classes-per-file': ['error', 4],
|
|
69
|
+
complexity: ['error', 25],
|
|
70
|
+
'max-statements': ['error', 25],
|
|
71
|
+
'no-underscore-dangle': 'off',
|
|
72
|
+
'no-return-assign': ['error', 'except-parens'],
|
|
73
|
+
'lines-between-class-members': [
|
|
74
|
+
'error',
|
|
75
|
+
'always',
|
|
76
|
+
{ exceptAfterSingleLine: true },
|
|
77
|
+
],
|
|
78
|
+
'spaced-comment': ['error', 'always', { exceptions: ['*'] }],
|
|
79
|
+
'max-nested-callbacks': ['error', 4],
|
|
80
|
+
'no-bitwise': 'warn',
|
|
81
|
+
'no-useless-escape': 'warn',
|
|
93
82
|
},
|
|
94
|
-
|
|
83
|
+
};
|
package/internal/import.js
CHANGED
|
@@ -1,45 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
module.exports = {
|
|
2
|
+
plugins: ['import'],
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
settings: {
|
|
10
|
-
'import/resolver': {
|
|
11
|
-
node: {
|
|
12
|
-
extensions: ['.js', '.mjs', '.cjs', '.ts'],
|
|
13
|
-
},
|
|
14
|
-
typescript: {},
|
|
15
|
-
webpack: {},
|
|
4
|
+
settings: {
|
|
5
|
+
'import/resolver': {
|
|
6
|
+
node: {
|
|
7
|
+
extensions: ['.js', '.mjs', '.cjs', '.ts'],
|
|
16
8
|
},
|
|
9
|
+
typescript: {},
|
|
10
|
+
webpack: {},
|
|
17
11
|
},
|
|
12
|
+
},
|
|
18
13
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
],
|
|
41
|
-
'import/no-extraneous-dependencies': 'off', // need fine tuning
|
|
42
|
-
'import/no-cycle': 'error',
|
|
43
|
-
},
|
|
14
|
+
rules: {
|
|
15
|
+
'import/no-commonjs': 'off',
|
|
16
|
+
'import/unambiguous': 'off',
|
|
17
|
+
'import/prefer-default-export': 'off', // default imports is evil
|
|
18
|
+
'import/no-deprecated': 'warn',
|
|
19
|
+
'import/default': 'error', // enable default import validation
|
|
20
|
+
'import/extensions': [
|
|
21
|
+
'error',
|
|
22
|
+
'always',
|
|
23
|
+
{
|
|
24
|
+
js: 'never',
|
|
25
|
+
mjs: 'never',
|
|
26
|
+
cjs: 'never',
|
|
27
|
+
jsx: 'never',
|
|
28
|
+
ts: 'never',
|
|
29
|
+
tsx: 'never',
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
'import/order': ['warn', { groups: [['builtin', 'external', 'internal']] }],
|
|
33
|
+
'import/no-extraneous-dependencies': 'off', // need fine tuning
|
|
34
|
+
'import/no-cycle': 'error',
|
|
44
35
|
},
|
|
45
|
-
|
|
36
|
+
};
|
package/internal/prettier.js
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default [
|
|
5
|
-
{
|
|
6
|
-
plugins: {
|
|
7
|
-
prettier: prettierPlugin,
|
|
8
|
-
},
|
|
9
|
-
rules: {
|
|
10
|
-
...prettierConfig.rules,
|
|
11
|
-
'prettier/prettier': 'error',
|
|
12
|
-
'arrow-body-style': 'off',
|
|
13
|
-
'prefer-arrow-callback': 'off',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
];
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: ['plugin:prettier/recommended'],
|
|
3
|
+
};
|
package/internal/promise.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: ['plugin:promise/recommended'],
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
'promise/no-callback-in-promise': 'off',
|
|
9
|
-
'promise/catch-or-return': 'warn',
|
|
10
|
-
'promise/param-names': 'warn',
|
|
11
|
-
},
|
|
4
|
+
rules: {
|
|
5
|
+
'promise/always-return': 'off',
|
|
6
|
+
'promise/no-callback-in-promise': 'off',
|
|
7
|
+
'promise/catch-or-return': 'warn',
|
|
8
|
+
'promise/param-names': 'warn',
|
|
12
9
|
},
|
|
13
|
-
|
|
10
|
+
};
|