@w5s/eslint-config 1.0.0-alpha.29 → 1.0.0-alpha.31
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/es.js +0 -1
- package/ignore.js +38 -1
- package/index.js +1 -0
- package/json.js +22 -0
- package/package.json +11 -8
- package/rules/prettier.js +1 -0
- package/ts.js +0 -1
- package/yml.js +11 -0
package/es.js
CHANGED
package/ignore.js
CHANGED
|
@@ -1,3 +1,40 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
const fs = require('node:fs');
|
|
3
|
+
const findUp = require('find-up');
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
const parseGitignore = require('parse-gitignore');
|
|
6
|
+
|
|
7
|
+
const getGitignore = () => {
|
|
8
|
+
const found = findUp.sync('.gitignore');
|
|
9
|
+
if (found) {
|
|
10
|
+
return parseGitignore(fs.readFileSync(found));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return [];
|
|
14
|
+
};
|
|
15
|
+
|
|
1
16
|
module.exports = {
|
|
2
|
-
ignorePatterns: [
|
|
17
|
+
ignorePatterns: [
|
|
18
|
+
'!.*',
|
|
19
|
+
'.yarn',
|
|
20
|
+
'.common/',
|
|
21
|
+
'.config/package-lock.json',
|
|
22
|
+
'.config/yarn.lock',
|
|
23
|
+
'.go/',
|
|
24
|
+
'.modules/',
|
|
25
|
+
'.pnpm-store/',
|
|
26
|
+
'.venv/',
|
|
27
|
+
'deprecated/',
|
|
28
|
+
'angular.json',
|
|
29
|
+
'esbuild.js',
|
|
30
|
+
'package-lock.json',
|
|
31
|
+
'pnpm-lock.yaml',
|
|
32
|
+
'slim.report.json',
|
|
33
|
+
'test-output/',
|
|
34
|
+
'venv/',
|
|
35
|
+
'yarn.lock',
|
|
36
|
+
'_generated_/',
|
|
37
|
+
'*.toml',
|
|
38
|
+
...getGitignore(),
|
|
39
|
+
],
|
|
3
40
|
};
|
package/index.js
CHANGED
package/json.js
CHANGED
|
@@ -1,7 +1,28 @@
|
|
|
1
|
+
/* cspell:disable */
|
|
1
2
|
// https://github.com/keithamus/sort-package-json/blob/master/defaultRules.md
|
|
2
3
|
module.exports = {
|
|
3
4
|
extends: ['plugin:jsonc/recommended-with-jsonc', 'plugin:jsonc/prettier'],
|
|
4
5
|
overrides: [
|
|
6
|
+
{
|
|
7
|
+
files: ['*.json', '*.json5', '*.jsonc'],
|
|
8
|
+
parser: 'jsonc-eslint-parser',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
files: ['tsconfig*.json'],
|
|
12
|
+
rules: {
|
|
13
|
+
'jsonc/sort-keys': [
|
|
14
|
+
'error',
|
|
15
|
+
{
|
|
16
|
+
order: ['$schema', 'display', 'extends', 'compilerOptions', 'include', 'exclude', 'files', 'references'],
|
|
17
|
+
pathPattern: '^$',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
order: { type: 'asc' },
|
|
21
|
+
pathPattern: '.*',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
},
|
|
5
26
|
{
|
|
6
27
|
files: ['package.json'],
|
|
7
28
|
parser: 'jsonc-eslint-parser',
|
|
@@ -157,6 +178,7 @@ module.exports = {
|
|
|
157
178
|
},
|
|
158
179
|
},
|
|
159
180
|
],
|
|
181
|
+
plugins: ['jsonc'],
|
|
160
182
|
rules: {
|
|
161
183
|
// 'jsonc/sort-keys': 'error',
|
|
162
184
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@w5s/eslint-config",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.31",
|
|
4
4
|
"description": "ESLint configuration presets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"clean": "concurrently \"npm:clean:*\" \":\"",
|
|
31
31
|
"docs": "md-magic --path '**/*.md' --ignore='node_modules'",
|
|
32
32
|
"format": "concurrently \"npm:format:*\" \":\"",
|
|
33
|
-
"format:src": "eslint . --fix --ext=mjs,cjs,js,jsx,ts,tsx,json",
|
|
33
|
+
"format:src": "eslint . --fix --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml",
|
|
34
34
|
"lint": "concurrently \"npm:lint:*\" \":\"",
|
|
35
|
-
"lint:src": "eslint . --ext=mjs,cjs,js,jsx,ts,tsx,json",
|
|
35
|
+
"lint:src": "eslint . --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml",
|
|
36
36
|
"prepare": "concurrently \"npm:prepare:*\" \":\"",
|
|
37
37
|
"spellcheck": "cspell --no-progress '**'",
|
|
38
38
|
"test": "scripts/test"
|
|
@@ -55,22 +55,25 @@
|
|
|
55
55
|
"eslint-config-prettier": "^8.0.0",
|
|
56
56
|
"eslint-plugin-functional": "^4.2.0",
|
|
57
57
|
"eslint-plugin-import": "^2.25.0",
|
|
58
|
-
"eslint-plugin-jest": "^
|
|
58
|
+
"eslint-plugin-jest": "^27.0.0",
|
|
59
59
|
"eslint-plugin-jsdoc": "^39.0.0",
|
|
60
60
|
"eslint-plugin-jsonc": "^2.4.0",
|
|
61
61
|
"eslint-plugin-prettier": "^4.0.0",
|
|
62
62
|
"eslint-plugin-promise": "^6.0.0",
|
|
63
63
|
"eslint-plugin-react": "^7.28.0",
|
|
64
64
|
"eslint-plugin-total-functions": "^6.0.0",
|
|
65
|
-
"eslint-plugin-unicorn": "^43.0.0"
|
|
65
|
+
"eslint-plugin-unicorn": "^43.0.0",
|
|
66
|
+
"eslint-plugin-yml": "^1.1.0",
|
|
67
|
+
"find-up": "^5.0.0",
|
|
68
|
+
"parse-gitignore": "^1.0.1"
|
|
66
69
|
},
|
|
67
70
|
"devDependencies": {
|
|
68
71
|
"@babel/eslint-parser": "7.18.9",
|
|
69
72
|
"@types/eslint": "8.4.6",
|
|
70
73
|
"@types/eslint-plugin-prettier": "3.1.0",
|
|
71
74
|
"@types/prettier": "2.7.0",
|
|
72
|
-
"@types/react": "18.0.
|
|
73
|
-
"@typescript-eslint/parser": "5.
|
|
75
|
+
"@types/react": "18.0.18",
|
|
76
|
+
"@typescript-eslint/parser": "5.36.1",
|
|
74
77
|
"eslint": "8.23.0",
|
|
75
78
|
"eslint-config-prettier": "8.5.0",
|
|
76
79
|
"eslint-index": "1.5.0",
|
|
@@ -93,5 +96,5 @@
|
|
|
93
96
|
"publishConfig": {
|
|
94
97
|
"access": "public"
|
|
95
98
|
},
|
|
96
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "f75f847322f3dcb879e5a52e09dd834ab15b9186"
|
|
97
100
|
}
|
package/rules/prettier.js
CHANGED
package/ts.js
CHANGED