@siberiacancode/eslint 2.16.9 → 2.16.10
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/cjs/index.cjs +7 -2
- package/dist/cjs/index.d.cts +19 -4
- package/dist/esm/index.d.mts +19 -4
- package/dist/esm/index.mjs +7 -2
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -137375,7 +137375,8 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
137375
137375
|
"ts/no-namespace": "off",
|
|
137376
137376
|
"ts/no-floating-promises": "off",
|
|
137377
137377
|
"ts/no-misused-promises": ["error", { checksVoidReturn: false }],
|
|
137378
|
-
"ts/no-empty-object-type": "warn"
|
|
137378
|
+
"ts/no-empty-object-type": "warn",
|
|
137379
|
+
"ts/unbound-method": "off"
|
|
137379
137380
|
}
|
|
137380
137381
|
});
|
|
137381
137382
|
if (jsxA11y) {
|
|
@@ -137393,6 +137394,7 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
137393
137394
|
const playwrightRules = eslint_plugin_playwright.default.configs["flat/recommended"].rules;
|
|
137394
137395
|
configs.unshift({
|
|
137395
137396
|
name: "siberiacancode/playwright",
|
|
137397
|
+
...typeof playwright === "object" && { files: playwright.patterns },
|
|
137396
137398
|
plugins: { "siberiacancode-playwright": eslint_plugin_playwright.default },
|
|
137397
137399
|
rules: { ...Object.entries(playwrightRules).reduce((acc, [key, value]) => {
|
|
137398
137400
|
acc[key.replace("playwright", "siberiacancode-playwright")] = value;
|
|
@@ -137408,7 +137410,9 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
137408
137410
|
rules: { ...Object.entries(tailwindRules).reduce((acc, [key, value]) => {
|
|
137409
137411
|
acc[key.replace("better-tailwindcss", "siberiacancode-tailwind")] = value;
|
|
137410
137412
|
return acc;
|
|
137411
|
-
}, {}) }
|
|
137413
|
+
}, {}) },
|
|
137414
|
+
settings: { "better-tailwindcss": { entryPoint: "src/global.css" } },
|
|
137415
|
+
...typeof tailwind === "object" && { settings: { "better-tailwindcss": tailwind.settings } }
|
|
137412
137416
|
});
|
|
137413
137417
|
}
|
|
137414
137418
|
if (stylistic) configs.unshift({
|
|
@@ -137475,6 +137479,7 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
137475
137479
|
"no-console": "warn",
|
|
137476
137480
|
"react/prefer-namespace-import": "off",
|
|
137477
137481
|
"react-hooks/exhaustive-deps": "off",
|
|
137482
|
+
"react-refresh/only-export-components": "off",
|
|
137478
137483
|
"test/prefer-lowercase-title": "off"
|
|
137479
137484
|
}
|
|
137480
137485
|
}, {
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -1,15 +1,30 @@
|
|
|
1
|
-
import { Awaitable, ConfigNames, OptionsConfig, OptionsTypescript, TypedFlatConfigItem } from "@antfu/eslint-config";
|
|
1
|
+
import { Awaitable, ConfigNames, OptionsConfig, OptionsOverrides, OptionsTypescript, TypedFlatConfigItem } from "@antfu/eslint-config";
|
|
2
2
|
import { Linter } from "eslint";
|
|
3
3
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
|
+
interface OptionsPlaywright extends OptionsOverrides {
|
|
7
|
+
patterns?: string[];
|
|
8
|
+
}
|
|
9
|
+
interface TailwindSettings {
|
|
10
|
+
detectComponentClasses?: boolean;
|
|
11
|
+
entryPoint?: string;
|
|
12
|
+
messageStyle?: 'compact' | 'raw' | 'visual';
|
|
13
|
+
rootFontSize?: number;
|
|
14
|
+
selectors?: unknown[];
|
|
15
|
+
tailwindConfig?: string;
|
|
16
|
+
tsconfig?: string;
|
|
17
|
+
}
|
|
18
|
+
interface OptionsTailwind extends OptionsOverrides {
|
|
19
|
+
settings?: TailwindSettings;
|
|
20
|
+
}
|
|
6
21
|
type EslintOptions = OptionsConfig & TypedFlatConfigItem & {
|
|
7
22
|
jsxA11y?: boolean;
|
|
8
|
-
playwright?: boolean;
|
|
9
|
-
tailwind?: boolean;
|
|
23
|
+
playwright?: boolean | OptionsPlaywright;
|
|
24
|
+
tailwind?: boolean | OptionsTailwind;
|
|
10
25
|
typescript?: boolean | 'engine' | OptionsTypescript;
|
|
11
26
|
};
|
|
12
27
|
type Eslint = (options?: EslintOptions, ...userConfigs: Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]) => FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
|
|
13
28
|
declare const eslint: Eslint;
|
|
14
29
|
//#endregion
|
|
15
|
-
export { Eslint, eslint };
|
|
30
|
+
export { Eslint, OptionsPlaywright, OptionsTailwind, TailwindSettings, eslint };
|
package/dist/esm/index.d.mts
CHANGED
|
@@ -1,15 +1,30 @@
|
|
|
1
|
-
import { Awaitable, ConfigNames, OptionsConfig, OptionsTypescript, TypedFlatConfigItem } from "@antfu/eslint-config";
|
|
1
|
+
import { Awaitable, ConfigNames, OptionsConfig, OptionsOverrides, OptionsTypescript, TypedFlatConfigItem } from "@antfu/eslint-config";
|
|
2
2
|
import { Linter } from "eslint";
|
|
3
3
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
|
+
interface OptionsPlaywright extends OptionsOverrides {
|
|
7
|
+
patterns?: string[];
|
|
8
|
+
}
|
|
9
|
+
interface TailwindSettings {
|
|
10
|
+
detectComponentClasses?: boolean;
|
|
11
|
+
entryPoint?: string;
|
|
12
|
+
messageStyle?: 'compact' | 'raw' | 'visual';
|
|
13
|
+
rootFontSize?: number;
|
|
14
|
+
selectors?: unknown[];
|
|
15
|
+
tailwindConfig?: string;
|
|
16
|
+
tsconfig?: string;
|
|
17
|
+
}
|
|
18
|
+
interface OptionsTailwind extends OptionsOverrides {
|
|
19
|
+
settings?: TailwindSettings;
|
|
20
|
+
}
|
|
6
21
|
type EslintOptions = OptionsConfig & TypedFlatConfigItem & {
|
|
7
22
|
jsxA11y?: boolean;
|
|
8
|
-
playwright?: boolean;
|
|
9
|
-
tailwind?: boolean;
|
|
23
|
+
playwright?: boolean | OptionsPlaywright;
|
|
24
|
+
tailwind?: boolean | OptionsTailwind;
|
|
10
25
|
typescript?: boolean | 'engine' | OptionsTypescript;
|
|
11
26
|
};
|
|
12
27
|
type Eslint = (options?: EslintOptions, ...userConfigs: Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]) => FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
|
|
13
28
|
declare const eslint: Eslint;
|
|
14
29
|
//#endregion
|
|
15
|
-
export { Eslint, eslint };
|
|
30
|
+
export { Eslint, OptionsPlaywright, OptionsTailwind, TailwindSettings, eslint };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -137372,7 +137372,8 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
137372
137372
|
"ts/no-namespace": "off",
|
|
137373
137373
|
"ts/no-floating-promises": "off",
|
|
137374
137374
|
"ts/no-misused-promises": ["error", { checksVoidReturn: false }],
|
|
137375
|
-
"ts/no-empty-object-type": "warn"
|
|
137375
|
+
"ts/no-empty-object-type": "warn",
|
|
137376
|
+
"ts/unbound-method": "off"
|
|
137376
137377
|
}
|
|
137377
137378
|
});
|
|
137378
137379
|
if (jsxA11y) {
|
|
@@ -137390,6 +137391,7 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
137390
137391
|
const playwrightRules = pluginPlaywright.configs["flat/recommended"].rules;
|
|
137391
137392
|
configs.unshift({
|
|
137392
137393
|
name: "siberiacancode/playwright",
|
|
137394
|
+
...typeof playwright === "object" && { files: playwright.patterns },
|
|
137393
137395
|
plugins: { "siberiacancode-playwright": pluginPlaywright },
|
|
137394
137396
|
rules: { ...Object.entries(playwrightRules).reduce((acc, [key, value]) => {
|
|
137395
137397
|
acc[key.replace("playwright", "siberiacancode-playwright")] = value;
|
|
@@ -137405,7 +137407,9 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
137405
137407
|
rules: { ...Object.entries(tailwindRules).reduce((acc, [key, value]) => {
|
|
137406
137408
|
acc[key.replace("better-tailwindcss", "siberiacancode-tailwind")] = value;
|
|
137407
137409
|
return acc;
|
|
137408
|
-
}, {}) }
|
|
137410
|
+
}, {}) },
|
|
137411
|
+
settings: { "better-tailwindcss": { entryPoint: "src/global.css" } },
|
|
137412
|
+
...typeof tailwind === "object" && { settings: { "better-tailwindcss": tailwind.settings } }
|
|
137409
137413
|
});
|
|
137410
137414
|
}
|
|
137411
137415
|
if (stylistic) configs.unshift({
|
|
@@ -137472,6 +137476,7 @@ const eslint = (inputOptions = {}, ...configs) => {
|
|
|
137472
137476
|
"no-console": "warn",
|
|
137473
137477
|
"react/prefer-namespace-import": "off",
|
|
137474
137478
|
"react-hooks/exhaustive-deps": "off",
|
|
137479
|
+
"react-refresh/only-export-components": "off",
|
|
137475
137480
|
"test/prefer-lowercase-title": "off"
|
|
137476
137481
|
}
|
|
137477
137482
|
}, {
|