@1stg/eslint-config 7.0.1 → 8.0.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 +6 -0
- package/_util.js +5 -3
- package/base.js +3 -2
- package/overrides.js +10 -17
- package/package.json +31 -31
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 8.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#229](https://github.com/1stG/configs/pull/229) [`6561a5e`](https://github.com/1stG/configs/commit/6561a5e7f0274753e5e447a17439a7ed54b7b7c4) Thanks [@JounQin](https://github.com/JounQin)! - chore: bump all upgradable (dev)Dependencies
|
|
8
|
+
|
|
3
9
|
## 7.0.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/_util.js
CHANGED
|
@@ -4,12 +4,12 @@ const { preferPrettier } = require('@1stg/config')
|
|
|
4
4
|
const {
|
|
5
5
|
isMonorepo,
|
|
6
6
|
isPkgAvailable,
|
|
7
|
-
|
|
7
|
+
getMonorepoPkgs,
|
|
8
8
|
tryRequirePkg,
|
|
9
9
|
} = require('@pkgr/utils')
|
|
10
10
|
|
|
11
|
-
if (isMonorepo) {
|
|
12
|
-
exports.allowModules =
|
|
11
|
+
if (isMonorepo()) {
|
|
12
|
+
exports.allowModules = getMonorepoPkgs().reduce((acc, pkg) => {
|
|
13
13
|
const pkgJson = tryRequirePkg(path.resolve(pkg, 'package.json'))
|
|
14
14
|
if (!pkgJson) {
|
|
15
15
|
return acc
|
|
@@ -24,6 +24,8 @@ if (isMonorepo) {
|
|
|
24
24
|
}, [])
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
exports.isTsAvailable = isPkgAvailable('typescript')
|
|
28
|
+
|
|
27
29
|
exports.isWebpackAvailable = isPkgAvailable('webpack')
|
|
28
30
|
|
|
29
31
|
// https://webpack.js.org/api/module-variables/#__resourcequery-webpack-specific
|
package/base.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const { isPkgAvailable } = require('@pkgr/utils')
|
|
2
2
|
const { getGlobals } = require('eslint-plugin-mdx')
|
|
3
3
|
|
|
4
4
|
const {
|
|
5
|
+
isTsAvailable,
|
|
5
6
|
isWebpackAvailable,
|
|
6
7
|
magicNumbers,
|
|
7
8
|
webpackSpecVars,
|
|
@@ -18,7 +19,7 @@ module.exports = {
|
|
|
18
19
|
'plugin:promise/recommended',
|
|
19
20
|
'plugin:regexp/recommended',
|
|
20
21
|
'plugin:sonarjs/recommended',
|
|
21
|
-
|
|
22
|
+
isPkgAvailable('typescript') && 'plugin:sonar/recommended',
|
|
22
23
|
'plugin:unicorn/recommended',
|
|
23
24
|
'standard',
|
|
24
25
|
...prettierExtends,
|
package/overrides.js
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
const path = require('node:path')
|
|
2
2
|
|
|
3
3
|
const { jsoncFiles, nonJsonRcFiles, preferPrettier } = require('@1stg/config')
|
|
4
|
-
const {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
isPkgAvailable,
|
|
8
|
-
isSvelteAvailable,
|
|
9
|
-
isTsAvailable,
|
|
10
|
-
isVueAvailable,
|
|
11
|
-
tryFile,
|
|
12
|
-
tryPkg,
|
|
13
|
-
} = require('@pkgr/utils')
|
|
14
|
-
|
|
15
|
-
const { magicNumbers, prettierExtends } = require('./_util')
|
|
4
|
+
const { isPkgAvailable, tryFile, tryPkg } = require('@pkgr/utils')
|
|
5
|
+
|
|
6
|
+
const { isTsAvailable, magicNumbers, prettierExtends } = require('./_util')
|
|
16
7
|
|
|
17
8
|
const configFile =
|
|
18
9
|
tryFile(path.resolve('babel.config.js')) ||
|
|
@@ -172,7 +163,7 @@ const tsBase = {
|
|
|
172
163
|
'@typescript-eslint/prefer-for-of': 2,
|
|
173
164
|
'@typescript-eslint/prefer-function-type': 2,
|
|
174
165
|
'@typescript-eslint/prefer-ts-expect-error': 2,
|
|
175
|
-
'@typescript-eslint/sort-type-
|
|
166
|
+
'@typescript-eslint/sort-type-constituents': 2,
|
|
176
167
|
'@typescript-eslint/triple-slash-reference': [
|
|
177
168
|
2,
|
|
178
169
|
{
|
|
@@ -546,6 +537,8 @@ exports.yml = exports.yaml = {
|
|
|
546
537
|
extends: ['plugin:yml/recommended', 'plugin:yml/prettier'],
|
|
547
538
|
}
|
|
548
539
|
|
|
540
|
+
const isReactAvailable = isPkgAvailable('react')
|
|
541
|
+
|
|
549
542
|
exports.overrides = []
|
|
550
543
|
// eslint-disable-next-line unicorn/prefer-spread
|
|
551
544
|
.concat(
|
|
@@ -553,12 +546,12 @@ exports.overrides = []
|
|
|
553
546
|
isTsAvailable && exports.ts,
|
|
554
547
|
isReactAvailable && exports.react,
|
|
555
548
|
isReactAvailable && exports.reactHooks,
|
|
556
|
-
isReactAvailable && exports.reactTs,
|
|
549
|
+
isReactAvailable && isTsAvailable && exports.reactTs,
|
|
557
550
|
// The order matters, the later should to be preferred
|
|
558
551
|
exports.markup,
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
552
|
+
isPkgAvailable('@angular/core') && exports.angular,
|
|
553
|
+
isPkgAvailable('vue') && exports.vue,
|
|
554
|
+
isPkgAvailable('svelte') && exports.svelte,
|
|
562
555
|
exports.md,
|
|
563
556
|
exports.mdx,
|
|
564
557
|
isPkgAvailable('jest') && exports.jest,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1stg/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.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",
|
|
@@ -14,45 +14,45 @@
|
|
|
14
14
|
"eslint": ">=8.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@1stg/config": "^0.2.
|
|
18
|
-
"@angular-eslint/eslint-plugin": "^
|
|
19
|
-
"@angular-eslint/eslint-plugin-template": "^
|
|
20
|
-
"@angular-eslint/template-parser": "^
|
|
21
|
-
"@babel/eslint-parser": "^7.
|
|
22
|
-
"@babel/eslint-plugin": "^7.
|
|
23
|
-
"@eslint-community/eslint-plugin-eslint-comments": "^
|
|
24
|
-
"@pkgr/utils": "^
|
|
25
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
26
|
-
"@typescript-eslint/parser": "^
|
|
17
|
+
"@1stg/config": "^0.2.2",
|
|
18
|
+
"@angular-eslint/eslint-plugin": "^17.1.1",
|
|
19
|
+
"@angular-eslint/eslint-plugin-template": "^17.1.1",
|
|
20
|
+
"@angular-eslint/template-parser": "^17.1.1",
|
|
21
|
+
"@babel/eslint-parser": "^7.23.3",
|
|
22
|
+
"@babel/eslint-plugin": "^7.23.5",
|
|
23
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.1.0",
|
|
24
|
+
"@pkgr/utils": "^3.0.0",
|
|
25
|
+
"@typescript-eslint/eslint-plugin": "^6.16.0",
|
|
26
|
+
"@typescript-eslint/parser": "^6.16.0",
|
|
27
27
|
"angular-eslint-template-parser": "^0.1.1",
|
|
28
|
-
"eslint-config-prettier": "^
|
|
28
|
+
"eslint-config-prettier": "^9.1.0",
|
|
29
29
|
"eslint-config-standard": "^17.1.0",
|
|
30
30
|
"eslint-config-standard-jsx": "^11.0.0",
|
|
31
31
|
"eslint-config-standard-react": "^13.0.0",
|
|
32
32
|
"eslint-formatter-friendly": "^7.0.0",
|
|
33
|
-
"eslint-import-resolver-typescript": "^3.
|
|
34
|
-
"eslint-plugin-css": "^0.8.
|
|
35
|
-
"eslint-plugin-es-x": "^7.
|
|
36
|
-
"eslint-plugin-import": "npm:eslint-plugin-i@^2.
|
|
37
|
-
"eslint-plugin-jest": "^27.
|
|
38
|
-
"eslint-plugin-jsdoc": "^46.
|
|
39
|
-
"eslint-plugin-jsonc": "^2.
|
|
33
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
34
|
+
"eslint-plugin-css": "^0.8.1",
|
|
35
|
+
"eslint-plugin-es-x": "^7.5.0",
|
|
36
|
+
"eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1",
|
|
37
|
+
"eslint-plugin-jest": "^27.6.0",
|
|
38
|
+
"eslint-plugin-jsdoc": "^46.9.1",
|
|
39
|
+
"eslint-plugin-jsonc": "^2.11.2",
|
|
40
40
|
"eslint-plugin-markup": "^0.11.0",
|
|
41
|
-
"eslint-plugin-mdx": "^2.
|
|
42
|
-
"eslint-plugin-n": "^16.
|
|
43
|
-
"eslint-plugin-prettier": "^
|
|
41
|
+
"eslint-plugin-mdx": "^2.3.0",
|
|
42
|
+
"eslint-plugin-n": "^16.6.0",
|
|
43
|
+
"eslint-plugin-prettier": "^5.1.2",
|
|
44
44
|
"eslint-plugin-promise": "^6.1.1",
|
|
45
|
-
"eslint-plugin-react": "^7.
|
|
45
|
+
"eslint-plugin-react": "^7.33.2",
|
|
46
46
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
47
|
-
"eslint-plugin-regexp": "^1.
|
|
47
|
+
"eslint-plugin-regexp": "^2.1.2",
|
|
48
48
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
49
|
-
"eslint-plugin-sonar": "^0.
|
|
50
|
-
"eslint-plugin-sonarjs": "^0.
|
|
51
|
-
"eslint-plugin-svelte": "^2.
|
|
52
|
-
"eslint-plugin-toml": "^0.
|
|
53
|
-
"eslint-plugin-unicorn": "^
|
|
54
|
-
"eslint-plugin-vue": "^9.
|
|
55
|
-
"eslint-plugin-yml": "^1.
|
|
49
|
+
"eslint-plugin-sonar": "^0.13.1",
|
|
50
|
+
"eslint-plugin-sonarjs": "^0.23.0",
|
|
51
|
+
"eslint-plugin-svelte": "^2.35.1",
|
|
52
|
+
"eslint-plugin-toml": "^0.8.0",
|
|
53
|
+
"eslint-plugin-unicorn": "^50.0.1",
|
|
54
|
+
"eslint-plugin-vue": "^9.19.2",
|
|
55
|
+
"eslint-plugin-yml": "^1.11.0"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|