@w5s/eslint-config 1.0.0-alpha.28 → 1.0.0-alpha.30

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