@tinkoff/eslint-config 1.40.0 → 1.41.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/CHANGELOG.md +8 -0
- package/README.md +40 -8
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [1.41.0](https://github.com/TinkoffCreditSystems/linters/compare/v1.39.0...v1.41.0) (2022-11-08)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @tinkoff/eslint-config
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [1.40.0](https://github.com/TinkoffCreditSystems/linters/compare/v1.39.0...v1.40.0) (2022-11-07)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @tinkoff/eslint-config
|
package/README.md
CHANGED
|
@@ -80,32 +80,40 @@ then reinstall dependencies.
|
|
|
80
80
|
|
|
81
81
|
#### In root config
|
|
82
82
|
|
|
83
|
-
Add `"@tinkoff/eslint-config
|
|
84
|
-
|
|
83
|
+
1. Add `"@tinkoff/eslint-config"` to extends section on config.
|
|
84
|
+
2. Set parserOptions.project for typescript files
|
|
85
85
|
|
|
86
|
-
```
|
|
86
|
+
```json5
|
|
87
87
|
{
|
|
88
88
|
|
|
89
89
|
"root": true,
|
|
90
90
|
"ignorePatterns": ["**/*"],
|
|
91
|
-
"extends": ["@tinkoff/eslint-config
|
|
92
|
-
...optionally some other configs
|
|
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
|
+
]
|
|
93
101
|
}
|
|
94
102
|
```
|
|
95
103
|
|
|
96
104
|
#### In apps and non-buildable/non-publishable libs
|
|
97
105
|
|
|
98
|
-
|
|
106
|
+
Add `"@tinkoff/eslint-config/app"` in extends section after root config
|
|
99
107
|
|
|
100
108
|
```json
|
|
101
109
|
{
|
|
102
|
-
"extends": ["../../.eslintrc.json"],
|
|
110
|
+
"extends": ["../../.eslintrc.json", "@tinkoff/eslint-config/app"],
|
|
103
111
|
"ignorePatterns": ["!**/*"]
|
|
104
112
|
...optionally some other configs
|
|
105
113
|
}
|
|
106
114
|
```
|
|
107
115
|
|
|
108
|
-
####
|
|
116
|
+
#### In buildable/publishable libs
|
|
109
117
|
|
|
110
118
|
Add `"@tinkoff/eslint-config/lib"` in extends section after root config
|
|
111
119
|
|
|
@@ -131,3 +139,27 @@ After that:
|
|
|
131
139
|
|
|
132
140
|
- Nx see what they need and don't re-initialize lint infrastructure
|
|
133
141
|
- You can use [better config formats](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#configuration-file-formats) and nx generators
|
|
142
|
+
|
|
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
|
+
},
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
}
|
|
165
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinkoff/eslint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.41.0",
|
|
4
4
|
"description": "Tinkoff ESLint configs to rule them all",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "0cc43b5e98ac4993f46aa93a2028a08783875415"
|
|
43
43
|
}
|