-
Notifications
You must be signed in to change notification settings - Fork 0
/
extra.js
112 lines (109 loc) · 2.58 KB
/
extra.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// Based off: https://github.com/TotomInc/eslint-config-vue/blob/master/extra.js
/** @type {import('eslint').Linter.Config} */
module.exports = {
// Files patterns that should be ignored.
ignorePatterns: [
"dist",
"output",
"coverage",
"public",
"temp",
"tmp",
"yarn.lock",
"pnpm-lock.yaml",
"package-lock.json",
"tsconfig.json",
"tsconfig.*.json",
".eslintrc.js",
"*.d.ts",
'!.github',
'!.vscode',
],
extends: [
// Various linters for other languages.
"plugin:jsonc/recommended-with-jsonc",
"plugin:yml/standard",
],
overrides: [
// Custom overrides for JSON.
{
files: ["*.json", "*.json5", "*.jsonc"],
parser: "jsonc-eslint-parser",
},
// Custom overrides for package.json.
{
files: ["package.json"],
parser: "jsonc-eslint-parser",
rules: {
'jsonc/sort-keys': [
'error',
{
pathPattern: '^$',
order: [
'publisher',
'name',
'displayName',
'type',
'version',
'private',
'packageManager',
'description',
'author',
'license',
'funding',
'homepage',
'repository',
'bugs',
'keywords',
'categories',
'sideEffects',
'exports',
'main',
'module',
'unpkg',
'jsdelivr',
'types',
'typesVersions',
'bin',
'icon',
'files',
'engines',
'activationEvents',
'contributes',
'scripts',
'peerDependencies',
'peerDependenciesMeta',
'dependencies',
'optionalDependencies',
'devDependencies',
'pnpm',
'overrides',
'resolutions',
'husky',
'simple-git-hooks',
'lint-staged',
'eslintConfig',
],
},
{
pathPattern: '^(?:dev|peer|optional|bundled)?[Dd]ependencies$',
order: { type: 'asc' },
},
{
pathPattern: '^exports.*$',
order: [
'types',
'require',
'import',
],
},
],
},
},
// Custom overrides for YML.
{
files: ['*.yaml', '*.yml'],
parser: 'yaml-eslint-parser',
},
],
};