@w5s/eslint-config 1.0.0-alpha.28 → 1.0.0-alpha.29
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/json.js +160 -6
- package/package.json +3 -3
package/json.js
CHANGED
|
@@ -1,9 +1,163 @@
|
|
|
1
|
+
// https://github.com/keithamus/sort-package-json/blob/master/defaultRules.md
|
|
1
2
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
extends: ['plugin:jsonc/recommended-with-jsonc', 'plugin:jsonc/prettier'],
|
|
4
|
+
overrides: [
|
|
5
|
+
{
|
|
6
|
+
files: ['package.json'],
|
|
7
|
+
parser: 'jsonc-eslint-parser',
|
|
8
|
+
rules: {
|
|
9
|
+
'jsonc/sort-keys': [
|
|
10
|
+
'error',
|
|
11
|
+
{
|
|
12
|
+
order: [
|
|
13
|
+
'$schema',
|
|
14
|
+
'name',
|
|
15
|
+
'displayName',
|
|
16
|
+
'version',
|
|
17
|
+
'private',
|
|
18
|
+
'description',
|
|
19
|
+
'categories',
|
|
20
|
+
'keywords',
|
|
21
|
+
'homepage',
|
|
22
|
+
'bugs',
|
|
23
|
+
'repository',
|
|
24
|
+
'funding',
|
|
25
|
+
'license',
|
|
26
|
+
'qna',
|
|
27
|
+
'author',
|
|
28
|
+
'maintainers', // Key order (per item): name, email, url
|
|
29
|
+
'contributors', // Key order (per item): name, email, url
|
|
30
|
+
'publisher',
|
|
31
|
+
'sideEffects',
|
|
32
|
+
'type',
|
|
33
|
+
'imports',
|
|
34
|
+
'exports',
|
|
35
|
+
'main',
|
|
36
|
+
'svelte',
|
|
37
|
+
'umd:main',
|
|
38
|
+
'jsdelivr',
|
|
39
|
+
'unpkg',
|
|
40
|
+
'module',
|
|
41
|
+
'source',
|
|
42
|
+
'jsnext:main',
|
|
43
|
+
'browser',
|
|
44
|
+
'react-native',
|
|
45
|
+
'types',
|
|
46
|
+
'typesVersions',
|
|
47
|
+
'typings',
|
|
48
|
+
'style',
|
|
49
|
+
'example',
|
|
50
|
+
'examplestyle',
|
|
51
|
+
'assets',
|
|
52
|
+
'bin',
|
|
53
|
+
'man',
|
|
54
|
+
'directories', // Key order: lib, bin, man, doc, example, test
|
|
55
|
+
'files', // Unique items
|
|
56
|
+
'workspaces',
|
|
57
|
+
'binary', // Key order: module_name, module_path, remote_path, package_name, host
|
|
58
|
+
'scripts', // Script sort
|
|
59
|
+
'betterScripts', // Script sort
|
|
60
|
+
'contributes',
|
|
61
|
+
'activationEvents', // Unique items
|
|
62
|
+
'husky', // Sorts the hooks field using git hook sort
|
|
63
|
+
'simple-git-hooks', // Key sort using git hook sort
|
|
64
|
+
'pre-commit',
|
|
65
|
+
'commitlint',
|
|
66
|
+
'lint-staged',
|
|
67
|
+
'config',
|
|
68
|
+
'nodemonConfig',
|
|
69
|
+
'browserify',
|
|
70
|
+
'babel',
|
|
71
|
+
'browserslist',
|
|
72
|
+
'xo',
|
|
73
|
+
'prettier', // Prettier sort
|
|
74
|
+
'eslintConfig', // ESLint sort
|
|
75
|
+
'eslintIgnore',
|
|
76
|
+
'npmpackagejsonlint', // Key sort (also recognizes: npmPackageJsonLintConfig, npmpkgjsonlint)
|
|
77
|
+
'release',
|
|
78
|
+
'remarkConfig',
|
|
79
|
+
'stylelint',
|
|
80
|
+
'ava',
|
|
81
|
+
'jest',
|
|
82
|
+
'mocha',
|
|
83
|
+
'nyc',
|
|
84
|
+
'tap',
|
|
85
|
+
'resolutions',
|
|
86
|
+
'dependencies',
|
|
87
|
+
'devDependencies',
|
|
88
|
+
'dependenciesMeta', // Key sort (deep)
|
|
89
|
+
'peerDependencies',
|
|
90
|
+
'peerDependenciesMeta', // Key sort (deep)
|
|
91
|
+
'optionalDependencies',
|
|
92
|
+
'bundledDependencies',
|
|
93
|
+
'bundleDependencies',
|
|
94
|
+
'extensionPack',
|
|
95
|
+
'extensionDependencies',
|
|
96
|
+
'flat',
|
|
97
|
+
'packageManager',
|
|
98
|
+
'engines',
|
|
99
|
+
'engineStrict',
|
|
100
|
+
'volta', // Key order: node, npm, yarn
|
|
101
|
+
'languageName',
|
|
102
|
+
'os',
|
|
103
|
+
'cpu',
|
|
104
|
+
'preferGlobal',
|
|
105
|
+
'publishConfig',
|
|
106
|
+
'icon',
|
|
107
|
+
'badges', // Key order (per item): description, url, href
|
|
108
|
+
'galleryBanner',
|
|
109
|
+
'preview',
|
|
110
|
+
'markdown',
|
|
111
|
+
],
|
|
112
|
+
pathPattern: '^$',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
order: ['url', 'email'],
|
|
116
|
+
pathPattern: `^bugs$`,
|
|
117
|
+
},
|
|
118
|
+
...['repository', 'funding', 'license', 'author'].map((key) => ({
|
|
119
|
+
order: ['type', 'name', 'email', 'url'],
|
|
120
|
+
pathPattern: `^${key}$`,
|
|
121
|
+
})),
|
|
122
|
+
...[
|
|
123
|
+
'bin',
|
|
124
|
+
'contributes',
|
|
125
|
+
'commitlint',
|
|
126
|
+
'config',
|
|
127
|
+
'nodemonConfig',
|
|
128
|
+
'browserify',
|
|
129
|
+
'babel',
|
|
130
|
+
'xo',
|
|
131
|
+
'release',
|
|
132
|
+
'remarkConfig',
|
|
133
|
+
'ava',
|
|
134
|
+
'jest',
|
|
135
|
+
'mocha',
|
|
136
|
+
'nyc',
|
|
137
|
+
'tap',
|
|
138
|
+
'resolutions',
|
|
139
|
+
'engines',
|
|
140
|
+
'engineStrict',
|
|
141
|
+
'preferGlobal',
|
|
142
|
+
'publishConfig',
|
|
143
|
+
'galleryBanner',
|
|
144
|
+
].map((key) => ({
|
|
145
|
+
order: { type: 'asc' },
|
|
146
|
+
pathPattern: `^${key}$`,
|
|
147
|
+
})),
|
|
148
|
+
{
|
|
149
|
+
order: { type: 'asc' },
|
|
150
|
+
pathPattern: '^(?:dev|peer|optional|bundled|extension)?[Dd]ependencies$',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
order: ['types', 'require', 'import'],
|
|
154
|
+
pathPattern: '^exports.*$',
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
rules: {
|
|
161
|
+
// 'jsonc/sort-keys': 'error',
|
|
8
162
|
},
|
|
9
163
|
};
|
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.29",
|
|
4
4
|
"description": "ESLint configuration presets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"eslint-plugin-import": "^2.25.0",
|
|
58
58
|
"eslint-plugin-jest": "^26.0.0",
|
|
59
59
|
"eslint-plugin-jsdoc": "^39.0.0",
|
|
60
|
-
"eslint-plugin-
|
|
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",
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"publishConfig": {
|
|
94
94
|
"access": "public"
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "18cd55f50f759629d9a0feadba44df1b44b4dfb0"
|
|
97
97
|
}
|