@siberiacancode/eslint 2.16.9 → 2.16.11

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.
@@ -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({
@@ -137469,12 +137473,12 @@ const eslint = (inputOptions = {}, ...configs) => {
137469
137473
  }, {
137470
137474
  name: "siberiacancode/rewrite",
137471
137475
  rules: {
137472
- "antfu/curly": "off",
137473
137476
  "antfu/if-newline": "off",
137474
137477
  "antfu/top-level-function": "off",
137475
137478
  "no-console": "warn",
137476
137479
  "react/prefer-namespace-import": "off",
137477
137480
  "react-hooks/exhaustive-deps": "off",
137481
+ "react-refresh/only-export-components": "off",
137478
137482
  "test/prefer-lowercase-title": "off"
137479
137483
  }
137480
137484
  }, {
@@ -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 };
@@ -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 };
@@ -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({
@@ -137466,12 +137470,12 @@ const eslint = (inputOptions = {}, ...configs) => {
137466
137470
  }, {
137467
137471
  name: "siberiacancode/rewrite",
137468
137472
  rules: {
137469
- "antfu/curly": "off",
137470
137473
  "antfu/if-newline": "off",
137471
137474
  "antfu/top-level-function": "off",
137472
137475
  "no-console": "warn",
137473
137476
  "react/prefer-namespace-import": "off",
137474
137477
  "react-hooks/exhaustive-deps": "off",
137478
+ "react-refresh/only-export-components": "off",
137475
137479
  "test/prefer-lowercase-title": "off"
137476
137480
  }
137477
137481
  }, {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@siberiacancode/eslint",
3
3
  "type": "module",
4
- "version": "2.16.9",
4
+ "version": "2.16.11",
5
5
  "description": "eslint configs",
6
6
  "author": {
7
7
  "name": "SIBERIA CAN CODE 🧊",