@luxass/eslint-config 7.0.1 → 7.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/index.d.mts +10 -1
- package/dist/index.mjs +9 -3
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -232,7 +232,7 @@ interface FormattersOptions {
|
|
|
232
232
|
declare function formatters(options?: FormattersOptions | true, stylistic?: StylisticConfig): Promise<TypedFlatConfigItem[]>;
|
|
233
233
|
//#endregion
|
|
234
234
|
//#region src/configs/ignores.d.ts
|
|
235
|
-
declare function ignores(userIgnores?: string[]): Promise<TypedFlatConfigItem[]>;
|
|
235
|
+
declare function ignores(userIgnores?: string[] | ((originals: string[]) => string[]), ignoreTypeScript?: boolean): Promise<TypedFlatConfigItem[]>;
|
|
236
236
|
//#endregion
|
|
237
237
|
//#region src/configs/imports.d.ts
|
|
238
238
|
interface ImportsOptions {
|
|
@@ -17312,6 +17312,15 @@ interface ConfigOptions {
|
|
|
17312
17312
|
* @default true
|
|
17313
17313
|
*/
|
|
17314
17314
|
gitignore?: FlatGitignoreOptions | boolean;
|
|
17315
|
+
/**
|
|
17316
|
+
* Extend the global ignores.
|
|
17317
|
+
*
|
|
17318
|
+
* Passing an array to extends the ignores.
|
|
17319
|
+
* Passing a function to modify the default ignores.
|
|
17320
|
+
*
|
|
17321
|
+
* @default []
|
|
17322
|
+
*/
|
|
17323
|
+
ignores?: string[] | ((originals: string[]) => string[]);
|
|
17315
17324
|
/**
|
|
17316
17325
|
* Options for eslint-plugin-unicorn.
|
|
17317
17326
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -666,9 +666,13 @@ async function formatters(options = {}, stylistic = {}) {
|
|
|
666
666
|
|
|
667
667
|
//#endregion
|
|
668
668
|
//#region src/configs/ignores.ts
|
|
669
|
-
async function ignores(userIgnores = []) {
|
|
669
|
+
async function ignores(userIgnores = [], ignoreTypeScript = false) {
|
|
670
|
+
let ignores = [...GLOB_EXCLUDE];
|
|
671
|
+
if (ignoreTypeScript) ignores.push(GLOB_TS, GLOB_TSX);
|
|
672
|
+
if (typeof userIgnores === "function") ignores = userIgnores(ignores);
|
|
673
|
+
else ignores = [...ignores, ...userIgnores];
|
|
670
674
|
return [{
|
|
671
|
-
ignores
|
|
675
|
+
ignores,
|
|
672
676
|
name: "luxass/ignores"
|
|
673
677
|
}];
|
|
674
678
|
}
|
|
@@ -943,6 +947,7 @@ async function javascript(options = {}) {
|
|
|
943
947
|
async function jsdoc(options = {}) {
|
|
944
948
|
const { overrides, stylistic = true } = options;
|
|
945
949
|
return [{
|
|
950
|
+
files: [GLOB_SRC],
|
|
946
951
|
name: "luxass/jsdoc/rules",
|
|
947
952
|
plugins: { jsdoc: await interop(import("eslint-plugin-jsdoc")) },
|
|
948
953
|
rules: {
|
|
@@ -1109,6 +1114,7 @@ async function markdown(options = {}) {
|
|
|
1109
1114
|
//#region src/configs/node.ts
|
|
1110
1115
|
function node() {
|
|
1111
1116
|
return [{
|
|
1117
|
+
files: [GLOB_SRC],
|
|
1112
1118
|
name: "luxass/node",
|
|
1113
1119
|
plugins: { node: pluginNode },
|
|
1114
1120
|
rules: {
|
|
@@ -2345,7 +2351,7 @@ function luxass(options = {}, ...userConfigs) {
|
|
|
2345
2351
|
})]));
|
|
2346
2352
|
const typescriptOptions = resolveSubOptions(options, "typescript");
|
|
2347
2353
|
const tsconfigPath = "tsconfigPath" in typescriptOptions ? typescriptOptions.tsconfigPath : void 0;
|
|
2348
|
-
configs.push(ignores(userIgnores), javascript({
|
|
2354
|
+
configs.push(ignores(userIgnores, !enableTypeScript), javascript({
|
|
2349
2355
|
isInEditor,
|
|
2350
2356
|
overrides: getOverrides(options, "javascript")
|
|
2351
2357
|
}), comments(), command(), perfectionist());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxass/eslint-config",
|
|
3
|
-
"version": "7.0
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "ESLint config for @luxass",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@prettier/plugin-xml": "^3.4.1",
|
|
40
40
|
"@unocss/eslint-plugin": ">=0.50.0",
|
|
41
41
|
"astro-eslint-parser": "^1.0.2",
|
|
42
|
-
"eslint": "^9.10.0",
|
|
42
|
+
"eslint": "^9.10.0 || ^10.0.0",
|
|
43
43
|
"eslint-plugin-astro": "^1.2.0",
|
|
44
44
|
"eslint-plugin-format": ">=0.1.0",
|
|
45
45
|
"eslint-plugin-react-hooks": "^7.0.0",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
92
92
|
"eslint-flat-config-utils": "^3.0.1",
|
|
93
93
|
"eslint-merge-processors": "^2.0.0",
|
|
94
|
-
"eslint-plugin-antfu": "^3.2.
|
|
94
|
+
"eslint-plugin-antfu": "^3.2.1",
|
|
95
95
|
"eslint-plugin-command": "^3.4.0",
|
|
96
96
|
"eslint-plugin-import-lite": "^0.5.0",
|
|
97
97
|
"eslint-plugin-jsdoc": "^62.5.3",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"yaml-eslint-parser": "^2.0.0"
|
|
116
116
|
},
|
|
117
117
|
"devDependencies": {
|
|
118
|
-
"@eslint-react/eslint-plugin": "^2.
|
|
118
|
+
"@eslint-react/eslint-plugin": "^2.12.4",
|
|
119
119
|
"@eslint/config-inspector": "^1.4.2",
|
|
120
120
|
"@prettier/plugin-xml": "^3.4.2",
|
|
121
121
|
"@types/node": "^25.2.1",
|