@1stg/eslint-config 4.2.0 → 5.1.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 +22 -0
- package/_util.js +1 -1
- package/base.js +3 -2
- package/overrides.js +60 -11
- package/package.json +16 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 5.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#100](https://github.com/1stG/configs/pull/100) [`ab745b4`](https://github.com/1stG/configs/commit/ab745b43289691a6b6b99f0dee1f68d098f5f6a0) Thanks [@JounQin](https://github.com/JounQin)! - feat(eslint): enable css/es-x/json-schema-validator/regexp plugins
|
|
8
|
+
|
|
9
|
+
## 5.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- [#98](https://github.com/1stG/configs/pull/98) [`9c2c16d`](https://github.com/1stG/configs/commit/9c2c16d635f490b7c8980e17a39fd7ecd53de008) Thanks [@JounQin](https://github.com/JounQin)! - feat!: use official eslint-plugin-prettier and eslint-plugin-svelte v2
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [#98](https://github.com/1stG/configs/pull/98) [`9c2c16d`](https://github.com/1stG/configs/commit/9c2c16d635f490b7c8980e17a39fd7ecd53de008) Thanks [@JounQin](https://github.com/JounQin)! - feat: enable jsonc/toml/yml plugins
|
|
18
|
+
|
|
19
|
+
## 4.3.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- [`62a9421`](https://github.com/1stG/configs/commit/62a9421e6a2b0fb206b6292a070c8b3b04fe384e) Thanks [@JounQin](https://github.com/JounQin)! - feat: use @rxts/eslint-plugin-prettier instead
|
|
24
|
+
|
|
3
25
|
## 4.2.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/_util.js
CHANGED
package/base.js
CHANGED
|
@@ -7,16 +7,18 @@ module.exports = {
|
|
|
7
7
|
extends: [
|
|
8
8
|
'eslint:recommended',
|
|
9
9
|
'plugin:eslint-comments/recommended',
|
|
10
|
+
'plugin:css/recommended',
|
|
10
11
|
'plugin:import/recommended',
|
|
11
12
|
'plugin:n/recommended',
|
|
12
13
|
'plugin:promise/recommended',
|
|
14
|
+
'plugin:regexp/recommended',
|
|
13
15
|
'plugin:sonarjs/recommended',
|
|
14
16
|
isTsAvailable && 'plugin:sonar/recommended',
|
|
15
17
|
'plugin:unicorn/recommended',
|
|
16
18
|
'standard',
|
|
17
19
|
'plugin:prettier/recommended',
|
|
18
20
|
].filter(Boolean),
|
|
19
|
-
plugins: ['simple-import-sort'],
|
|
21
|
+
plugins: ['es-x', 'simple-import-sort'],
|
|
20
22
|
globals: isWebpackAvailable ? getGlobals(webpackSpecVars) : undefined,
|
|
21
23
|
rules: {
|
|
22
24
|
'arrow-body-style': 2,
|
|
@@ -108,7 +110,6 @@ module.exports = {
|
|
|
108
110
|
'unicorn/no-null': 0,
|
|
109
111
|
'unicorn/no-unreadable-array-destructuring': 0, // conflict with `no-unused-vars`
|
|
110
112
|
'unicorn/prefer-module': 0,
|
|
111
|
-
'unicorn/prefer-node-protocol': 0,
|
|
112
113
|
'unicorn/prefer-object-from-entries': 0,
|
|
113
114
|
'unicorn/prevent-abbreviations': 0,
|
|
114
115
|
},
|
package/overrides.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const path = require('path')
|
|
1
|
+
const path = require('node:path')
|
|
2
2
|
|
|
3
3
|
const {
|
|
4
4
|
isAngularAvailable,
|
|
@@ -9,7 +9,6 @@ const {
|
|
|
9
9
|
isVueAvailable,
|
|
10
10
|
tryFile,
|
|
11
11
|
tryPkg,
|
|
12
|
-
tryRequirePkg,
|
|
13
12
|
} = require('@pkgr/utils')
|
|
14
13
|
|
|
15
14
|
const { magicNumbers } = require('./_util')
|
|
@@ -87,7 +86,7 @@ const resolveSettings = {
|
|
|
87
86
|
}
|
|
88
87
|
|
|
89
88
|
const tsBase = {
|
|
90
|
-
files: ['*.ts', '*.tsx'],
|
|
89
|
+
files: ['*.cts', '*.mts', '*.ts', '*.tsx'],
|
|
91
90
|
extends: [
|
|
92
91
|
'plugin:@typescript-eslint/eslint-recommended',
|
|
93
92
|
'plugin:@typescript-eslint/recommended',
|
|
@@ -258,7 +257,7 @@ exports.ts = [
|
|
|
258
257
|
]
|
|
259
258
|
|
|
260
259
|
exports.dTs = {
|
|
261
|
-
files: '*.d.ts',
|
|
260
|
+
files: ['*.d.cts', '*.d.mts', '*.d.ts'],
|
|
262
261
|
rules: {
|
|
263
262
|
'@typescript-eslint/no-explicit-any': 0,
|
|
264
263
|
'@typescript-eslint/no-extraneous-class': 0,
|
|
@@ -355,10 +354,8 @@ exports.vue = [
|
|
|
355
354
|
|
|
356
355
|
const svelteBase = {
|
|
357
356
|
files: '*.svelte',
|
|
358
|
-
|
|
359
|
-
processor: 'svelte/svelte',
|
|
357
|
+
extends: ['plugin:svelte/recommended'],
|
|
360
358
|
rules: {
|
|
361
|
-
'prettier/prettier': 0, // https://github.com/sveltejs/eslint-plugin-svelte3/issues/16,
|
|
362
359
|
'sonar/label-position': 0,
|
|
363
360
|
'sonar/no-labels': 0,
|
|
364
361
|
},
|
|
@@ -371,10 +368,6 @@ exports.svelte = isTsAvailable
|
|
|
371
368
|
parserOptions: {
|
|
372
369
|
extraFileExtensions: ['.svelte'],
|
|
373
370
|
},
|
|
374
|
-
settings: {
|
|
375
|
-
...tsBase.settings,
|
|
376
|
-
'svelte/typescript': tryRequirePkg('typescript'),
|
|
377
|
-
},
|
|
378
371
|
}
|
|
379
372
|
: {
|
|
380
373
|
...jsBase,
|
|
@@ -493,6 +486,57 @@ exports.config = exports.configs = {
|
|
|
493
486
|
rules: nonSourceRules,
|
|
494
487
|
}
|
|
495
488
|
|
|
489
|
+
exports.json = {
|
|
490
|
+
files: ['.*rc', '*.json'],
|
|
491
|
+
excludedFiles: ['.browserslistrc', '.npmrc', '.nvmrc', '.yarnrc', '.*shrc'],
|
|
492
|
+
extends: [
|
|
493
|
+
// eslint-disable-next-line sonarjs/no-duplicate-string
|
|
494
|
+
'plugin:jsonc/auto-config',
|
|
495
|
+
'plugin:jsonc/recommended-with-json',
|
|
496
|
+
// eslint-disable-next-line sonarjs/no-duplicate-string
|
|
497
|
+
'plugin:json-schema-validator/recommended',
|
|
498
|
+
// eslint-disable-next-line sonarjs/no-duplicate-string
|
|
499
|
+
'plugin:jsonc/prettier',
|
|
500
|
+
],
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
exports.jsonc = {
|
|
504
|
+
files: [
|
|
505
|
+
'*.jsonc',
|
|
506
|
+
'angular.json',
|
|
507
|
+
'jsconfig.json',
|
|
508
|
+
'settings.json',
|
|
509
|
+
'tsconfig.json',
|
|
510
|
+
'tsconfig.*.json',
|
|
511
|
+
],
|
|
512
|
+
extends: [
|
|
513
|
+
'plugin:jsonc/auto-config',
|
|
514
|
+
'plugin:jsonc/recommended-with-jsonc',
|
|
515
|
+
'plugin:json-schema-validator/recommended',
|
|
516
|
+
'plugin:jsonc/prettier',
|
|
517
|
+
],
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
exports.json5 = {
|
|
521
|
+
files: '*.json5',
|
|
522
|
+
extends: [
|
|
523
|
+
'plugin:jsonc/auto-config',
|
|
524
|
+
'plugin:jsonc/recommended-with-json5',
|
|
525
|
+
'plugin:json-schema-validator/recommended',
|
|
526
|
+
'plugin:jsonc/prettier',
|
|
527
|
+
],
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
exports.toml = {
|
|
531
|
+
files: '*.toml',
|
|
532
|
+
extends: ['plugin:toml/recommended'],
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
exports.yml = exports.yaml = {
|
|
536
|
+
files: ['*.yml', '*.yaml'],
|
|
537
|
+
extends: ['plugin:yml/recommended', 'plugin:yml/prettier'],
|
|
538
|
+
}
|
|
539
|
+
|
|
496
540
|
exports.overrides = []
|
|
497
541
|
// eslint-disable-next-line unicorn/prefer-spread
|
|
498
542
|
.concat(
|
|
@@ -512,5 +556,10 @@ exports.overrides = []
|
|
|
512
556
|
exports.stories,
|
|
513
557
|
exports.configs,
|
|
514
558
|
exports.dTs,
|
|
559
|
+
exports.json,
|
|
560
|
+
exports.jsonc,
|
|
561
|
+
exports.json5,
|
|
562
|
+
exports.toml,
|
|
563
|
+
exports.yaml,
|
|
515
564
|
)
|
|
516
565
|
.filter(Boolean)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1stg/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "Personal but Shareable ESLint Configuration for all 1stG.me projects.",
|
|
5
5
|
"repository": "git+https://github.com/1stG/configs.git",
|
|
6
6
|
"homepage": "https://github.com/1stG/configs/tree/master/packages/eslint-config",
|
|
@@ -19,32 +19,39 @@
|
|
|
19
19
|
"@babel/eslint-parser": "^7.18.2",
|
|
20
20
|
"@babel/eslint-plugin": "^7.17.7",
|
|
21
21
|
"@pkgr/utils": "^2.2.0",
|
|
22
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
23
|
-
"@typescript-eslint/parser": "^5.
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "^5.30.0",
|
|
23
|
+
"@typescript-eslint/parser": "^5.30.0",
|
|
24
24
|
"angular-eslint-template-parser": "^0.1.1",
|
|
25
25
|
"eslint-config-prettier": "^8.5.0",
|
|
26
26
|
"eslint-config-standard": "^17.0.0",
|
|
27
27
|
"eslint-config-standard-jsx": "^11.0.0",
|
|
28
28
|
"eslint-config-standard-react": "^11.0.1",
|
|
29
29
|
"eslint-formatter-friendly": "^7.0.0",
|
|
30
|
-
"eslint-import-resolver-typescript": "^3.
|
|
30
|
+
"eslint-import-resolver-typescript": "^3.1.2",
|
|
31
|
+
"eslint-plugin-css": "^0.6.0",
|
|
32
|
+
"eslint-plugin-es-x": "^5.2.1",
|
|
31
33
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
32
34
|
"eslint-plugin-import": "^2.26.0",
|
|
33
35
|
"eslint-plugin-jest": "^26.5.3",
|
|
34
36
|
"eslint-plugin-jsdoc": "^39.3.3",
|
|
37
|
+
"eslint-plugin-json-schema-validator": "^3.0.25",
|
|
38
|
+
"eslint-plugin-jsonc": "^2.3.0",
|
|
35
39
|
"eslint-plugin-markup": "^0.9.0",
|
|
36
|
-
"eslint-plugin-mdx": "^2.0.
|
|
40
|
+
"eslint-plugin-mdx": "^2.0.1",
|
|
37
41
|
"eslint-plugin-n": "^15.2.3",
|
|
38
|
-
"eslint-plugin-prettier": "^4.
|
|
42
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
39
43
|
"eslint-plugin-promise": "^6.0.0",
|
|
40
44
|
"eslint-plugin-react": "^7.30.1",
|
|
41
45
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
46
|
+
"eslint-plugin-regexp": "^1.7.0",
|
|
42
47
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
43
48
|
"eslint-plugin-sonar": "^0.8.0",
|
|
44
49
|
"eslint-plugin-sonarjs": "^0.13.0",
|
|
45
|
-
"eslint-plugin-svelte": "^
|
|
46
|
-
"eslint-plugin-
|
|
47
|
-
"eslint-plugin-
|
|
50
|
+
"eslint-plugin-svelte": "^2.0.0",
|
|
51
|
+
"eslint-plugin-toml": "^0.3.1",
|
|
52
|
+
"eslint-plugin-unicorn": "^43.0.0",
|
|
53
|
+
"eslint-plugin-vue": "^9.1.1",
|
|
54
|
+
"eslint-plugin-yml": "^1.0.0"
|
|
48
55
|
},
|
|
49
56
|
"publishConfig": {
|
|
50
57
|
"access": "public"
|