@luxass/eslint-config 4.2.5 → 4.2.6
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 +33 -51
- package/dist/{chunk-AQRBQAKE.mjs → chunk-2IR43M6N.mjs} +1 -1
- package/dist/{chunk-UITQW3RA.mjs → chunk-47ISSTHW.mjs} +2 -4
- package/dist/{chunk-WOBGA3K2.mjs → chunk-AJS3TMZE.mjs} +1 -1
- package/dist/{chunk-FNOIGW47.mjs → chunk-C6FE5KXJ.mjs} +1 -1
- package/dist/{chunk-MT5P5EKH.mjs → chunk-E4RVBKZB.mjs} +1 -1
- package/dist/{chunk-DVQQVCGF.mjs → chunk-HZNHG5PB.mjs} +1 -1
- package/dist/{chunk-QDSV5ONX.mjs → chunk-PFCAWBCD.mjs} +1 -1
- package/dist/{chunk-O2BXTQHK.mjs → chunk-PFYV2TWZ.mjs} +1 -1
- package/dist/{chunk-MMSZW2UW.mjs → chunk-QT6FHTFU.mjs} +1 -1
- package/dist/{chunk-QMGT2Z63.mjs → chunk-RDZJT36Z.mjs} +1 -1
- package/dist/{chunk-7ODEIBF5.mjs → chunk-TWAETZPX.mjs} +41 -36
- package/dist/{chunk-SPD4DGYN.mjs → chunk-XD3UVRU7.mjs} +1 -1
- package/dist/{chunk-V57HXOSW.mjs → chunk-XGI647GZ.mjs} +1 -1
- package/dist/{chunk-XPKGXA67.mjs → chunk-XMXYE5WC.mjs} +1 -1
- package/dist/{chunk-EHWA727G.mjs → chunk-YNMFVYL6.mjs} +1 -1
- package/dist/configs/{tailwindcss.cjs → css/tailwindcss.cjs} +2 -2
- package/dist/configs/{tailwindcss.d.cts → css/tailwindcss.d.cts} +1 -1
- package/dist/configs/{tailwindcss.d.ts → css/tailwindcss.d.ts} +1 -1
- package/dist/configs/css/tailwindcss.mjs +8 -0
- package/dist/configs/{unocss.cjs → css/unocss.cjs} +2 -2
- package/dist/configs/{unocss.d.cts → css/unocss.d.cts} +1 -1
- package/dist/configs/{unocss.d.ts → css/unocss.d.ts} +1 -1
- package/dist/configs/css/unocss.mjs +8 -0
- package/dist/configs/{jsonc.cjs → data/json.cjs} +5 -5
- package/dist/configs/{nextjs.d.cts → data/json.d.cts} +1 -1
- package/dist/configs/{nextjs.d.ts → data/json.d.ts} +1 -1
- package/dist/configs/data/json.mjs +8 -0
- package/dist/configs/{toml.cjs → data/toml.cjs} +2 -2
- package/dist/configs/{astro.d.ts → data/toml.d.cts} +1 -1
- package/dist/configs/{toml.d.ts → data/toml.d.ts} +1 -1
- package/dist/configs/data/toml.mjs +8 -0
- package/dist/configs/{yaml.cjs → data/yaml.cjs} +2 -2
- package/dist/configs/{yaml.d.cts → data/yaml.d.cts} +1 -1
- package/dist/configs/{yaml.d.ts → data/yaml.d.ts} +1 -1
- package/dist/configs/data/yaml.mjs +8 -0
- package/dist/configs/{jsdoc.cjs → docs/jsdoc.cjs} +2 -2
- package/dist/configs/{jsdoc.d.cts → docs/jsdoc.d.cts} +1 -1
- package/dist/configs/{jsdoc.d.ts → docs/jsdoc.d.ts} +1 -1
- package/dist/configs/docs/jsdoc.mjs +7 -0
- package/dist/configs/{markdown.cjs → docs/markdown.cjs} +2 -2
- package/dist/configs/{markdown.d.cts → docs/markdown.d.cts} +1 -1
- package/dist/configs/{markdown.d.ts → docs/markdown.d.ts} +1 -1
- package/dist/configs/docs/markdown.mjs +8 -0
- package/dist/configs/formatters.cjs +1 -1
- package/dist/configs/formatters.mjs +2 -2
- package/dist/configs/{astro.cjs → frameworks/astro.cjs} +2 -2
- package/dist/configs/{jsonc.d.ts → frameworks/astro.d.cts} +1 -1
- package/dist/configs/{astro.d.cts → frameworks/astro.d.ts} +1 -1
- package/dist/configs/frameworks/astro.mjs +8 -0
- package/dist/configs/{nextjs.cjs → frameworks/nextjs.cjs} +2 -2
- package/dist/configs/frameworks/nextjs.d.cts +11 -0
- package/dist/configs/frameworks/nextjs.d.ts +11 -0
- package/dist/configs/frameworks/nextjs.mjs +8 -0
- package/dist/configs/{react.cjs → frameworks/react.cjs} +3 -5
- package/dist/configs/{react.d.cts → frameworks/react.d.cts} +1 -1
- package/dist/configs/{react.d.ts → frameworks/react.d.ts} +1 -1
- package/dist/configs/frameworks/react.mjs +8 -0
- package/dist/configs/{solid.cjs → frameworks/solid.cjs} +2 -2
- package/dist/configs/{solid.d.cts → frameworks/solid.d.cts} +1 -1
- package/dist/configs/{solid.d.ts → frameworks/solid.d.ts} +1 -1
- package/dist/configs/frameworks/solid.mjs +8 -0
- package/dist/configs/{vue.cjs → frameworks/vue.cjs} +2 -2
- package/dist/configs/{jsonc.d.cts → frameworks/vue.d.cts} +2 -2
- package/dist/configs/{toml.d.cts → frameworks/vue.d.ts} +2 -2
- package/dist/configs/frameworks/vue.mjs +8 -0
- package/dist/configs/index.cjs +51 -65
- package/dist/configs/index.d.cts +2 -3
- package/dist/configs/index.d.ts +2 -3
- package/dist/configs/index.mjs +38 -43
- package/dist/configs/stylistic.cjs +1 -1
- package/dist/configs/stylistic.mjs +1 -1
- package/dist/configs/test.cjs +37 -33
- package/dist/configs/test.mjs +1 -2
- package/dist/index.cjs +60 -72
- package/dist/index.mjs +46 -52
- package/package.json +1 -2
- package/dist/chunk-6T7MXPCT.mjs +0 -17
- package/dist/chunk-WDSV2EFG.mjs +0 -7
- package/dist/configs/astro.mjs +0 -8
- package/dist/configs/jsdoc.mjs +0 -7
- package/dist/configs/jsonc.mjs +0 -8
- package/dist/configs/markdown.mjs +0 -8
- package/dist/configs/nextjs.mjs +0 -8
- package/dist/configs/perfectionist.cjs +0 -51
- package/dist/configs/perfectionist.d.cts +0 -20
- package/dist/configs/perfectionist.d.ts +0 -20
- package/dist/configs/perfectionist.mjs +0 -6
- package/dist/configs/react.mjs +0 -8
- package/dist/configs/solid.mjs +0 -8
- package/dist/configs/tailwindcss.mjs +0 -8
- package/dist/configs/toml.mjs +0 -8
- package/dist/configs/unocss.mjs +0 -8
- package/dist/configs/vue.d.cts +0 -11
- package/dist/configs/vue.d.ts +0 -11
- package/dist/configs/vue.mjs +0 -8
- package/dist/configs/yaml.mjs +0 -8
- package/dist/custom-rules/utils.cjs +0 -31
- package/dist/custom-rules/utils.d.cts +0 -6
- package/dist/custom-rules/utils.d.ts +0 -6
- package/dist/custom-rules/utils.mjs +0 -6
- /package/dist/{chunk-YGZJUKJC.mjs → chunk-YZCJUX6Z.mjs} +0 -0
package/README.md
CHANGED
|
@@ -29,28 +29,28 @@ With [`"type": "module"`](https://nodejs.org/api/packages.html#type) in `package
|
|
|
29
29
|
|
|
30
30
|
```js
|
|
31
31
|
// eslint.config.js
|
|
32
|
-
import luxass from "@luxass/eslint-config"
|
|
32
|
+
import luxass from "@luxass/eslint-config";
|
|
33
33
|
|
|
34
|
-
export default luxass()
|
|
34
|
+
export default luxass();
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
With CJS:
|
|
38
38
|
|
|
39
39
|
```js
|
|
40
40
|
// eslint.config.js
|
|
41
|
-
const luxass = require("@luxass/eslint-config").default
|
|
41
|
+
const luxass = require("@luxass/eslint-config").default;
|
|
42
42
|
|
|
43
|
-
module.exports = luxass()
|
|
43
|
+
module.exports = luxass();
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
Combined with legacy config:
|
|
47
47
|
|
|
48
48
|
```js
|
|
49
49
|
// eslint.config.js
|
|
50
|
-
const luxass = require("@luxass/eslint-config").default
|
|
51
|
-
const { FlatCompat } = require("@eslint/eslintrc")
|
|
50
|
+
const luxass = require("@luxass/eslint-config").default;
|
|
51
|
+
const { FlatCompat } = require("@eslint/eslintrc");
|
|
52
52
|
|
|
53
|
-
const compat = new FlatCompat()
|
|
53
|
+
const compat = new FlatCompat();
|
|
54
54
|
|
|
55
55
|
module.exports = luxass(
|
|
56
56
|
{
|
|
@@ -66,7 +66,7 @@ module.exports = luxass(
|
|
|
66
66
|
})
|
|
67
67
|
|
|
68
68
|
// Other flat configs...
|
|
69
|
-
)
|
|
69
|
+
);
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
> Note that `.eslintignore` no longer works in Flat config, see [customization](#customization) for more details.
|
|
@@ -129,16 +129,16 @@ Normally you would only need to import the `luxass` preset:
|
|
|
129
129
|
|
|
130
130
|
```js
|
|
131
131
|
// eslint.config.js
|
|
132
|
-
import luxass from "@luxass/eslint-config"
|
|
132
|
+
import luxass from "@luxass/eslint-config";
|
|
133
133
|
|
|
134
|
-
export default luxass()
|
|
134
|
+
export default luxass();
|
|
135
135
|
```
|
|
136
136
|
|
|
137
137
|
you can also configure each `config` individually:
|
|
138
138
|
|
|
139
139
|
```js
|
|
140
140
|
// eslint.config.js
|
|
141
|
-
import luxass from "@luxass/eslint-config"
|
|
141
|
+
import luxass from "@luxass/eslint-config";
|
|
142
142
|
|
|
143
143
|
export default luxass({
|
|
144
144
|
stylistic: true,
|
|
@@ -152,14 +152,14 @@ export default luxass({
|
|
|
152
152
|
ignores: [
|
|
153
153
|
"**/fixtures"
|
|
154
154
|
]
|
|
155
|
-
})
|
|
155
|
+
});
|
|
156
156
|
```
|
|
157
157
|
|
|
158
158
|
The `luxass` function accepts an arbitrary number of `flat configs` overrides:
|
|
159
159
|
|
|
160
160
|
```js
|
|
161
161
|
// eslint.config.js
|
|
162
|
-
import luxass from "@luxass/eslint-config"
|
|
162
|
+
import luxass from "@luxass/eslint-config";
|
|
163
163
|
|
|
164
164
|
export default luxass({
|
|
165
165
|
// configuration points for my config
|
|
@@ -167,7 +167,7 @@ export default luxass({
|
|
|
167
167
|
rules: {}
|
|
168
168
|
}, {
|
|
169
169
|
rules: {}
|
|
170
|
-
})
|
|
170
|
+
});
|
|
171
171
|
```
|
|
172
172
|
|
|
173
173
|
<details>
|
|
@@ -193,9 +193,9 @@ import {
|
|
|
193
193
|
unicorn,
|
|
194
194
|
vue,
|
|
195
195
|
yaml,
|
|
196
|
-
} from "@luxass/eslint-config/configs"
|
|
196
|
+
} from "@luxass/eslint-config/configs";
|
|
197
197
|
|
|
198
|
-
import { combine } from "@luxass/eslint-config"
|
|
198
|
+
import { combine } from "@luxass/eslint-config";
|
|
199
199
|
|
|
200
200
|
export default combine(
|
|
201
201
|
ignores(),
|
|
@@ -211,7 +211,7 @@ export default combine(
|
|
|
211
211
|
jsonc(),
|
|
212
212
|
yaml(),
|
|
213
213
|
markdown(),
|
|
214
|
-
)
|
|
214
|
+
);
|
|
215
215
|
```
|
|
216
216
|
|
|
217
217
|
</details>
|
|
@@ -247,7 +247,7 @@ Certain rules would only be enabled in specific files, for example, `ts/*` rules
|
|
|
247
247
|
|
|
248
248
|
```js
|
|
249
249
|
// eslint.config.js
|
|
250
|
-
import luxass from "@luxass/eslint-config"
|
|
250
|
+
import luxass from "@luxass/eslint-config";
|
|
251
251
|
|
|
252
252
|
export default luxass(
|
|
253
253
|
{ vue: true, typescript: true },
|
|
@@ -264,14 +264,14 @@ export default luxass(
|
|
|
264
264
|
"style/semi": ["error", "never"],
|
|
265
265
|
},
|
|
266
266
|
}
|
|
267
|
-
)
|
|
267
|
+
);
|
|
268
268
|
```
|
|
269
269
|
|
|
270
270
|
We also provided a `overrides` options to make it easier:
|
|
271
271
|
|
|
272
272
|
```js
|
|
273
273
|
// eslint.config.js
|
|
274
|
-
import luxass from "@luxass/eslint-config"
|
|
274
|
+
import luxass from "@luxass/eslint-config";
|
|
275
275
|
|
|
276
276
|
export default luxass({
|
|
277
277
|
overrides: {
|
|
@@ -284,7 +284,7 @@ export default luxass({
|
|
|
284
284
|
yaml: {},
|
|
285
285
|
// ...
|
|
286
286
|
}
|
|
287
|
-
})
|
|
287
|
+
});
|
|
288
288
|
```
|
|
289
289
|
|
|
290
290
|
### Optional Configs
|
|
@@ -300,7 +300,7 @@ Use external formatters to format files that ESLint cannot handle yet (`.css`, `
|
|
|
300
300
|
|
|
301
301
|
```js
|
|
302
302
|
// eslint.config.js
|
|
303
|
-
import luxass from "@luxass/eslint-config"
|
|
303
|
+
import luxass from "@luxass/eslint-config";
|
|
304
304
|
|
|
305
305
|
export default luxass({
|
|
306
306
|
formatters: {
|
|
@@ -326,7 +326,7 @@ export default luxass({
|
|
|
326
326
|
*/
|
|
327
327
|
markdown: "prettier"
|
|
328
328
|
}
|
|
329
|
-
})
|
|
329
|
+
});
|
|
330
330
|
```
|
|
331
331
|
|
|
332
332
|
Running `npx eslint` should prompt you to install the required dependencies, otherwise, you can install them manually:
|
|
@@ -341,11 +341,11 @@ To enable React support, need to explicitly turn it on:
|
|
|
341
341
|
|
|
342
342
|
```js
|
|
343
343
|
// eslint.config.js
|
|
344
|
-
import luxass from "@luxass/eslint-config"
|
|
344
|
+
import luxass from "@luxass/eslint-config";
|
|
345
345
|
|
|
346
346
|
export default luxass({
|
|
347
347
|
react: true,
|
|
348
|
-
})
|
|
348
|
+
});
|
|
349
349
|
```
|
|
350
350
|
|
|
351
351
|
Running `npx eslint` should prompt you to install the required dependencies, otherwise, you can install them manually:
|
|
@@ -362,11 +362,11 @@ Next.JS also enables React support.
|
|
|
362
362
|
|
|
363
363
|
```js
|
|
364
364
|
// eslint.config.js
|
|
365
|
-
import luxass from "@luxass/eslint-config"
|
|
365
|
+
import luxass from "@luxass/eslint-config";
|
|
366
366
|
|
|
367
367
|
export default luxass({
|
|
368
368
|
nextjs: true,
|
|
369
|
-
})
|
|
369
|
+
});
|
|
370
370
|
```
|
|
371
371
|
|
|
372
372
|
Running `npx eslint` should prompt you to install the required dependencies, otherwise, you can install them manually:
|
|
@@ -381,11 +381,11 @@ To enable UnoCSS support, need to explicitly turn it on:
|
|
|
381
381
|
|
|
382
382
|
```js
|
|
383
383
|
// eslint.config.js
|
|
384
|
-
import luxass from "@luxass/eslint-config"
|
|
384
|
+
import luxass from "@luxass/eslint-config";
|
|
385
385
|
|
|
386
386
|
export default luxass({
|
|
387
387
|
unocss: true,
|
|
388
|
-
})
|
|
388
|
+
});
|
|
389
389
|
```
|
|
390
390
|
|
|
391
391
|
Running `npx eslint` should prompt you to install the required dependencies, otherwise, you can install them manually:
|
|
@@ -400,11 +400,11 @@ To enable TailwindCSS support, need to explicitly turn it on:
|
|
|
400
400
|
|
|
401
401
|
```js
|
|
402
402
|
// eslint.config.js
|
|
403
|
-
import luxass from "@luxass/eslint-config"
|
|
403
|
+
import luxass from "@luxass/eslint-config";
|
|
404
404
|
|
|
405
405
|
export default luxass({
|
|
406
406
|
tailwindcss: true,
|
|
407
|
-
})
|
|
407
|
+
});
|
|
408
408
|
```
|
|
409
409
|
|
|
410
410
|
Running `npx eslint` should prompt you to install the required dependencies, otherwise, you can install them manually:
|
|
@@ -417,37 +417,19 @@ npm i -D eslint-plugin-tailwindcss
|
|
|
417
417
|
|
|
418
418
|
This config also provides some optional plugins/rules for extended usages.
|
|
419
419
|
|
|
420
|
-
#### `perfectionist` (sorting)
|
|
421
|
-
|
|
422
|
-
This plugin [`eslint-plugin-perfectionist`](https://github.com/azat-io/eslint-plugin-perfectionist) allows you to sorted object keys, imports, etc, with auto-fix.
|
|
423
|
-
|
|
424
|
-
The plugin is installed but no rules are enabled by default.
|
|
425
|
-
|
|
426
|
-
It's recommended to opt-in on each file individually using [configuration comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1).
|
|
427
|
-
|
|
428
|
-
```js
|
|
429
|
-
/* eslint perfectionist/sort-objects: "error" */
|
|
430
|
-
const objectWantedToSort = {
|
|
431
|
-
a: 2,
|
|
432
|
-
b: 1,
|
|
433
|
-
c: 3,
|
|
434
|
-
}
|
|
435
|
-
/* eslint perfectionist/sort-objects: "off" */
|
|
436
|
-
```
|
|
437
|
-
|
|
438
420
|
### Type Aware Rules
|
|
439
421
|
|
|
440
422
|
You can optionally enable the [type aware rules](https://typescript-eslint.io/linting/typed-linting/) by passing the options object to the `typescript` config:
|
|
441
423
|
|
|
442
424
|
```js
|
|
443
425
|
// eslint.config.js
|
|
444
|
-
import luxass from "@luxass/eslint-config"
|
|
426
|
+
import luxass from "@luxass/eslint-config";
|
|
445
427
|
|
|
446
428
|
export default luxass({
|
|
447
429
|
typescript: {
|
|
448
430
|
tsconfigPath: "tsconfig.json",
|
|
449
431
|
},
|
|
450
|
-
})
|
|
432
|
+
});
|
|
451
433
|
```
|
|
452
434
|
|
|
453
435
|
## Versioning Policy
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
GLOB_TSX
|
|
8
8
|
} from "./chunk-KOXCJL3C.mjs";
|
|
9
9
|
|
|
10
|
-
// src/configs/react.ts
|
|
10
|
+
// src/configs/frameworks/react.ts
|
|
11
11
|
import { isPackageExists } from "local-pkg";
|
|
12
12
|
async function react(options = {}) {
|
|
13
13
|
const {
|
|
@@ -33,9 +33,7 @@ async function react(options = {}) {
|
|
|
33
33
|
interop(import("eslint-plugin-react-refresh")),
|
|
34
34
|
...a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
|
|
35
35
|
]);
|
|
36
|
-
const isAllowConstantExport =
|
|
37
|
-
(i) => isPackageExists(i)
|
|
38
|
-
);
|
|
36
|
+
const isAllowConstantExport = isPackageExists("vite");
|
|
39
37
|
return [
|
|
40
38
|
{
|
|
41
39
|
name: "luxass:react:setup",
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
GLOB_MARKDOWN_IN_MARKDOWN
|
|
8
8
|
} from "./chunk-KOXCJL3C.mjs";
|
|
9
9
|
|
|
10
|
-
// src/configs/markdown.ts
|
|
10
|
+
// src/configs/docs/markdown.ts
|
|
11
11
|
import * as parserPlain from "eslint-parser-plain";
|
|
12
12
|
import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
|
|
13
13
|
async function markdown(options = {}) {
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createRule
|
|
3
|
-
} from "./chunk-WDSV2EFG.mjs";
|
|
4
1
|
import {
|
|
5
2
|
interop
|
|
6
3
|
} from "./chunk-4YBQZLPS.mjs";
|
|
@@ -8,7 +5,12 @@ import {
|
|
|
8
5
|
GLOB_TESTS
|
|
9
6
|
} from "./chunk-KOXCJL3C.mjs";
|
|
10
7
|
|
|
8
|
+
// src/custom-rules/utils.ts
|
|
9
|
+
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
10
|
+
var createRule = ESLintUtils.RuleCreator((ruleName) => `https://github.com/luxass/eslint-config/blob/main/src/custom-rules/${ruleName}/README.md`);
|
|
11
|
+
|
|
11
12
|
// src/custom-rules/no-only-tests/index.ts
|
|
13
|
+
var RULE_NAME = "no-only-tests";
|
|
12
14
|
var DEFAULT_OPTIONS = {
|
|
13
15
|
blocks: ["describe", "it", "test"],
|
|
14
16
|
focus: ["only"]
|
|
@@ -17,10 +19,10 @@ function getPath(node, path = []) {
|
|
|
17
19
|
if (node) {
|
|
18
20
|
const nodeName = node.name || node.property && node.property.name;
|
|
19
21
|
if (node.object) {
|
|
20
|
-
return getPath(
|
|
21
|
-
|
|
22
|
-
...path
|
|
23
|
-
|
|
22
|
+
return getPath(
|
|
23
|
+
node.object,
|
|
24
|
+
[nodeName, ...path]
|
|
25
|
+
);
|
|
24
26
|
}
|
|
25
27
|
if (node.callee)
|
|
26
28
|
return getPath(node.callee, path);
|
|
@@ -29,13 +31,13 @@ function getPath(node, path = []) {
|
|
|
29
31
|
return path;
|
|
30
32
|
}
|
|
31
33
|
var noOnlyTests = createRule({
|
|
32
|
-
name:
|
|
34
|
+
name: RULE_NAME,
|
|
33
35
|
create: (context, [options]) => {
|
|
34
36
|
const {
|
|
35
37
|
blocks = DEFAULT_OPTIONS.blocks,
|
|
36
38
|
focus = DEFAULT_OPTIONS.focus
|
|
37
39
|
} = options;
|
|
38
|
-
|
|
40
|
+
return {
|
|
39
41
|
Identifier(node) {
|
|
40
42
|
const parent = node.parent?.object;
|
|
41
43
|
if (!parent)
|
|
@@ -44,56 +46,59 @@ var noOnlyTests = createRule({
|
|
|
44
46
|
return;
|
|
45
47
|
const callPath = getPath(node.parent).join(".");
|
|
46
48
|
const found = blocks.find((block) => {
|
|
47
|
-
if (block.endsWith("*"))
|
|
49
|
+
if (block.endsWith("*")) {
|
|
48
50
|
return callPath.startsWith(block.replace(/\*$/, ""));
|
|
51
|
+
}
|
|
49
52
|
return callPath.startsWith(`${block}.`);
|
|
50
53
|
});
|
|
51
54
|
if (found) {
|
|
52
55
|
context.report({
|
|
53
56
|
data: { block: callPath.split(".")[0], focus: node.name },
|
|
54
|
-
messageId: "
|
|
57
|
+
messageId: "not-permitted",
|
|
55
58
|
node
|
|
56
59
|
});
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
62
|
};
|
|
60
|
-
return handler;
|
|
61
63
|
},
|
|
62
|
-
defaultOptions: [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
defaultOptions: [
|
|
65
|
+
{
|
|
66
|
+
blocks: ["describe", "it", "test"],
|
|
67
|
+
focus: ["only"]
|
|
68
|
+
}
|
|
69
|
+
],
|
|
66
70
|
meta: {
|
|
67
71
|
docs: {
|
|
68
72
|
description: "disallow .only blocks in tests",
|
|
69
73
|
recommended: "recommended"
|
|
70
74
|
},
|
|
71
75
|
messages: {
|
|
72
|
-
|
|
76
|
+
"not-permitted": "{{ block }}.{{ focus }} not permitted"
|
|
73
77
|
},
|
|
74
|
-
schema: [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
schema: [
|
|
79
|
+
{
|
|
80
|
+
additionalProperties: false,
|
|
81
|
+
properties: {
|
|
82
|
+
blocks: {
|
|
83
|
+
items: {
|
|
84
|
+
type: "string"
|
|
85
|
+
},
|
|
86
|
+
type: "array",
|
|
87
|
+
uniqueItems: true
|
|
80
88
|
},
|
|
81
|
-
|
|
82
|
-
|
|
89
|
+
focus: {
|
|
90
|
+
items: {
|
|
91
|
+
type: "string"
|
|
92
|
+
},
|
|
93
|
+
type: "array",
|
|
94
|
+
uniqueItems: true
|
|
95
|
+
}
|
|
83
96
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
type: "array",
|
|
89
|
-
uniqueItems: true
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
type: "object"
|
|
93
|
-
}],
|
|
97
|
+
type: "object"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
94
100
|
type: "layout"
|
|
95
101
|
}
|
|
96
|
-
// i need to have this here, otherwise typechecking fails.
|
|
97
102
|
});
|
|
98
103
|
|
|
99
104
|
// src/configs/test.ts
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// src/configs/tailwindcss.ts
|
|
30
|
+
// src/configs/css/tailwindcss.ts
|
|
31
31
|
var tailwindcss_exports = {};
|
|
32
32
|
__export(tailwindcss_exports, {
|
|
33
33
|
tailwindcss: () => tailwindcss
|
|
@@ -91,7 +91,7 @@ async function ensure(packages) {
|
|
|
91
91
|
;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
// src/configs/tailwindcss.ts
|
|
94
|
+
// src/configs/css/tailwindcss.ts
|
|
95
95
|
async function tailwindcss(options = {}) {
|
|
96
96
|
const {
|
|
97
97
|
files = [GLOB_SRC],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { h as TailwindCSSOptions, g as tailwindcss } from '
|
|
1
|
+
export { h as TailwindCSSOptions, g as tailwindcss } from '../../types-HqEzZfQU.cjs';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
3
|
import '@antfu/eslint-define-config';
|
|
4
4
|
import '@eslint-types/jsdoc/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { h as TailwindCSSOptions, g as tailwindcss } from '
|
|
1
|
+
export { h as TailwindCSSOptions, g as tailwindcss } from '../../types-HqEzZfQU.js';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
3
|
import '@antfu/eslint-define-config';
|
|
4
4
|
import '@eslint-types/jsdoc/types';
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// src/configs/unocss.ts
|
|
30
|
+
// src/configs/css/unocss.ts
|
|
31
31
|
var unocss_exports = {};
|
|
32
32
|
__export(unocss_exports, {
|
|
33
33
|
unocss: () => unocss
|
|
@@ -91,7 +91,7 @@ async function ensure(packages) {
|
|
|
91
91
|
;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
// src/configs/unocss.ts
|
|
94
|
+
// src/configs/css/unocss.ts
|
|
95
95
|
async function unocss(options = {}) {
|
|
96
96
|
const {
|
|
97
97
|
attributify = true,
|
|
@@ -27,12 +27,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// src/configs/
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
30
|
+
// src/configs/data/json.ts
|
|
31
|
+
var json_exports = {};
|
|
32
|
+
__export(json_exports, {
|
|
33
33
|
jsonc: () => jsonc
|
|
34
34
|
});
|
|
35
|
-
module.exports = __toCommonJS(
|
|
35
|
+
module.exports = __toCommonJS(json_exports);
|
|
36
36
|
|
|
37
37
|
// src/globs.ts
|
|
38
38
|
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
@@ -69,7 +69,7 @@ async function interop(m) {
|
|
|
69
69
|
return resolved.default || resolved;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
// src/configs/
|
|
72
|
+
// src/configs/data/json.ts
|
|
73
73
|
async function jsonc(options = {}) {
|
|
74
74
|
const {
|
|
75
75
|
files = [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
|