@luxass/eslint-config 2.0.0 → 2.1.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/package.json +2 -1
- package/src/index.js +120 -107
- package/src/typescript.js +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxass/eslint-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "luxass' ESLint config",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Lucas Norgaard",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"@typescript-eslint/eslint-plugin": "^5.46.0",
|
|
31
31
|
"@typescript-eslint/parser": "^5.46.0",
|
|
32
32
|
"eslint-config-standard": "^17.0.0",
|
|
33
|
+
"eslint-plugin-astro": "^0.21.0",
|
|
33
34
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
34
35
|
"eslint-plugin-import": "^2.26.0",
|
|
35
36
|
"eslint-plugin-jsonc": "^2.5.0",
|
package/src/index.js
CHANGED
|
@@ -6,162 +6,175 @@ module.exports = {
|
|
|
6
6
|
},
|
|
7
7
|
reportUnusedDisableDirectives: true,
|
|
8
8
|
extends: [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
"eslint-config-standard",
|
|
10
|
+
"plugin:import/recommended",
|
|
11
|
+
"plugin:eslint-comments/recommended",
|
|
12
|
+
"plugin:jsonc/recommended-with-jsonc",
|
|
13
|
+
"plugin:markdown/recommended",
|
|
14
|
+
"plugin:yml/standard",
|
|
15
|
+
"plugin:astro/recommended",
|
|
16
|
+
"./javascript",
|
|
17
|
+
"./typescript"
|
|
17
18
|
],
|
|
18
19
|
ignorePatterns: [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
"*.min.*",
|
|
21
|
+
"CHANGELOG.md",
|
|
22
|
+
"dist",
|
|
23
|
+
"build",
|
|
24
|
+
"LICENSE*",
|
|
25
|
+
"coverage",
|
|
26
|
+
"public",
|
|
27
|
+
"package-lock.json",
|
|
28
|
+
"pnpm-lock.yaml",
|
|
29
|
+
"yarn.lock",
|
|
30
|
+
"!.github",
|
|
31
|
+
"!.vscode"
|
|
31
32
|
],
|
|
32
|
-
plugins: [
|
|
33
|
+
plugins: ["unicorn"],
|
|
33
34
|
settings: {
|
|
34
|
-
|
|
35
|
-
node: { extensions: [
|
|
35
|
+
"import/resolver": {
|
|
36
|
+
node: { extensions: [".js", ".mjs"] }
|
|
36
37
|
}
|
|
37
38
|
},
|
|
38
39
|
overrides: [
|
|
39
40
|
{
|
|
40
|
-
files: [
|
|
41
|
-
parser:
|
|
41
|
+
files: ["*.json", "*.json5"],
|
|
42
|
+
parser: "jsonc-eslint-parser",
|
|
42
43
|
rules: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
"jsonc/array-bracket-spacing": ["error", "never"],
|
|
45
|
+
"jsonc/comma-dangle": ["error", "never"],
|
|
46
|
+
"jsonc/comma-style": ["error", "last"],
|
|
47
|
+
"jsonc/indent": ["error", 2],
|
|
48
|
+
"jsonc/key-spacing": ["error", { beforeColon: false, afterColon: true }],
|
|
49
|
+
"jsonc/no-octal-escape": "error",
|
|
50
|
+
"jsonc/object-curly-newline": ["error", { multiline: true, consistent: true }],
|
|
51
|
+
"jsonc/object-curly-spacing": ["error", "always"],
|
|
52
|
+
"jsonc/object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }]
|
|
52
53
|
}
|
|
53
54
|
},
|
|
54
55
|
{
|
|
55
|
-
files: [
|
|
56
|
-
parser:
|
|
56
|
+
files: ["*.yaml", "*.yml"],
|
|
57
|
+
parser: "yaml-eslint-parser",
|
|
57
58
|
rules: {
|
|
58
|
-
|
|
59
|
+
"spaced-comment": "off"
|
|
59
60
|
}
|
|
60
61
|
},
|
|
61
62
|
{
|
|
62
|
-
files: [
|
|
63
|
-
parser:
|
|
63
|
+
files: ["package.json"],
|
|
64
|
+
parser: "jsonc-eslint-parser",
|
|
64
65
|
rules: {
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
"jsonc/sort-keys": [
|
|
67
|
+
"error",
|
|
67
68
|
{
|
|
68
|
-
pathPattern:
|
|
69
|
+
pathPattern: "^$",
|
|
69
70
|
order: [
|
|
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
|
-
|
|
71
|
+
"name",
|
|
72
|
+
"publisher",
|
|
73
|
+
"displayName",
|
|
74
|
+
"version",
|
|
75
|
+
"private",
|
|
76
|
+
"type",
|
|
77
|
+
"packageManager",
|
|
78
|
+
"description",
|
|
79
|
+
"author",
|
|
80
|
+
"license",
|
|
81
|
+
"funding",
|
|
82
|
+
"homepage",
|
|
83
|
+
"repository",
|
|
84
|
+
"bugs",
|
|
85
|
+
"keywords",
|
|
86
|
+
"categories",
|
|
87
|
+
"sideEffects",
|
|
88
|
+
"exports",
|
|
89
|
+
"main",
|
|
90
|
+
"module",
|
|
91
|
+
"types",
|
|
92
|
+
"typesVersions",
|
|
93
|
+
"bin",
|
|
94
|
+
"icon",
|
|
95
|
+
"files",
|
|
96
|
+
"engines",
|
|
97
|
+
"activationEvents",
|
|
98
|
+
"contributes",
|
|
99
|
+
"scripts",
|
|
100
|
+
"peerDependencies",
|
|
101
|
+
"peerDependenciesMeta",
|
|
102
|
+
"dependencies",
|
|
103
|
+
"optionalDependencies",
|
|
104
|
+
"devDependencies",
|
|
105
|
+
"pnpm"
|
|
105
106
|
]
|
|
106
107
|
},
|
|
107
108
|
{
|
|
108
|
-
pathPattern:
|
|
109
|
-
order: { type:
|
|
109
|
+
pathPattern: "^(?:dev|peer|optional|bundled)?[Dd]ependencies$",
|
|
110
|
+
order: { type: "asc" }
|
|
110
111
|
},
|
|
111
112
|
{
|
|
112
|
-
pathPattern:
|
|
113
|
-
order: [
|
|
113
|
+
pathPattern: "^exports.*$",
|
|
114
|
+
order: ["types", "require", "import"]
|
|
114
115
|
}
|
|
115
116
|
]
|
|
116
117
|
}
|
|
117
118
|
},
|
|
118
119
|
{
|
|
119
|
-
files: [
|
|
120
|
+
files: ["*.d.ts"],
|
|
120
121
|
rules: {
|
|
121
|
-
|
|
122
|
+
"import/no-duplicates": "off"
|
|
122
123
|
}
|
|
123
124
|
},
|
|
124
125
|
{
|
|
125
|
-
files: [
|
|
126
|
+
files: ["*.js"],
|
|
126
127
|
rules: {
|
|
127
|
-
|
|
128
|
+
"@typescript-eslint/no-var-requires": "off"
|
|
128
129
|
}
|
|
129
130
|
},
|
|
130
131
|
{
|
|
131
|
-
files: [
|
|
132
|
+
files: ["scripts/**/*.*", "cli.*"],
|
|
132
133
|
rules: {
|
|
133
|
-
|
|
134
|
+
"no-console": "off"
|
|
134
135
|
}
|
|
135
136
|
},
|
|
136
137
|
{
|
|
137
|
-
files: [
|
|
138
|
+
files: ["*.test.ts", "*.test.js", "*.spec.ts", "*.spec.js"],
|
|
138
139
|
rules: {
|
|
139
|
-
|
|
140
|
+
"no-unused-expressions": "off"
|
|
140
141
|
}
|
|
141
142
|
},
|
|
142
143
|
{
|
|
143
|
-
files: [
|
|
144
|
+
files: ["**/*.md/*.*"],
|
|
144
145
|
rules: {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
146
|
+
"@typescript-eslint/no-redeclare": "off",
|
|
147
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
148
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
149
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
150
|
+
"@typescript-eslint/comma-dangle": "off",
|
|
151
|
+
"import/no-unresolved": "off",
|
|
152
|
+
"no-alert": "off",
|
|
153
|
+
"no-console": "off",
|
|
154
|
+
"no-restricted-imports": "off",
|
|
155
|
+
"no-undef": "off",
|
|
156
|
+
"no-unused-expressions": "off",
|
|
157
|
+
"no-unused-vars": "off"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
files: ["*.astro"],
|
|
162
|
+
parser: "astro-eslint-parser",
|
|
163
|
+
parserOptions: {
|
|
164
|
+
parser: "@typescript-eslint/parser",
|
|
165
|
+
extraFileExtensions: [".astro"],
|
|
166
|
+
},
|
|
167
|
+
rules: {
|
|
168
|
+
"astro/no-deprecated-astro-canonicalurl": "error",
|
|
169
|
+
"no-tabs": "off",
|
|
157
170
|
}
|
|
158
171
|
}
|
|
159
172
|
],
|
|
160
173
|
rules: {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
174
|
+
"eol-last": "off",
|
|
175
|
+
"no-trailing-spaces": "off",
|
|
176
|
+
"padded-blocks": "off",
|
|
177
|
+
"yml/quotes": ["error", { prefer: "single", avoidEscape: false }],
|
|
178
|
+
"yml/no-empty-document": "off"
|
|
166
179
|
}
|
|
167
180
|
};
|
package/src/typescript.js
CHANGED
|
@@ -17,7 +17,10 @@ module.exports = {
|
|
|
17
17
|
"@typescript-eslint/ban-ts-comment": ["error", { "ts-ignore": "allow-with-description" }],
|
|
18
18
|
"@typescript-eslint/member-delimiter-style": "warn",
|
|
19
19
|
"@typescript-eslint/type-annotation-spacing": ["error", {}],
|
|
20
|
-
"@typescript-eslint/consistent-type-imports": "warn",
|
|
20
|
+
"@typescript-eslint/consistent-type-imports": ["warn", {
|
|
21
|
+
prefer: "type-imports",
|
|
22
|
+
disallowTypeAnnotations: false
|
|
23
|
+
}],
|
|
21
24
|
"no-useless-constructor": "off",
|
|
22
25
|
indent: "off",
|
|
23
26
|
"@typescript-eslint/indent": [
|