@1stg/eslint-config 5.0.0 → 5.2.1

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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # Change Log
2
2
 
3
+ ## 5.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#107](https://github.com/1stG/configs/pull/107) [`720e694`](https://github.com/1stG/configs/commit/720e694b2f7d9173738a4338b94fa455f70dabe3) Thanks [@JounQin](https://github.com/JounQin)! - chore: add website info in author field
8
+
9
+ ## 5.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#102](https://github.com/1stG/configs/pull/102) [`ca3a9ff`](https://github.com/1stG/configs/commit/ca3a9ff0bdd1ee5a2bfe5f6f32aedeb5e99f786b) Thanks [@JounQin](https://github.com/JounQin)! - feat(eslint): enable json-schema-validator for toml and yaml
14
+
15
+ ## 5.1.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [#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
20
+
3
21
  ## 5.0.0
4
22
 
5
23
  ### Major Changes
package/_util.js CHANGED
@@ -1,4 +1,4 @@
1
- const path = require('path')
1
+ const path = require('node:path')
2
2
 
3
3
  const {
4
4
  isMonorepo,
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,
@@ -86,7 +86,7 @@ const resolveSettings = {
86
86
  }
87
87
 
88
88
  const tsBase = {
89
- files: ['*.ts', '*.tsx'],
89
+ files: ['*.cts', '*.mts', '*.ts', '*.tsx'],
90
90
  extends: [
91
91
  'plugin:@typescript-eslint/eslint-recommended',
92
92
  'plugin:@typescript-eslint/recommended',
@@ -257,7 +257,7 @@ exports.ts = [
257
257
  ]
258
258
 
259
259
  exports.dTs = {
260
- files: '*.d.ts',
260
+ files: ['*.d.cts', '*.d.mts', '*.d.ts'],
261
261
  rules: {
262
262
  '@typescript-eslint/no-explicit-any': 0,
263
263
  '@typescript-eslint/no-extraneous-class': 0,
@@ -487,21 +487,32 @@ exports.config = exports.configs = {
487
487
  }
488
488
 
489
489
  exports.json = {
490
- files: '*.json',
490
+ files: ['.*rc', '*.json'],
491
+ excludedFiles: ['.browserslistrc', '.npmrc', '.nvmrc', '.yarnrc', '.*shrc'],
491
492
  extends: [
492
493
  // eslint-disable-next-line sonarjs/no-duplicate-string
493
494
  'plugin:jsonc/auto-config',
494
495
  'plugin:jsonc/recommended-with-json',
495
496
  // eslint-disable-next-line sonarjs/no-duplicate-string
497
+ 'plugin:json-schema-validator/recommended',
498
+ // eslint-disable-next-line sonarjs/no-duplicate-string
496
499
  'plugin:jsonc/prettier',
497
500
  ],
498
501
  }
499
502
 
500
503
  exports.jsonc = {
501
- files: '*.jsonc',
504
+ files: [
505
+ '*.jsonc',
506
+ 'angular.json',
507
+ 'jsconfig.json',
508
+ 'settings.json',
509
+ 'tsconfig.json',
510
+ 'tsconfig.*.json',
511
+ ],
502
512
  extends: [
503
513
  'plugin:jsonc/auto-config',
504
514
  'plugin:jsonc/recommended-with-jsonc',
515
+ 'plugin:json-schema-validator/recommended',
505
516
  'plugin:jsonc/prettier',
506
517
  ],
507
518
  }
@@ -511,18 +522,26 @@ exports.json5 = {
511
522
  extends: [
512
523
  'plugin:jsonc/auto-config',
513
524
  'plugin:jsonc/recommended-with-json5',
525
+ 'plugin:json-schema-validator/recommended',
514
526
  'plugin:jsonc/prettier',
515
527
  ],
516
528
  }
517
529
 
518
530
  exports.toml = {
519
531
  files: '*.toml',
520
- extends: ['plugin:toml/recommended'],
532
+ extends: [
533
+ 'plugin:toml/recommended',
534
+ 'plugin:json-schema-validator/recommended',
535
+ ],
521
536
  }
522
537
 
523
538
  exports.yml = exports.yaml = {
524
539
  files: ['*.yml', '*.yaml'],
525
- extends: ['plugin:yml/recommended', 'plugin:yml/prettier'],
540
+ extends: [
541
+ 'plugin:yml/recommended',
542
+ 'plugin:json-schema-validator/recommended',
543
+ 'plugin:yml/prettier',
544
+ ],
526
545
  }
527
546
 
528
547
  exports.overrides = []
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@1stg/eslint-config",
3
- "version": "5.0.0",
3
+ "version": "5.2.1",
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",
7
- "author": "JounQin <admin@1stg.me>",
7
+ "author": "JounQin (https://www.1stG.me) <admin@1stg.me>",
8
8
  "license": "MIT",
9
9
  "engines": {
10
- "node": "^12.20 || ^14.18.0 || >=16.0.0"
10
+ "node": "^12.20.0 || ^14.18.0 || >=16.0.0"
11
11
  },
12
12
  "peerDependencies": {
13
13
  "eslint": ">=6.0.0"
@@ -19,19 +19,22 @@
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.30.0",
23
- "@typescript-eslint/parser": "^5.30.0",
22
+ "@typescript-eslint/eslint-plugin": "^5.30.3",
23
+ "@typescript-eslint/parser": "^5.30.3",
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.1.1",
30
+ "eslint-import-resolver-typescript": "^3.1.4",
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.1.0",
35
38
  "eslint-plugin-jsonc": "^2.3.0",
36
39
  "eslint-plugin-markup": "^0.9.0",
37
40
  "eslint-plugin-mdx": "^2.0.1",
@@ -40,12 +43,13 @@
40
43
  "eslint-plugin-promise": "^6.0.0",
41
44
  "eslint-plugin-react": "^7.30.1",
42
45
  "eslint-plugin-react-hooks": "^4.6.0",
46
+ "eslint-plugin-regexp": "^1.7.0",
43
47
  "eslint-plugin-simple-import-sort": "^7.0.0",
44
48
  "eslint-plugin-sonar": "^0.8.0",
45
49
  "eslint-plugin-sonarjs": "^0.13.0",
46
50
  "eslint-plugin-svelte": "^2.0.0",
47
51
  "eslint-plugin-toml": "^0.3.1",
48
- "eslint-plugin-unicorn": "^42.0.0",
52
+ "eslint-plugin-unicorn": "^43.0.0",
49
53
  "eslint-plugin-vue": "^9.1.1",
50
54
  "eslint-plugin-yml": "^1.0.0"
51
55
  },