@foray1010/eslint-config 7.8.0 → 7.9.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 +10 -0
- package/package.json +3 -3
- package/presets/base.js +9 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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
|
+
## [7.9.0](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@7.8.0...@foray1010/eslint-config@7.9.0) (2022-10-07)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- use indexed syntax for accessing undefined fields ([7c1f9d6](https://github.com/foray1010/common-presets/commit/7c1f9d63349f0b34b00aa8608d6908763d964c3e))
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **eslint-config:** enforce accessibility modifier in constructor in TS ([7cb3f2b](https://github.com/foray1010/common-presets/commit/7cb3f2b9f5de215255b1a541bac3cc1bd731589c))
|
|
15
|
+
|
|
6
16
|
## [7.8.0](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@7.7.3...@foray1010/eslint-config@7.8.0) (2022-10-03)
|
|
7
17
|
|
|
8
18
|
### Features
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@foray1010/eslint-config",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.9.0",
|
|
5
5
|
"homepage": "https://github.com/foray1010/common-presets/tree/master/packages/eslint-config#readme",
|
|
6
6
|
"bugs": "https://github.com/foray1010/common-presets/issues",
|
|
7
7
|
"repository": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"type:check": "tsc"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@foray1010/common-presets-utils": "^5.0
|
|
26
|
+
"@foray1010/common-presets-utils": "^5.1.0",
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
|
28
28
|
"@typescript-eslint/parser": "^5.38.1",
|
|
29
29
|
"confusing-browser-globals": "^1.0.10",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "0b6e4b29bc99ab8523c726d33f5a8b8531c6ee56"
|
|
61
61
|
}
|
package/presets/base.js
CHANGED
|
@@ -201,15 +201,20 @@ module.exports = {
|
|
|
201
201
|
'error',
|
|
202
202
|
{ prefer: 'type-imports' },
|
|
203
203
|
],
|
|
204
|
+
// disable the base rule as it can report incorrect errors, use @typescript-eslint/dot-notation instead
|
|
205
|
+
'dot-notation': 'off',
|
|
206
|
+
// only allow indexed syntax (e.g. `obj['key']`) for accessing undefined fields
|
|
207
|
+
'@typescript-eslint/dot-notation': [
|
|
208
|
+
'error',
|
|
209
|
+
{
|
|
210
|
+
allowIndexSignaturePropertyAccess: true,
|
|
211
|
+
},
|
|
212
|
+
],
|
|
204
213
|
// encourage to use private accessibility modifier
|
|
205
214
|
'@typescript-eslint/explicit-member-accessibility': [
|
|
206
215
|
'error',
|
|
207
216
|
{
|
|
208
217
|
accessibility: 'explicit',
|
|
209
|
-
overrides: {
|
|
210
|
-
// don't bother because it is always public
|
|
211
|
-
constructors: 'off',
|
|
212
|
-
},
|
|
213
218
|
},
|
|
214
219
|
],
|
|
215
220
|
// sometimes auto detect can provide a better and narrower type
|