@foray1010/eslint-config 7.9.0 → 7.10.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 +7 -0
- package/package.json +3 -2
- package/presets/base.js +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
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.10.0](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@7.9.0...@foray1010/eslint-config@7.10.0) (2022-10-18)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **eslint-config:** do not allow usage of deprecated code ([ed21e5e](https://github.com/foray1010/common-presets/commit/ed21e5e671a67230453a682e9f80519bdcb0e551))
|
|
11
|
+
- **eslint-config:** encourage to use JS standard #private over TS private accessibility modifier ([5e913c8](https://github.com/foray1010/common-presets/commit/5e913c84e709a6d586fde790f122459170130a26))
|
|
12
|
+
|
|
6
13
|
## [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
14
|
|
|
8
15
|
### 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.10.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": {
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"confusing-browser-globals": "^1.0.10",
|
|
30
30
|
"eslint-config-prettier": "^8.3.0",
|
|
31
31
|
"eslint-plugin-compat": "^4.0.0",
|
|
32
|
+
"eslint-plugin-deprecation": "^1.3.2",
|
|
32
33
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
33
34
|
"eslint-plugin-functional": "^4.4.1",
|
|
34
35
|
"eslint-plugin-import": "^2.22.1",
|
|
@@ -57,5 +58,5 @@
|
|
|
57
58
|
"publishConfig": {
|
|
58
59
|
"access": "public"
|
|
59
60
|
},
|
|
60
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "95efcde57421305c554daf6fe3704e8abe10a000"
|
|
61
62
|
}
|
package/presets/base.js
CHANGED
|
@@ -178,6 +178,7 @@ module.exports = {
|
|
|
178
178
|
},
|
|
179
179
|
plugins: [
|
|
180
180
|
'@typescript-eslint/eslint-plugin',
|
|
181
|
+
'eslint-plugin-deprecation',
|
|
181
182
|
'eslint-plugin-functional',
|
|
182
183
|
],
|
|
183
184
|
env: {
|
|
@@ -267,6 +268,8 @@ module.exports = {
|
|
|
267
268
|
'error',
|
|
268
269
|
{ ignoreStatic: true },
|
|
269
270
|
],
|
|
271
|
+
// do not allow usage of deprecated code
|
|
272
|
+
'deprecation/deprecation': 'error',
|
|
270
273
|
// use with @typescript-eslint/prefer-readonly
|
|
271
274
|
'functional/prefer-readonly-type': [
|
|
272
275
|
'error',
|
|
@@ -281,6 +284,16 @@ module.exports = {
|
|
|
281
284
|
],
|
|
282
285
|
// forbid unnecessary callback wrapper
|
|
283
286
|
'functional/prefer-tacit': 'error',
|
|
287
|
+
'no-restricted-syntax': [
|
|
288
|
+
'error',
|
|
289
|
+
{
|
|
290
|
+
// encourage to use JS standard #private over TS private accessibility modifier, but excluding constructor because it cannot be private in JS: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields#description
|
|
291
|
+
selector:
|
|
292
|
+
':matches(PropertyDefinition, MethodDefinition)[accessibility="private"]:not([kind="constructor"])',
|
|
293
|
+
message:
|
|
294
|
+
'Use #private instead (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields)',
|
|
295
|
+
},
|
|
296
|
+
],
|
|
284
297
|
// @typescript-eslint/eslint-plugin suggests to disable it: https://github.com/typescript-eslint/typescript-eslint/blob/2588e9ea55f78352fdd6ae92a306135aabb49a1a/docs/linting/TROUBLESHOOTING.md#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
|
|
285
298
|
// It is disabled in recommended config but re-enabled here to enforce a subset of global variables that supported by both node.js and browsers
|
|
286
299
|
'no-undef': 'error',
|