@luxass/eslint-config 4.2.6 → 4.2.8
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/README.md +4 -5
- package/dist/index.cjs +165 -446
- package/dist/index.d.cts +733 -12
- package/dist/index.d.ts +733 -12
- package/dist/{configs/index.cjs → index.js} +308 -516
- package/package.json +51 -85
- package/dist/chunk-2IR43M6N.mjs +0 -48
- package/dist/chunk-47ISSTHW.mjs +0 -291
- package/dist/chunk-4YBQZLPS.mjs +0 -68
- package/dist/chunk-4YT54JFZ.mjs +0 -48
- package/dist/chunk-5NK24IKQ.mjs +0 -26
- package/dist/chunk-AJS3TMZE.mjs +0 -63
- package/dist/chunk-C6FE5KXJ.mjs +0 -104
- package/dist/chunk-DAJA5AV3.mjs +0 -29
- package/dist/chunk-DCOLHWHC.mjs +0 -269
- package/dist/chunk-E4RVBKZB.mjs +0 -207
- package/dist/chunk-HZNHG5PB.mjs +0 -45
- package/dist/chunk-KOXCJL3C.mjs +0 -109
- package/dist/chunk-PFCAWBCD.mjs +0 -93
- package/dist/chunk-PFYV2TWZ.mjs +0 -117
- package/dist/chunk-QT6FHTFU.mjs +0 -92
- package/dist/chunk-RDZJT36Z.mjs +0 -57
- package/dist/chunk-RVSUTDCE.mjs +0 -57
- package/dist/chunk-TWAETZPX.mjs +0 -149
- package/dist/chunk-WSQOWO67.mjs +0 -16
- package/dist/chunk-XBASVDU6.mjs +0 -215
- package/dist/chunk-XD3UVRU7.mjs +0 -274
- package/dist/chunk-XGI647GZ.mjs +0 -81
- package/dist/chunk-XMXYE5WC.mjs +0 -183
- package/dist/chunk-YNMFVYL6.mjs +0 -69
- package/dist/chunk-YO3IYQ2L.mjs +0 -220
- package/dist/chunk-YZCJUX6Z.mjs +0 -0
- package/dist/configs/comments.cjs +0 -63
- package/dist/configs/comments.d.cts +0 -15
- package/dist/configs/comments.d.ts +0 -15
- package/dist/configs/comments.mjs +0 -6
- package/dist/configs/css/tailwindcss.cjs +0 -148
- package/dist/configs/css/tailwindcss.d.cts +0 -11
- package/dist/configs/css/tailwindcss.d.ts +0 -11
- package/dist/configs/css/tailwindcss.mjs +0 -8
- package/dist/configs/css/unocss.cjs +0 -133
- package/dist/configs/css/unocss.d.cts +0 -11
- package/dist/configs/css/unocss.d.ts +0 -11
- package/dist/configs/css/unocss.mjs +0 -8
- package/dist/configs/data/json.cjs +0 -155
- package/dist/configs/data/json.d.cts +0 -11
- package/dist/configs/data/json.d.ts +0 -11
- package/dist/configs/data/json.mjs +0 -8
- package/dist/configs/data/toml.cjs +0 -131
- package/dist/configs/data/toml.d.cts +0 -11
- package/dist/configs/data/toml.d.ts +0 -11
- package/dist/configs/data/toml.mjs +0 -8
- package/dist/configs/data/yaml.cjs +0 -143
- package/dist/configs/data/yaml.d.cts +0 -11
- package/dist/configs/data/yaml.d.ts +0 -11
- package/dist/configs/data/yaml.mjs +0 -8
- package/dist/configs/docs/jsdoc.cjs +0 -85
- package/dist/configs/docs/jsdoc.d.cts +0 -27
- package/dist/configs/docs/jsdoc.d.ts +0 -27
- package/dist/configs/docs/jsdoc.mjs +0 -7
- package/dist/configs/docs/markdown.cjs +0 -164
- package/dist/configs/docs/markdown.d.cts +0 -35
- package/dist/configs/docs/markdown.d.ts +0 -35
- package/dist/configs/docs/markdown.mjs +0 -8
- package/dist/configs/formatters.cjs +0 -274
- package/dist/configs/formatters.d.cts +0 -11
- package/dist/configs/formatters.d.ts +0 -11
- package/dist/configs/formatters.mjs +0 -9
- package/dist/configs/frameworks/astro.cjs +0 -179
- package/dist/configs/frameworks/astro.d.cts +0 -11
- package/dist/configs/frameworks/astro.d.ts +0 -11
- package/dist/configs/frameworks/astro.mjs +0 -8
- package/dist/configs/frameworks/nextjs.cjs +0 -180
- package/dist/configs/frameworks/nextjs.d.cts +0 -11
- package/dist/configs/frameworks/nextjs.d.ts +0 -11
- package/dist/configs/frameworks/nextjs.mjs +0 -8
- package/dist/configs/frameworks/react.cjs +0 -377
- package/dist/configs/frameworks/react.d.cts +0 -11
- package/dist/configs/frameworks/react.d.ts +0 -11
- package/dist/configs/frameworks/react.mjs +0 -8
- package/dist/configs/frameworks/solid.cjs +0 -360
- package/dist/configs/frameworks/solid.d.cts +0 -11
- package/dist/configs/frameworks/solid.d.ts +0 -11
- package/dist/configs/frameworks/solid.mjs +0 -8
- package/dist/configs/frameworks/vue.cjs +0 -293
- package/dist/configs/frameworks/vue.d.cts +0 -11
- package/dist/configs/frameworks/vue.d.ts +0 -11
- package/dist/configs/frameworks/vue.mjs +0 -8
- package/dist/configs/ignores.cjs +0 -96
- package/dist/configs/ignores.d.cts +0 -15
- package/dist/configs/ignores.d.ts +0 -15
- package/dist/configs/ignores.mjs +0 -7
- package/dist/configs/imports.cjs +0 -104
- package/dist/configs/imports.d.cts +0 -23
- package/dist/configs/imports.d.ts +0 -23
- package/dist/configs/imports.mjs +0 -7
- package/dist/configs/index.d.cts +0 -19
- package/dist/configs/index.d.ts +0 -19
- package/dist/configs/index.mjs +0 -99
- package/dist/configs/javascript.cjs +0 -324
- package/dist/configs/javascript.d.cts +0 -11
- package/dist/configs/javascript.d.ts +0 -11
- package/dist/configs/javascript.mjs +0 -7
- package/dist/configs/node.cjs +0 -60
- package/dist/configs/node.d.cts +0 -15
- package/dist/configs/node.d.ts +0 -15
- package/dist/configs/node.mjs +0 -6
- package/dist/configs/sort.cjs +0 -240
- package/dist/configs/sort.d.cts +0 -26
- package/dist/configs/sort.d.ts +0 -26
- package/dist/configs/sort.mjs +0 -8
- package/dist/configs/stylistic.cjs +0 -98
- package/dist/configs/stylistic.d.cts +0 -11
- package/dist/configs/stylistic.d.ts +0 -11
- package/dist/configs/stylistic.mjs +0 -9
- package/dist/configs/test.cjs +0 -210
- package/dist/configs/test.d.cts +0 -11
- package/dist/configs/test.d.ts +0 -11
- package/dist/configs/test.mjs +0 -8
- package/dist/configs/typescript.cjs +0 -291
- package/dist/configs/typescript.d.cts +0 -11
- package/dist/configs/typescript.d.ts +0 -11
- package/dist/configs/typescript.mjs +0 -8
- package/dist/configs/unicorn.cjs +0 -91
- package/dist/configs/unicorn.d.cts +0 -15
- package/dist/configs/unicorn.d.ts +0 -15
- package/dist/configs/unicorn.mjs +0 -6
- package/dist/globs.cjs +0 -158
- package/dist/globs.d.cts +0 -28
- package/dist/globs.d.ts +0 -28
- package/dist/globs.mjs +0 -56
- package/dist/index.mjs +0 -278
- package/dist/types-HqEzZfQU.d.cts +0 -668
- package/dist/types-HqEzZfQU.d.ts +0 -668
package/dist/chunk-XD3UVRU7.mjs
DELETED
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ensure,
|
|
3
|
-
interop
|
|
4
|
-
} from "./chunk-4YBQZLPS.mjs";
|
|
5
|
-
import {
|
|
6
|
-
GLOB_JSX,
|
|
7
|
-
GLOB_TSX
|
|
8
|
-
} from "./chunk-KOXCJL3C.mjs";
|
|
9
|
-
|
|
10
|
-
// src/configs/frameworks/solid.ts
|
|
11
|
-
async function solid(options = {}) {
|
|
12
|
-
const {
|
|
13
|
-
a11y = false,
|
|
14
|
-
files = [GLOB_JSX, GLOB_TSX],
|
|
15
|
-
overrides = {},
|
|
16
|
-
typescript = true
|
|
17
|
-
} = options;
|
|
18
|
-
await ensure([
|
|
19
|
-
"eslint-plugin-solid"
|
|
20
|
-
]);
|
|
21
|
-
const [
|
|
22
|
-
pluginSolid
|
|
23
|
-
] = await Promise.all([
|
|
24
|
-
interop(import("eslint-plugin-solid"))
|
|
25
|
-
]);
|
|
26
|
-
return [
|
|
27
|
-
{
|
|
28
|
-
name: "luxass:solid:setup",
|
|
29
|
-
plugins: {
|
|
30
|
-
solid: pluginSolid
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: "luxass:solid:rules",
|
|
35
|
-
files,
|
|
36
|
-
languageOptions: {
|
|
37
|
-
parserOptions: {
|
|
38
|
-
ecmaFeatures: {
|
|
39
|
-
jsx: true
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
sourceType: "module"
|
|
43
|
-
},
|
|
44
|
-
rules: {
|
|
45
|
-
...a11y ? {
|
|
46
|
-
// recommended rules for jsx-a11y
|
|
47
|
-
"jsx-a11y/alt-text": "error",
|
|
48
|
-
"jsx-a11y/anchor-ambiguous-text": "off",
|
|
49
|
-
"jsx-a11y/anchor-has-content": "error",
|
|
50
|
-
"jsx-a11y/anchor-is-valid": "error",
|
|
51
|
-
"jsx-a11y/aria-activedescendant-has-tabindex": "error",
|
|
52
|
-
"jsx-a11y/aria-props": "error",
|
|
53
|
-
"jsx-a11y/aria-proptypes": "error",
|
|
54
|
-
"jsx-a11y/aria-role": "error",
|
|
55
|
-
"jsx-a11y/aria-unsupported-elements": "error",
|
|
56
|
-
"jsx-a11y/autocomplete-valid": "error",
|
|
57
|
-
"jsx-a11y/click-events-have-key-events": "error",
|
|
58
|
-
"jsx-a11y/control-has-associated-label": [
|
|
59
|
-
"off",
|
|
60
|
-
{
|
|
61
|
-
ignoreElements: [
|
|
62
|
-
"audio",
|
|
63
|
-
"canvas",
|
|
64
|
-
"embed",
|
|
65
|
-
"input",
|
|
66
|
-
"textarea",
|
|
67
|
-
"tr",
|
|
68
|
-
"video"
|
|
69
|
-
],
|
|
70
|
-
ignoreRoles: [
|
|
71
|
-
"grid",
|
|
72
|
-
"listbox",
|
|
73
|
-
"menu",
|
|
74
|
-
"menubar",
|
|
75
|
-
"radiogroup",
|
|
76
|
-
"row",
|
|
77
|
-
"tablist",
|
|
78
|
-
"toolbar",
|
|
79
|
-
"tree",
|
|
80
|
-
"treegrid"
|
|
81
|
-
],
|
|
82
|
-
includeRoles: [
|
|
83
|
-
"alert",
|
|
84
|
-
"dialog"
|
|
85
|
-
]
|
|
86
|
-
}
|
|
87
|
-
],
|
|
88
|
-
"jsx-a11y/heading-has-content": "error",
|
|
89
|
-
"jsx-a11y/html-has-lang": "error",
|
|
90
|
-
"jsx-a11y/iframe-has-title": "error",
|
|
91
|
-
"jsx-a11y/img-redundant-alt": "error",
|
|
92
|
-
"jsx-a11y/interactive-supports-focus": [
|
|
93
|
-
"error",
|
|
94
|
-
{
|
|
95
|
-
tabbable: [
|
|
96
|
-
"button",
|
|
97
|
-
"checkbox",
|
|
98
|
-
"link",
|
|
99
|
-
"searchbox",
|
|
100
|
-
"spinbutton",
|
|
101
|
-
"switch",
|
|
102
|
-
"textbox"
|
|
103
|
-
]
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
|
-
"jsx-a11y/label-has-associated-control": "error",
|
|
107
|
-
"jsx-a11y/label-has-for": "off",
|
|
108
|
-
"jsx-a11y/media-has-caption": "error",
|
|
109
|
-
"jsx-a11y/mouse-events-have-key-events": "error",
|
|
110
|
-
"jsx-a11y/no-access-key": "error",
|
|
111
|
-
"jsx-a11y/no-autofocus": "error",
|
|
112
|
-
"jsx-a11y/no-distracting-elements": "error",
|
|
113
|
-
"jsx-a11y/no-interactive-element-to-noninteractive-role": [
|
|
114
|
-
"error",
|
|
115
|
-
{
|
|
116
|
-
canvas: [
|
|
117
|
-
"img"
|
|
118
|
-
],
|
|
119
|
-
tr: [
|
|
120
|
-
"none",
|
|
121
|
-
"presentation"
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
],
|
|
125
|
-
"jsx-a11y/no-noninteractive-element-interactions": [
|
|
126
|
-
"error",
|
|
127
|
-
{
|
|
128
|
-
alert: [
|
|
129
|
-
"onKeyUp",
|
|
130
|
-
"onKeyDown",
|
|
131
|
-
"onKeyPress"
|
|
132
|
-
],
|
|
133
|
-
body: [
|
|
134
|
-
"onError",
|
|
135
|
-
"onLoad"
|
|
136
|
-
],
|
|
137
|
-
dialog: [
|
|
138
|
-
"onKeyUp",
|
|
139
|
-
"onKeyDown",
|
|
140
|
-
"onKeyPress"
|
|
141
|
-
],
|
|
142
|
-
handlers: [
|
|
143
|
-
"onClick",
|
|
144
|
-
"onError",
|
|
145
|
-
"onLoad",
|
|
146
|
-
"onMouseDown",
|
|
147
|
-
"onMouseUp",
|
|
148
|
-
"onKeyPress",
|
|
149
|
-
"onKeyDown",
|
|
150
|
-
"onKeyUp"
|
|
151
|
-
],
|
|
152
|
-
iframe: [
|
|
153
|
-
"onError",
|
|
154
|
-
"onLoad"
|
|
155
|
-
],
|
|
156
|
-
img: [
|
|
157
|
-
"onError",
|
|
158
|
-
"onLoad"
|
|
159
|
-
]
|
|
160
|
-
}
|
|
161
|
-
],
|
|
162
|
-
"jsx-a11y/no-noninteractive-element-to-interactive-role": [
|
|
163
|
-
"error",
|
|
164
|
-
{
|
|
165
|
-
fieldset: [
|
|
166
|
-
"radiogroup",
|
|
167
|
-
"presentation"
|
|
168
|
-
],
|
|
169
|
-
li: [
|
|
170
|
-
"menuitem",
|
|
171
|
-
"option",
|
|
172
|
-
"row",
|
|
173
|
-
"tab",
|
|
174
|
-
"treeitem"
|
|
175
|
-
],
|
|
176
|
-
ol: [
|
|
177
|
-
"listbox",
|
|
178
|
-
"menu",
|
|
179
|
-
"menubar",
|
|
180
|
-
"radiogroup",
|
|
181
|
-
"tablist",
|
|
182
|
-
"tree",
|
|
183
|
-
"treegrid"
|
|
184
|
-
],
|
|
185
|
-
table: [
|
|
186
|
-
"grid"
|
|
187
|
-
],
|
|
188
|
-
td: [
|
|
189
|
-
"gridcell"
|
|
190
|
-
],
|
|
191
|
-
ul: [
|
|
192
|
-
"listbox",
|
|
193
|
-
"menu",
|
|
194
|
-
"menubar",
|
|
195
|
-
"radiogroup",
|
|
196
|
-
"tablist",
|
|
197
|
-
"tree",
|
|
198
|
-
"treegrid"
|
|
199
|
-
]
|
|
200
|
-
}
|
|
201
|
-
],
|
|
202
|
-
"jsx-a11y/no-noninteractive-tabindex": [
|
|
203
|
-
"error",
|
|
204
|
-
{
|
|
205
|
-
allowExpressionValues: true,
|
|
206
|
-
roles: [
|
|
207
|
-
"tabpanel"
|
|
208
|
-
],
|
|
209
|
-
tags: []
|
|
210
|
-
}
|
|
211
|
-
],
|
|
212
|
-
"jsx-a11y/no-redundant-roles": "error",
|
|
213
|
-
"jsx-a11y/no-static-element-interactions": [
|
|
214
|
-
"error",
|
|
215
|
-
{
|
|
216
|
-
allowExpressionValues: true,
|
|
217
|
-
handlers: [
|
|
218
|
-
"onClick",
|
|
219
|
-
"onMouseDown",
|
|
220
|
-
"onMouseUp",
|
|
221
|
-
"onKeyPress",
|
|
222
|
-
"onKeyDown",
|
|
223
|
-
"onKeyUp"
|
|
224
|
-
]
|
|
225
|
-
}
|
|
226
|
-
],
|
|
227
|
-
"jsx-a11y/role-has-required-aria-props": "error",
|
|
228
|
-
"jsx-a11y/role-supports-aria-props": "error",
|
|
229
|
-
"jsx-a11y/scope": "error",
|
|
230
|
-
"jsx-a11y/tabindex-no-positive": "error"
|
|
231
|
-
} : {},
|
|
232
|
-
// solid recommended rules
|
|
233
|
-
// reactivity
|
|
234
|
-
"solid/components-return-once": 1,
|
|
235
|
-
"solid/event-handlers": 1,
|
|
236
|
-
// these rules are mostly style suggestions
|
|
237
|
-
"solid/imports": 1,
|
|
238
|
-
// identifier usage is important
|
|
239
|
-
"solid/jsx-no-duplicate-props": 2,
|
|
240
|
-
"solid/jsx-no-script-url": 2,
|
|
241
|
-
"solid/jsx-no-undef": 2,
|
|
242
|
-
"solid/jsx-uses-vars": 2,
|
|
243
|
-
"solid/no-array-handlers": 0,
|
|
244
|
-
"solid/no-destructure": 2,
|
|
245
|
-
// security problems
|
|
246
|
-
"solid/no-innerhtml": 2,
|
|
247
|
-
// only necessary for resource-constrained environments
|
|
248
|
-
"solid/no-proxy-apis": 0,
|
|
249
|
-
"solid/no-react-deps": 1,
|
|
250
|
-
"solid/no-react-specific-props": 1,
|
|
251
|
-
"solid/no-unknown-namespaces": 2,
|
|
252
|
-
// deprecated
|
|
253
|
-
"solid/prefer-classlist": 0,
|
|
254
|
-
"solid/prefer-for": 2,
|
|
255
|
-
// handled by Solid compiler, opt-in style suggestion
|
|
256
|
-
"solid/prefer-show": 0,
|
|
257
|
-
"solid/reactivity": 1,
|
|
258
|
-
"solid/self-closing-comp": 1,
|
|
259
|
-
"solid/style-prop": 1,
|
|
260
|
-
...typescript ? {
|
|
261
|
-
"solid/jsx-no-undef": [2, { typescriptEnabled: true }],
|
|
262
|
-
// namespaces taken care of by TS
|
|
263
|
-
"solid/no-unknown-namespaces": 0
|
|
264
|
-
} : {},
|
|
265
|
-
// overrides
|
|
266
|
-
...overrides
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
];
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
export {
|
|
273
|
-
solid
|
|
274
|
-
};
|
package/dist/chunk-XGI647GZ.mjs
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
interop
|
|
3
|
-
} from "./chunk-4YBQZLPS.mjs";
|
|
4
|
-
import {
|
|
5
|
-
GLOB_YAML
|
|
6
|
-
} from "./chunk-KOXCJL3C.mjs";
|
|
7
|
-
|
|
8
|
-
// src/configs/data/yaml.ts
|
|
9
|
-
async function yaml(options = {}) {
|
|
10
|
-
const {
|
|
11
|
-
files = [GLOB_YAML],
|
|
12
|
-
overrides = {},
|
|
13
|
-
stylistic = true
|
|
14
|
-
} = options;
|
|
15
|
-
const [
|
|
16
|
-
pluginYaml,
|
|
17
|
-
parserYaml
|
|
18
|
-
] = await Promise.all([
|
|
19
|
-
interop(import("eslint-plugin-yml")),
|
|
20
|
-
interop(import("yaml-eslint-parser"))
|
|
21
|
-
]);
|
|
22
|
-
const {
|
|
23
|
-
indent = 2,
|
|
24
|
-
quotes = "double"
|
|
25
|
-
} = typeof stylistic === "boolean" ? {} : stylistic;
|
|
26
|
-
return [
|
|
27
|
-
{
|
|
28
|
-
name: "luxass:yaml:setup",
|
|
29
|
-
plugins: {
|
|
30
|
-
yaml: pluginYaml
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: "luxass:yaml:rules",
|
|
35
|
-
files,
|
|
36
|
-
languageOptions: {
|
|
37
|
-
parser: parserYaml
|
|
38
|
-
},
|
|
39
|
-
rules: {
|
|
40
|
-
"style/spaced-comment": "off",
|
|
41
|
-
"yaml/block-mapping": "error",
|
|
42
|
-
"yaml/block-sequence": "error",
|
|
43
|
-
"yaml/no-empty-key": "error",
|
|
44
|
-
"yaml/no-empty-mapping-value": "error",
|
|
45
|
-
"yaml/no-empty-sequence-entry": "error",
|
|
46
|
-
"yaml/no-irregular-whitespace": "error",
|
|
47
|
-
"yaml/plain-scalar": "error",
|
|
48
|
-
"yaml/vue-custom-block/no-parsing-error": "error",
|
|
49
|
-
...stylistic ? {
|
|
50
|
-
"yaml/block-mapping-question-indicator-newline": "error",
|
|
51
|
-
"yaml/block-sequence-hyphen-indicator-newline": "error",
|
|
52
|
-
"yaml/flow-mapping-curly-newline": "error",
|
|
53
|
-
"yaml/flow-mapping-curly-spacing": "error",
|
|
54
|
-
"yaml/flow-sequence-bracket-newline": "error",
|
|
55
|
-
"yaml/flow-sequence-bracket-spacing": "error",
|
|
56
|
-
"yaml/indent": ["error", indent === "tab" ? 2 : indent],
|
|
57
|
-
"yaml/key-spacing": "error",
|
|
58
|
-
"yaml/no-tab-indent": "error",
|
|
59
|
-
"yaml/quotes": [
|
|
60
|
-
"error",
|
|
61
|
-
{ avoidEscape: false, prefer: quotes }
|
|
62
|
-
],
|
|
63
|
-
"yaml/spaced-comment": "error"
|
|
64
|
-
} : {},
|
|
65
|
-
...overrides
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
name: "luxass:yaml:github-actions",
|
|
70
|
-
files: ["**/.github/workflows/*.{yml,yaml}"],
|
|
71
|
-
rules: {
|
|
72
|
-
// GitHub Actions supports empty values to enable features
|
|
73
|
-
"yaml/no-empty-mapping-value": "off"
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
];
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export {
|
|
80
|
-
yaml
|
|
81
|
-
};
|
package/dist/chunk-XMXYE5WC.mjs
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
StylisticConfigDefaults
|
|
3
|
-
} from "./chunk-RDZJT36Z.mjs";
|
|
4
|
-
import {
|
|
5
|
-
ensure,
|
|
6
|
-
interop
|
|
7
|
-
} from "./chunk-4YBQZLPS.mjs";
|
|
8
|
-
import {
|
|
9
|
-
GLOB_CSS,
|
|
10
|
-
GLOB_LESS,
|
|
11
|
-
GLOB_MARKDOWN,
|
|
12
|
-
GLOB_POSTCSS,
|
|
13
|
-
GLOB_SCSS
|
|
14
|
-
} from "./chunk-KOXCJL3C.mjs";
|
|
15
|
-
|
|
16
|
-
// src/configs/formatters.ts
|
|
17
|
-
import * as parserPlain from "eslint-parser-plain";
|
|
18
|
-
async function formatters(options = {}, stylistic = {}) {
|
|
19
|
-
await ensure([
|
|
20
|
-
"eslint-plugin-format"
|
|
21
|
-
]);
|
|
22
|
-
if (options === true) {
|
|
23
|
-
options = {
|
|
24
|
-
css: true,
|
|
25
|
-
graphql: true,
|
|
26
|
-
html: true,
|
|
27
|
-
markdown: true
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
const {
|
|
31
|
-
indent,
|
|
32
|
-
quotes,
|
|
33
|
-
semi
|
|
34
|
-
} = {
|
|
35
|
-
...StylisticConfigDefaults,
|
|
36
|
-
...stylistic
|
|
37
|
-
};
|
|
38
|
-
const prettierOptions = Object.assign(
|
|
39
|
-
{
|
|
40
|
-
endOfLine: "auto",
|
|
41
|
-
semi,
|
|
42
|
-
singleQuote: quotes === "single",
|
|
43
|
-
tabWidth: typeof indent === "number" ? indent : 2,
|
|
44
|
-
trailingComma: "all",
|
|
45
|
-
useTabs: indent === "tab"
|
|
46
|
-
},
|
|
47
|
-
options.prettierOptions || {}
|
|
48
|
-
);
|
|
49
|
-
const dprintOptions = Object.assign(
|
|
50
|
-
{
|
|
51
|
-
indentWidth: typeof indent === "number" ? indent : 2,
|
|
52
|
-
quoteStyle: quotes === "single" ? "preferSingle" : "preferDouble",
|
|
53
|
-
useTabs: indent === "tab"
|
|
54
|
-
},
|
|
55
|
-
options.dprintOptions || {}
|
|
56
|
-
);
|
|
57
|
-
const pluginFormat = await interop(import("eslint-plugin-format"));
|
|
58
|
-
const configs = [
|
|
59
|
-
{
|
|
60
|
-
name: "luxass:formatters:setup",
|
|
61
|
-
plugins: {
|
|
62
|
-
format: pluginFormat
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
];
|
|
66
|
-
if (options.css) {
|
|
67
|
-
configs.push(
|
|
68
|
-
{
|
|
69
|
-
name: "luxass:formatter:css",
|
|
70
|
-
files: [GLOB_CSS, GLOB_POSTCSS],
|
|
71
|
-
languageOptions: {
|
|
72
|
-
parser: parserPlain
|
|
73
|
-
},
|
|
74
|
-
rules: {
|
|
75
|
-
"format/prettier": [
|
|
76
|
-
"error",
|
|
77
|
-
{
|
|
78
|
-
...prettierOptions,
|
|
79
|
-
parser: "css"
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
name: "luxass:formatter:scss",
|
|
86
|
-
files: [GLOB_SCSS],
|
|
87
|
-
languageOptions: {
|
|
88
|
-
parser: parserPlain
|
|
89
|
-
},
|
|
90
|
-
rules: {
|
|
91
|
-
"format/prettier": [
|
|
92
|
-
"error",
|
|
93
|
-
{
|
|
94
|
-
...prettierOptions,
|
|
95
|
-
parser: "scss"
|
|
96
|
-
}
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
name: "luxass:formatter:less",
|
|
102
|
-
files: [GLOB_LESS],
|
|
103
|
-
languageOptions: {
|
|
104
|
-
parser: parserPlain
|
|
105
|
-
},
|
|
106
|
-
rules: {
|
|
107
|
-
"format/prettier": [
|
|
108
|
-
"error",
|
|
109
|
-
{
|
|
110
|
-
...prettierOptions,
|
|
111
|
-
parser: "less"
|
|
112
|
-
}
|
|
113
|
-
]
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
if (options.html) {
|
|
119
|
-
configs.push({
|
|
120
|
-
name: "luxass:formatter:html",
|
|
121
|
-
files: ["**/*.html"],
|
|
122
|
-
languageOptions: {
|
|
123
|
-
parser: parserPlain
|
|
124
|
-
},
|
|
125
|
-
rules: {
|
|
126
|
-
"format/prettier": [
|
|
127
|
-
"error",
|
|
128
|
-
{
|
|
129
|
-
...prettierOptions,
|
|
130
|
-
parser: "html"
|
|
131
|
-
}
|
|
132
|
-
]
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
if (options.markdown) {
|
|
137
|
-
const formater = options.markdown === true ? "prettier" : options.markdown;
|
|
138
|
-
configs.push({
|
|
139
|
-
name: "luxass:formatter:markdown",
|
|
140
|
-
files: [GLOB_MARKDOWN],
|
|
141
|
-
languageOptions: {
|
|
142
|
-
parser: parserPlain
|
|
143
|
-
},
|
|
144
|
-
rules: {
|
|
145
|
-
[`format/${formater}`]: [
|
|
146
|
-
"error",
|
|
147
|
-
formater === "prettier" ? {
|
|
148
|
-
printWidth: 120,
|
|
149
|
-
...prettierOptions,
|
|
150
|
-
embeddedLanguageFormatting: "off",
|
|
151
|
-
parser: "markdown"
|
|
152
|
-
} : {
|
|
153
|
-
...dprintOptions,
|
|
154
|
-
language: "markdown"
|
|
155
|
-
}
|
|
156
|
-
]
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
if (options.graphql) {
|
|
161
|
-
configs.push({
|
|
162
|
-
name: "luxass:formatter:graphql",
|
|
163
|
-
files: ["**/*.graphql"],
|
|
164
|
-
languageOptions: {
|
|
165
|
-
parser: parserPlain
|
|
166
|
-
},
|
|
167
|
-
rules: {
|
|
168
|
-
"format/prettier": [
|
|
169
|
-
"error",
|
|
170
|
-
{
|
|
171
|
-
...prettierOptions,
|
|
172
|
-
parser: "graphql"
|
|
173
|
-
}
|
|
174
|
-
]
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
return configs;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
export {
|
|
182
|
-
formatters
|
|
183
|
-
};
|
package/dist/chunk-YNMFVYL6.mjs
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
interop
|
|
3
|
-
} from "./chunk-4YBQZLPS.mjs";
|
|
4
|
-
import {
|
|
5
|
-
GLOB_TOML
|
|
6
|
-
} from "./chunk-KOXCJL3C.mjs";
|
|
7
|
-
|
|
8
|
-
// src/configs/data/toml.ts
|
|
9
|
-
async function toml(options = {}) {
|
|
10
|
-
const {
|
|
11
|
-
files = [GLOB_TOML],
|
|
12
|
-
overrides = {},
|
|
13
|
-
stylistic = true
|
|
14
|
-
} = options;
|
|
15
|
-
const {
|
|
16
|
-
indent = 2
|
|
17
|
-
} = typeof stylistic === "boolean" ? {} : stylistic;
|
|
18
|
-
const [
|
|
19
|
-
pluginToml,
|
|
20
|
-
parserToml
|
|
21
|
-
] = await Promise.all([
|
|
22
|
-
interop(import("eslint-plugin-toml")),
|
|
23
|
-
interop(import("toml-eslint-parser"))
|
|
24
|
-
]);
|
|
25
|
-
return [
|
|
26
|
-
{
|
|
27
|
-
name: "luxass:toml:setup",
|
|
28
|
-
plugins: {
|
|
29
|
-
toml: pluginToml
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: "luxass:toml:rules",
|
|
34
|
-
files,
|
|
35
|
-
languageOptions: {
|
|
36
|
-
parser: parserToml
|
|
37
|
-
},
|
|
38
|
-
rules: {
|
|
39
|
-
"style/spaced-comment": "off",
|
|
40
|
-
"toml/comma-style": "error",
|
|
41
|
-
"toml/keys-order": "error",
|
|
42
|
-
"toml/no-space-dots": "error",
|
|
43
|
-
"toml/no-unreadable-number-separator": "error",
|
|
44
|
-
"toml/precision-of-fractional-seconds": "error",
|
|
45
|
-
"toml/precision-of-integer": "error",
|
|
46
|
-
"toml/tables-order": "error",
|
|
47
|
-
"toml/vue-custom-block/no-parsing-error": "error",
|
|
48
|
-
...stylistic ? {
|
|
49
|
-
"toml/array-bracket-newline": "error",
|
|
50
|
-
"toml/array-bracket-spacing": "error",
|
|
51
|
-
"toml/array-element-newline": "error",
|
|
52
|
-
"toml/indent": ["error", indent === "tab" ? 2 : indent],
|
|
53
|
-
"toml/inline-table-curly-spacing": "error",
|
|
54
|
-
"toml/key-spacing": "error",
|
|
55
|
-
"toml/padding-line-between-pairs": "error",
|
|
56
|
-
"toml/padding-line-between-tables": "error",
|
|
57
|
-
"toml/quoted-keys": "error",
|
|
58
|
-
"toml/spaced-comment": "error",
|
|
59
|
-
"toml/table-bracket-spacing": "error"
|
|
60
|
-
} : {},
|
|
61
|
-
...overrides
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
];
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export {
|
|
68
|
-
toml
|
|
69
|
-
};
|