@luxass/eslint-config 4.0.0 → 4.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/dist/{chunk-VZ2YFMWH.mjs → chunk-C67L5T23.mjs} +5 -2
- package/dist/{chunk-QK56GX3F.mjs → chunk-K6TLNQJF.mjs} +8 -4
- package/dist/{chunk-DZCXT6HT.mjs → chunk-RNFKNSHW.mjs} +6 -1
- package/dist/{chunk-P3QUAOFO.mjs → chunk-Z7F6QSYQ.mjs} +8 -0
- package/dist/configs/astro.d.cts +1 -1
- package/dist/configs/astro.d.ts +1 -1
- package/dist/configs/comments.d.cts +1 -1
- package/dist/configs/comments.d.ts +1 -1
- package/dist/configs/formatters.d.cts +1 -1
- package/dist/configs/formatters.d.ts +1 -1
- package/dist/configs/ignores.d.cts +1 -1
- package/dist/configs/ignores.d.ts +1 -1
- package/dist/configs/imports.d.cts +1 -1
- package/dist/configs/imports.d.ts +1 -1
- package/dist/configs/index.cjs +25 -7
- package/dist/configs/index.d.cts +1 -1
- package/dist/configs/index.d.ts +1 -1
- package/dist/configs/index.mjs +4 -4
- package/dist/configs/javascript.cjs +8 -4
- package/dist/configs/javascript.d.cts +1 -1
- package/dist/configs/javascript.d.ts +1 -1
- package/dist/configs/javascript.mjs +1 -1
- package/dist/configs/jsdoc.d.cts +1 -1
- package/dist/configs/jsdoc.d.ts +1 -1
- package/dist/configs/jsonc.d.cts +1 -1
- package/dist/configs/jsonc.d.ts +1 -1
- package/dist/configs/markdown.d.cts +2 -2
- package/dist/configs/markdown.d.ts +2 -2
- package/dist/configs/nextjs.d.cts +1 -1
- package/dist/configs/nextjs.d.ts +1 -1
- package/dist/configs/node.d.cts +1 -1
- package/dist/configs/node.d.ts +1 -1
- package/dist/configs/perfectionist.d.cts +1 -1
- package/dist/configs/perfectionist.d.ts +1 -1
- package/dist/configs/react.cjs +6 -1
- package/dist/configs/react.d.cts +1 -1
- package/dist/configs/react.d.ts +1 -1
- package/dist/configs/react.mjs +1 -1
- package/dist/configs/sort.d.cts +1 -1
- package/dist/configs/sort.d.ts +1 -1
- package/dist/configs/stylistic.d.cts +1 -1
- package/dist/configs/stylistic.d.ts +1 -1
- package/dist/configs/tailwindcss.d.cts +1 -1
- package/dist/configs/tailwindcss.d.ts +1 -1
- package/dist/configs/test.d.cts +1 -1
- package/dist/configs/test.d.ts +1 -1
- package/dist/configs/toml.d.cts +1 -1
- package/dist/configs/toml.d.ts +1 -1
- package/dist/configs/typescript.cjs +7 -0
- package/dist/configs/typescript.d.cts +1 -1
- package/dist/configs/typescript.d.ts +1 -1
- package/dist/configs/typescript.mjs +1 -1
- package/dist/configs/unicorn.d.cts +1 -1
- package/dist/configs/unicorn.d.ts +1 -1
- package/dist/configs/unocss.d.cts +1 -1
- package/dist/configs/unocss.d.ts +1 -1
- package/dist/configs/vue.cjs +29 -2
- package/dist/configs/vue.d.cts +1 -1
- package/dist/configs/vue.d.ts +1 -1
- package/dist/configs/vue.mjs +1 -1
- package/dist/configs/yaml.d.cts +1 -1
- package/dist/configs/yaml.d.ts +1 -1
- package/dist/index.cjs +40 -20
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +15 -13
- package/dist/{types-spTEGSaV.d.cts → types-kS9TgR8_.d.cts} +12 -12
- package/dist/{types-spTEGSaV.d.ts → types-kS9TgR8_.d.ts} +12 -12
- package/package.json +24 -21
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ensure,
|
|
2
3
|
interop
|
|
3
4
|
} from "./chunk-4YBQZLPS.mjs";
|
|
4
5
|
import {
|
|
@@ -9,11 +10,14 @@ import {
|
|
|
9
10
|
import { mergeProcessors } from "eslint-merge-processors";
|
|
10
11
|
async function vue(options = {}) {
|
|
11
12
|
const {
|
|
12
|
-
a11y =
|
|
13
|
+
a11y = false,
|
|
13
14
|
files = [GLOB_VUE],
|
|
14
15
|
overrides = {},
|
|
15
16
|
stylistic = true
|
|
16
17
|
} = options;
|
|
18
|
+
if (a11y) {
|
|
19
|
+
await ensure(["eslint-plugin-vuejs-accessibility"]);
|
|
20
|
+
}
|
|
17
21
|
const [
|
|
18
22
|
pluginVue,
|
|
19
23
|
parserVue,
|
|
@@ -96,7 +100,6 @@ async function vue(options = {}) {
|
|
|
96
100
|
"vue/multi-word-component-names": "off",
|
|
97
101
|
"vue/no-dupe-keys": "off",
|
|
98
102
|
"vue/no-empty-pattern": "error",
|
|
99
|
-
"vue/no-extra-parens": ["error", "functions"],
|
|
100
103
|
"vue/no-irregular-whitespace": "error",
|
|
101
104
|
"vue/no-loss-of-precision": "error",
|
|
102
105
|
"vue/no-restricted-syntax": [
|
|
@@ -61,10 +61,7 @@ async function javascript(options = {}) {
|
|
|
61
61
|
"no-class-assign": "error",
|
|
62
62
|
"no-compare-neg-zero": "error",
|
|
63
63
|
"no-cond-assign": ["error", "always"],
|
|
64
|
-
"no-console": [
|
|
65
|
-
editor ? "off" : "error",
|
|
66
|
-
{ allow: ["warn", "error"] }
|
|
67
|
-
],
|
|
64
|
+
"no-console": ["error", { allow: ["warn", "error"] }],
|
|
68
65
|
"no-const-assign": "error",
|
|
69
66
|
"no-control-regex": "error",
|
|
70
67
|
"no-debugger": "error",
|
|
@@ -257,6 +254,13 @@ async function javascript(options = {}) {
|
|
|
257
254
|
rules: {
|
|
258
255
|
"no-console": "off"
|
|
259
256
|
}
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
name: "luxass:playground-overrides",
|
|
260
|
+
files: [`**/playground.${GLOB_SRC_EXT}`],
|
|
261
|
+
rules: {
|
|
262
|
+
"no-console": "off"
|
|
263
|
+
}
|
|
260
264
|
}
|
|
261
265
|
];
|
|
262
266
|
}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-ATRL3UZP.mjs";
|
|
9
9
|
|
|
10
10
|
// src/configs/react.ts
|
|
11
|
+
import { isPackageExists } from "local-pkg";
|
|
11
12
|
async function react(options = {}) {
|
|
12
13
|
const {
|
|
13
14
|
a11y = false,
|
|
@@ -32,6 +33,9 @@ async function react(options = {}) {
|
|
|
32
33
|
interop(import("eslint-plugin-react-refresh")),
|
|
33
34
|
...a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
|
|
34
35
|
]);
|
|
36
|
+
const isAllowConstantExport = ["vite"].some(
|
|
37
|
+
(i) => isPackageExists(i)
|
|
38
|
+
);
|
|
35
39
|
return [
|
|
36
40
|
{
|
|
37
41
|
name: "luxass:react:setup",
|
|
@@ -267,8 +271,9 @@ async function react(options = {}) {
|
|
|
267
271
|
"react-hooks/exhaustive-deps": "warn",
|
|
268
272
|
"react-hooks/rules-of-hooks": "error",
|
|
269
273
|
// react refresh
|
|
270
|
-
"react-refresh/only-export-components": ["warn", { allowConstantExport:
|
|
274
|
+
"react-refresh/only-export-components": ["warn", { allowConstantExport: isAllowConstantExport }],
|
|
271
275
|
...typescript ? {
|
|
276
|
+
"react/jsx-no-undef": "off",
|
|
272
277
|
"react/prop-type": "off"
|
|
273
278
|
} : {},
|
|
274
279
|
// overrides
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-4YBQZLPS.mjs";
|
|
6
6
|
import {
|
|
7
7
|
GLOB_SRC,
|
|
8
|
+
GLOB_SRC_EXT,
|
|
8
9
|
GLOB_TS,
|
|
9
10
|
GLOB_TSX
|
|
10
11
|
} from "./chunk-ATRL3UZP.mjs";
|
|
@@ -184,6 +185,13 @@ async function typescript(options = {}) {
|
|
|
184
185
|
"no-unused-expressions": "off"
|
|
185
186
|
}
|
|
186
187
|
},
|
|
188
|
+
{
|
|
189
|
+
name: "luxass:typescript:playground-overrides",
|
|
190
|
+
files: [`**/playground.${GLOB_SRC_EXT}`],
|
|
191
|
+
rules: {
|
|
192
|
+
"no-console": "off"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
187
195
|
{
|
|
188
196
|
name: "luxass:typescript:javascript-overrides",
|
|
189
197
|
files: ["**/*.js", "**/*.cjs"],
|
package/dist/configs/astro.d.cts
CHANGED
package/dist/configs/astro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { F as FormattersOptions, i as formatters } from '../types-
|
|
1
|
+
export { F as FormattersOptions, i as formatters } from '../types-kS9TgR8_.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 { F as FormattersOptions, i as formatters } from '../types-
|
|
1
|
+
export { F as FormattersOptions, i as formatters } from '../types-kS9TgR8_.js';
|
|
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
|
-
import { S as StylisticConfig, k as FlatConfigItem } from '../types-
|
|
1
|
+
import { S as StylisticConfig, k as FlatConfigItem } from '../types-kS9TgR8_.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
|
-
import { S as StylisticConfig, k as FlatConfigItem } from '../types-
|
|
1
|
+
import { S as StylisticConfig, k as FlatConfigItem } from '../types-kS9TgR8_.js';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
3
|
import '@antfu/eslint-define-config';
|
|
4
4
|
import '@eslint-types/jsdoc/types';
|
package/dist/configs/index.cjs
CHANGED
|
@@ -568,10 +568,7 @@ async function javascript(options = {}) {
|
|
|
568
568
|
"no-class-assign": "error",
|
|
569
569
|
"no-compare-neg-zero": "error",
|
|
570
570
|
"no-cond-assign": ["error", "always"],
|
|
571
|
-
"no-console": [
|
|
572
|
-
editor ? "off" : "error",
|
|
573
|
-
{ allow: ["warn", "error"] }
|
|
574
|
-
],
|
|
571
|
+
"no-console": ["error", { allow: ["warn", "error"] }],
|
|
575
572
|
"no-const-assign": "error",
|
|
576
573
|
"no-control-regex": "error",
|
|
577
574
|
"no-debugger": "error",
|
|
@@ -764,6 +761,13 @@ async function javascript(options = {}) {
|
|
|
764
761
|
rules: {
|
|
765
762
|
"no-console": "off"
|
|
766
763
|
}
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
name: "luxass:playground-overrides",
|
|
767
|
+
files: [`**/playground.${GLOB_SRC_EXT}`],
|
|
768
|
+
rules: {
|
|
769
|
+
"no-console": "off"
|
|
770
|
+
}
|
|
767
771
|
}
|
|
768
772
|
];
|
|
769
773
|
}
|
|
@@ -1249,6 +1253,13 @@ async function typescript(options = {}) {
|
|
|
1249
1253
|
"no-unused-expressions": "off"
|
|
1250
1254
|
}
|
|
1251
1255
|
},
|
|
1256
|
+
{
|
|
1257
|
+
name: "luxass:typescript:playground-overrides",
|
|
1258
|
+
files: [`**/playground.${GLOB_SRC_EXT}`],
|
|
1259
|
+
rules: {
|
|
1260
|
+
"no-console": "off"
|
|
1261
|
+
}
|
|
1262
|
+
},
|
|
1252
1263
|
{
|
|
1253
1264
|
name: "luxass:typescript:javascript-overrides",
|
|
1254
1265
|
files: ["**/*.js", "**/*.cjs"],
|
|
@@ -1264,11 +1275,14 @@ async function typescript(options = {}) {
|
|
|
1264
1275
|
var import_eslint_merge_processors2 = require("eslint-merge-processors");
|
|
1265
1276
|
async function vue(options = {}) {
|
|
1266
1277
|
const {
|
|
1267
|
-
a11y =
|
|
1278
|
+
a11y = false,
|
|
1268
1279
|
files = [GLOB_VUE],
|
|
1269
1280
|
overrides = {},
|
|
1270
1281
|
stylistic: stylistic2 = true
|
|
1271
1282
|
} = options;
|
|
1283
|
+
if (a11y) {
|
|
1284
|
+
await ensure(["eslint-plugin-vuejs-accessibility"]);
|
|
1285
|
+
}
|
|
1272
1286
|
const [
|
|
1273
1287
|
pluginVue,
|
|
1274
1288
|
parserVue,
|
|
@@ -1351,7 +1365,6 @@ async function vue(options = {}) {
|
|
|
1351
1365
|
"vue/multi-word-component-names": "off",
|
|
1352
1366
|
"vue/no-dupe-keys": "off",
|
|
1353
1367
|
"vue/no-empty-pattern": "error",
|
|
1354
|
-
"vue/no-extra-parens": ["error", "functions"],
|
|
1355
1368
|
"vue/no-irregular-whitespace": "error",
|
|
1356
1369
|
"vue/no-loss-of-precision": "error",
|
|
1357
1370
|
"vue/no-restricted-syntax": [
|
|
@@ -1775,6 +1788,7 @@ async function nextjs(options = {}) {
|
|
|
1775
1788
|
}
|
|
1776
1789
|
|
|
1777
1790
|
// src/configs/react.ts
|
|
1791
|
+
var import_local_pkg2 = require("local-pkg");
|
|
1778
1792
|
async function react(options = {}) {
|
|
1779
1793
|
const {
|
|
1780
1794
|
a11y = false,
|
|
@@ -1799,6 +1813,9 @@ async function react(options = {}) {
|
|
|
1799
1813
|
interop(import("eslint-plugin-react-refresh")),
|
|
1800
1814
|
...a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
|
|
1801
1815
|
]);
|
|
1816
|
+
const isAllowConstantExport = ["vite"].some(
|
|
1817
|
+
(i) => (0, import_local_pkg2.isPackageExists)(i)
|
|
1818
|
+
);
|
|
1802
1819
|
return [
|
|
1803
1820
|
{
|
|
1804
1821
|
name: "luxass:react:setup",
|
|
@@ -2034,8 +2051,9 @@ async function react(options = {}) {
|
|
|
2034
2051
|
"react-hooks/exhaustive-deps": "warn",
|
|
2035
2052
|
"react-hooks/rules-of-hooks": "error",
|
|
2036
2053
|
// react refresh
|
|
2037
|
-
"react-refresh/only-export-components": ["warn", { allowConstantExport:
|
|
2054
|
+
"react-refresh/only-export-components": ["warn", { allowConstantExport: isAllowConstantExport }],
|
|
2038
2055
|
...typescript2 ? {
|
|
2056
|
+
"react/jsx-no-undef": "off",
|
|
2039
2057
|
"react/prop-type": "off"
|
|
2040
2058
|
} : {},
|
|
2041
2059
|
// overrides
|
package/dist/configs/index.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ export { node } from './node.cjs';
|
|
|
5
5
|
export { sortPackageJson, sortTsconfig } from './sort.cjs';
|
|
6
6
|
export { perfectionist } from './perfectionist.cjs';
|
|
7
7
|
export { ImportsOptions, imports } from './imports.cjs';
|
|
8
|
-
export { A as AstroOptions, F as FormattersOptions, b as JSONOptions, J as JavaScriptOptions, N as NextJSOptions, R as ReactOptions, S as StylisticConfig, c as StylisticOptions, h as TailwindCSSOptions, e as TestOptions, T as TypeScriptOptions, U as UnoCSSOptions, V as VueOptions, Y as YAMLOptions, f as astro, i as formatters, j as javascript, a as jsonc, n as nextjs, r as react, s as stylistic, g as tailwindcss, d as test, t as typescript, u as unocss, v as vue, y as yaml } from '../types-
|
|
8
|
+
export { A as AstroOptions, F as FormattersOptions, b as JSONOptions, J as JavaScriptOptions, N as NextJSOptions, R as ReactOptions, S as StylisticConfig, c as StylisticOptions, h as TailwindCSSOptions, e as TestOptions, T as TypeScriptOptions, U as UnoCSSOptions, V as VueOptions, Y as YAMLOptions, f as astro, i as formatters, j as javascript, a as jsonc, n as nextjs, r as react, s as stylistic, g as tailwindcss, d as test, t as typescript, u as unocss, v as vue, y as yaml } from '../types-kS9TgR8_.cjs';
|
|
9
9
|
export { JSDOCOptions, jsdoc } from './jsdoc.cjs';
|
|
10
10
|
export { MarkdownOptions, markdown } from './markdown.cjs';
|
|
11
11
|
import 'eslint-config-flat-gitignore';
|
package/dist/configs/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { node } from './node.js';
|
|
|
5
5
|
export { sortPackageJson, sortTsconfig } from './sort.js';
|
|
6
6
|
export { perfectionist } from './perfectionist.js';
|
|
7
7
|
export { ImportsOptions, imports } from './imports.js';
|
|
8
|
-
export { A as AstroOptions, F as FormattersOptions, b as JSONOptions, J as JavaScriptOptions, N as NextJSOptions, R as ReactOptions, S as StylisticConfig, c as StylisticOptions, h as TailwindCSSOptions, e as TestOptions, T as TypeScriptOptions, U as UnoCSSOptions, V as VueOptions, Y as YAMLOptions, f as astro, i as formatters, j as javascript, a as jsonc, n as nextjs, r as react, s as stylistic, g as tailwindcss, d as test, t as typescript, u as unocss, v as vue, y as yaml } from '../types-
|
|
8
|
+
export { A as AstroOptions, F as FormattersOptions, b as JSONOptions, J as JavaScriptOptions, N as NextJSOptions, R as ReactOptions, S as StylisticConfig, c as StylisticOptions, h as TailwindCSSOptions, e as TestOptions, T as TypeScriptOptions, U as UnoCSSOptions, V as VueOptions, Y as YAMLOptions, f as astro, i as formatters, j as javascript, a as jsonc, n as nextjs, r as react, s as stylistic, g as tailwindcss, d as test, t as typescript, u as unocss, v as vue, y as yaml } from '../types-kS9TgR8_.js';
|
|
9
9
|
export { JSDOCOptions, jsdoc } from './jsdoc.js';
|
|
10
10
|
export { MarkdownOptions, markdown } from './markdown.js';
|
|
11
11
|
import 'eslint-config-flat-gitignore';
|
package/dist/configs/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../chunk-ME2OAMS3.mjs";
|
|
2
2
|
import {
|
|
3
3
|
vue
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-C67L5T23.mjs";
|
|
5
5
|
import {
|
|
6
6
|
yaml
|
|
7
7
|
} from "../chunk-WOYZWHPM.mjs";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import "../chunk-WDSV2EFG.mjs";
|
|
19
19
|
import {
|
|
20
20
|
typescript
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-Z7F6QSYQ.mjs";
|
|
22
22
|
import {
|
|
23
23
|
unicorn
|
|
24
24
|
} from "../chunk-RVSUTDCE.mjs";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "../chunk-KJ7ZCBK4.mjs";
|
|
28
28
|
import {
|
|
29
29
|
javascript
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-K6TLNQJF.mjs";
|
|
31
31
|
import {
|
|
32
32
|
jsdoc
|
|
33
33
|
} from "../chunk-DVQQVCGF.mjs";
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
} from "../chunk-6T7MXPCT.mjs";
|
|
49
49
|
import {
|
|
50
50
|
react
|
|
51
|
-
} from "../chunk-
|
|
51
|
+
} from "../chunk-RNFKNSHW.mjs";
|
|
52
52
|
import {
|
|
53
53
|
astro
|
|
54
54
|
} from "../chunk-GBLPCM3X.mjs";
|
|
@@ -116,10 +116,7 @@ async function javascript(options = {}) {
|
|
|
116
116
|
"no-class-assign": "error",
|
|
117
117
|
"no-compare-neg-zero": "error",
|
|
118
118
|
"no-cond-assign": ["error", "always"],
|
|
119
|
-
"no-console": [
|
|
120
|
-
editor ? "off" : "error",
|
|
121
|
-
{ allow: ["warn", "error"] }
|
|
122
|
-
],
|
|
119
|
+
"no-console": ["error", { allow: ["warn", "error"] }],
|
|
123
120
|
"no-const-assign": "error",
|
|
124
121
|
"no-control-regex": "error",
|
|
125
122
|
"no-debugger": "error",
|
|
@@ -312,6 +309,13 @@ async function javascript(options = {}) {
|
|
|
312
309
|
rules: {
|
|
313
310
|
"no-console": "off"
|
|
314
311
|
}
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
name: "luxass:playground-overrides",
|
|
315
|
+
files: [`**/playground.${GLOB_SRC_EXT}`],
|
|
316
|
+
rules: {
|
|
317
|
+
"no-console": "off"
|
|
318
|
+
}
|
|
315
319
|
}
|
|
316
320
|
];
|
|
317
321
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { J as JavaScriptOptions, j as javascript } from '../types-
|
|
1
|
+
export { J as JavaScriptOptions, j as javascript } from '../types-kS9TgR8_.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 { J as JavaScriptOptions, j as javascript } from '../types-
|
|
1
|
+
export { J as JavaScriptOptions, j as javascript } from '../types-kS9TgR8_.js';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
3
|
import '@antfu/eslint-define-config';
|
|
4
4
|
import '@eslint-types/jsdoc/types';
|
package/dist/configs/jsdoc.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StylisticConfig, k as FlatConfigItem } from '../types-
|
|
1
|
+
import { S as StylisticConfig, k as FlatConfigItem } from '../types-kS9TgR8_.cjs';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
3
|
import '@antfu/eslint-define-config';
|
|
4
4
|
import '@eslint-types/jsdoc/types';
|
package/dist/configs/jsdoc.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StylisticConfig, k as FlatConfigItem } from '../types-
|
|
1
|
+
import { S as StylisticConfig, k as FlatConfigItem } from '../types-kS9TgR8_.js';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
3
|
import '@antfu/eslint-define-config';
|
|
4
4
|
import '@eslint-types/jsdoc/types';
|
package/dist/configs/jsonc.d.cts
CHANGED
package/dist/configs/jsonc.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as FlatConfigItem } from '../types-
|
|
1
|
+
import { k as FlatConfigItem } from '../types-kS9TgR8_.cjs';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
3
|
import '@antfu/eslint-define-config';
|
|
4
4
|
import '@eslint-types/jsdoc/types';
|
|
@@ -26,7 +26,7 @@ interface MarkdownOptions {
|
|
|
26
26
|
* Glob patterns for Markdown files.
|
|
27
27
|
*
|
|
28
28
|
* @default [GLOB_MARKDOWN]
|
|
29
|
-
* @see https://github.com/luxass/eslint-config/blob/
|
|
29
|
+
* @see https://github.com/luxass/eslint-config/blob/main/src/globs.ts
|
|
30
30
|
*/
|
|
31
31
|
files?: string[];
|
|
32
32
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as FlatConfigItem } from '../types-
|
|
1
|
+
import { k as FlatConfigItem } from '../types-kS9TgR8_.js';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
3
|
import '@antfu/eslint-define-config';
|
|
4
4
|
import '@eslint-types/jsdoc/types';
|
|
@@ -26,7 +26,7 @@ interface MarkdownOptions {
|
|
|
26
26
|
* Glob patterns for Markdown files.
|
|
27
27
|
*
|
|
28
28
|
* @default [GLOB_MARKDOWN]
|
|
29
|
-
* @see https://github.com/luxass/eslint-config/blob/
|
|
29
|
+
* @see https://github.com/luxass/eslint-config/blob/main/src/globs.ts
|
|
30
30
|
*/
|
|
31
31
|
files?: string[];
|
|
32
32
|
}
|
package/dist/configs/nextjs.d.ts
CHANGED
package/dist/configs/node.d.cts
CHANGED
package/dist/configs/node.d.ts
CHANGED
package/dist/configs/react.cjs
CHANGED
|
@@ -33,6 +33,7 @@ __export(react_exports, {
|
|
|
33
33
|
react: () => react
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(react_exports);
|
|
36
|
+
var import_local_pkg2 = require("local-pkg");
|
|
36
37
|
|
|
37
38
|
// src/globs.ts
|
|
38
39
|
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
@@ -118,6 +119,9 @@ async function react(options = {}) {
|
|
|
118
119
|
interop(import("eslint-plugin-react-refresh")),
|
|
119
120
|
...a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
|
|
120
121
|
]);
|
|
122
|
+
const isAllowConstantExport = ["vite"].some(
|
|
123
|
+
(i) => (0, import_local_pkg2.isPackageExists)(i)
|
|
124
|
+
);
|
|
121
125
|
return [
|
|
122
126
|
{
|
|
123
127
|
name: "luxass:react:setup",
|
|
@@ -353,8 +357,9 @@ async function react(options = {}) {
|
|
|
353
357
|
"react-hooks/exhaustive-deps": "warn",
|
|
354
358
|
"react-hooks/rules-of-hooks": "error",
|
|
355
359
|
// react refresh
|
|
356
|
-
"react-refresh/only-export-components": ["warn", { allowConstantExport:
|
|
360
|
+
"react-refresh/only-export-components": ["warn", { allowConstantExport: isAllowConstantExport }],
|
|
357
361
|
...typescript ? {
|
|
362
|
+
"react/jsx-no-undef": "off",
|
|
358
363
|
"react/prop-type": "off"
|
|
359
364
|
} : {},
|
|
360
365
|
// overrides
|
package/dist/configs/react.d.cts
CHANGED
package/dist/configs/react.d.ts
CHANGED
package/dist/configs/react.mjs
CHANGED
package/dist/configs/sort.d.cts
CHANGED
package/dist/configs/sort.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@stylistic/eslint-plugin';
|
|
2
|
-
export { S as StylisticConfig, o as StylisticConfigDefaults, c as StylisticOptions, s as stylistic } from '../types-
|
|
2
|
+
export { S as StylisticConfig, o as StylisticConfigDefaults, c as StylisticOptions, s as stylistic } from '../types-kS9TgR8_.cjs';
|
|
3
3
|
import 'eslint-config-flat-gitignore';
|
|
4
4
|
import '@antfu/eslint-define-config';
|
|
5
5
|
import '@eslint-types/jsdoc/types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@stylistic/eslint-plugin';
|
|
2
|
-
export { S as StylisticConfig, o as StylisticConfigDefaults, c as StylisticOptions, s as stylistic } from '../types-
|
|
2
|
+
export { S as StylisticConfig, o as StylisticConfigDefaults, c as StylisticOptions, s as stylistic } from '../types-kS9TgR8_.js';
|
|
3
3
|
import 'eslint-config-flat-gitignore';
|
|
4
4
|
import '@antfu/eslint-define-config';
|
|
5
5
|
import '@eslint-types/jsdoc/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { h as TailwindCSSOptions, g as tailwindcss } from '../types-
|
|
1
|
+
export { h as TailwindCSSOptions, g as tailwindcss } from '../types-kS9TgR8_.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 '../types-
|
|
1
|
+
export { h as TailwindCSSOptions, g as tailwindcss } from '../types-kS9TgR8_.js';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
3
|
import '@antfu/eslint-define-config';
|
|
4
4
|
import '@eslint-types/jsdoc/types';
|
package/dist/configs/test.d.cts
CHANGED
package/dist/configs/test.d.ts
CHANGED
package/dist/configs/toml.d.cts
CHANGED
package/dist/configs/toml.d.ts
CHANGED
|
@@ -256,6 +256,13 @@ async function typescript(options = {}) {
|
|
|
256
256
|
"no-unused-expressions": "off"
|
|
257
257
|
}
|
|
258
258
|
},
|
|
259
|
+
{
|
|
260
|
+
name: "luxass:typescript:playground-overrides",
|
|
261
|
+
files: [`**/playground.${GLOB_SRC_EXT}`],
|
|
262
|
+
rules: {
|
|
263
|
+
"no-console": "off"
|
|
264
|
+
}
|
|
265
|
+
},
|
|
259
266
|
{
|
|
260
267
|
name: "luxass:typescript:javascript-overrides",
|
|
261
268
|
files: ["**/*.js", "**/*.cjs"],
|