@1stg/eslint-config 5.0.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 CHANGED
@@ -1,5 +1,11 @@
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
+
3
9
  ## 5.0.0
4
10
 
5
11
  ### 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,6 +522,7 @@ 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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1stg/eslint-config",
3
- "version": "5.0.0",
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",
@@ -27,11 +27,14 @@
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.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",
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
  },