@shayanthenerd/eslint-config 0.27.0 → 0.27.2
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 +33 -34
- package/dist/prettier.config.d.mts +0 -1
- package/dist/rules/astro.mjs +0 -2
- package/dist/rules/tailwind.mjs +1 -1
- package/dist/types/eslint-schema.d.mts +1870 -933
- package/dist/types/eslintRules.d.mts +0 -1
- package/dist/types/helpers.d.mts +1 -1
- package/dist/types/index.d.mts +4 -4
- package/dist/types/options/base.d.mts +0 -1
- package/dist/types/options/baseline.d.mts +1 -2
- package/dist/types/options/markdown.d.mts +0 -1
- package/dist/types/options/react.d.mts +0 -1
- package/dist/types/options/stylistic.d.mts +2 -3
- package/dist/types/options/tailwind.d.mts +3 -4
- package/dist/types/options/test.d.mts +2 -3
- package/dist/types/options/typescript.d.mts +0 -1
- package/dist/types/options/vue.d.mts +0 -1
- package/dist/types/options/zod.d.mts +0 -1
- package/package.json +19 -19
package/dist/types/helpers.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/types/helpers.d.ts
|
|
2
2
|
type Tail<Tuple> = Tuple extends [unknown, ...(infer LastItems)] ? LastItems : never;
|
|
3
|
-
type DeepNonNullable<Type> = Type extends Function ? Type /* eslint-disable-line @typescript-eslint/no-unsafe-function-type */ : Type extends object ? { [Key in keyof Type]-?: DeepNonNullable<NonNullable<Type[Key]
|
|
3
|
+
type DeepNonNullable<Type> = Type extends Function ? Type /* eslint-disable-line @typescript-eslint/no-unsafe-function-type */ : Type extends object ? { [Key in keyof Type]-?: DeepNonNullable<NonNullable<Type[Key]>>; } : NonNullable<Type>;
|
|
4
4
|
//#endregion
|
|
5
5
|
export type { DeepNonNullable, Tail };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -11,7 +11,6 @@ import { TailwindOptions } from "./options/tailwind.mjs";
|
|
|
11
11
|
import { StylisticOptions } from "./options/stylistic.mjs";
|
|
12
12
|
import { TypeScriptOptions } from "./options/typescript.mjs";
|
|
13
13
|
import { Linter } from "eslint";
|
|
14
|
-
|
|
15
14
|
//#region src/types/index.d.ts
|
|
16
15
|
type ConfigOverrides = Pick<Linter.Config, 'name' | 'files' | 'ignores' | 'plugins' | 'settings' | 'languageOptions'>;
|
|
17
16
|
interface ConfigWithOverrides<ConfigRules extends Linter.RulesRecord> {
|
|
@@ -23,7 +22,8 @@ interface ConfigWithOverrides<ConfigRules extends Linter.RulesRecord> {
|
|
|
23
22
|
* @see [eslint-flat-config-utils: `mergeConfigs`](https://jsr.io/@antfu/eslint-flat-config-utils/doc/~/mergeConfigs)
|
|
24
23
|
*/
|
|
25
24
|
overrides?: ConfigOverrides & {
|
|
26
|
-
/** The rules to override in the current configuration object. */
|
|
25
|
+
/** The rules to override in the current configuration object. */
|
|
26
|
+
rules?: ConfigRules;
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
/** The options passed to the `defineConfig` function. */
|
|
@@ -226,13 +226,13 @@ interface Options {
|
|
|
226
226
|
* The available rules.
|
|
227
227
|
*
|
|
228
228
|
* @see [ESLint Configuration: Rules](https://eslint.org/docs/latest/use/configure/configuration-files#configuring-rules)
|
|
229
|
-
|
|
229
|
+
*/
|
|
230
230
|
rules?: Linter.RulesRecord;
|
|
231
231
|
/**
|
|
232
232
|
* Settings shared across all rules. Use this to specify information that should be available to every rule.
|
|
233
233
|
*
|
|
234
234
|
* @see [ESLint Configuration: Shared Settings](https://eslint.org/docs/latest/use/configure/configuration-files#configuring-shared-settings)
|
|
235
|
-
|
|
235
|
+
*/
|
|
236
236
|
settings?: Linter.Config['settings'];
|
|
237
237
|
};
|
|
238
238
|
/*** Configs ***/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CoreRules, RuleOptions } from "../eslintRules.mjs";
|
|
2
2
|
import { ConfigWithOverrides } from "../index.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/types/options/base.d.ts
|
|
5
4
|
type MaxDepthOptions = RuleOptions<'max-depth'>;
|
|
6
5
|
type MaxNestedCallbacksOptions = RuleOptions<'max-nested-callbacks'>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PluginRules, RuleOptions } from "../eslintRules.mjs";
|
|
2
2
|
import { ConfigWithOverrides } from "../index.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/types/options/baseline.d.ts
|
|
5
4
|
type ConfigRules = PluginRules<'baseline-js'>;
|
|
6
5
|
type CssBaselineOptions = RuleOptions<'css/use-baseline'>;
|
|
@@ -27,7 +26,7 @@ interface BaselineOptions extends ConfigWithOverrides<ConfigRules> {
|
|
|
27
26
|
* @default []
|
|
28
27
|
*
|
|
29
28
|
* @see [css/use-baseline: `allowedAtRules` option](https://github.com/eslint/css/blob/main/docs/rules/use-baseline.md#allowatrules)
|
|
30
|
-
|
|
29
|
+
*/
|
|
31
30
|
allowedAtRules?: CssBaselineOptions['allowAtRules'];
|
|
32
31
|
/**
|
|
33
32
|
* Functions that are allowed to be used regardless of the baseline.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PluginRules, RuleOptions } from "../eslintRules.mjs";
|
|
2
2
|
import { ConfigWithOverrides } from "../index.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/types/options/markdown.d.ts
|
|
5
4
|
type ConfigRules = PluginRules<'markdown'>;
|
|
6
5
|
interface MarkdownOptions extends ConfigWithOverrides<ConfigRules> {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PluginRules, RuleOptions } from "../eslintRules.mjs";
|
|
2
2
|
import { ConfigWithOverrides } from "../index.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/types/options/react.d.ts
|
|
5
4
|
type ConfigRules = PluginRules<'react'>;
|
|
6
5
|
interface ReactOptions extends ConfigWithOverrides<ConfigRules> {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PluginRules, RuleOptions } from "../eslintRules.mjs";
|
|
2
2
|
import { ConfigWithOverrides } from "../index.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/types/options/stylistic.d.ts
|
|
5
4
|
type ConfigRules = PluginRules<'@stylistic'>;
|
|
6
5
|
interface StylisticOptions extends ConfigWithOverrides<ConfigRules> {
|
|
@@ -29,7 +28,7 @@ interface StylisticOptions extends ConfigWithOverrides<ConfigRules> {
|
|
|
29
28
|
* - [better-tailwindcss/enforce-consistent-line-wrapping: `tabWidth` option](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-line-wrapping.md#tabwidth)
|
|
30
29
|
*
|
|
31
30
|
* @default 2
|
|
32
|
-
|
|
31
|
+
*/
|
|
33
32
|
indent?: number;
|
|
34
33
|
/**
|
|
35
34
|
* The style of quotes to use for JSX attributes.
|
|
@@ -70,7 +69,7 @@ interface StylisticOptions extends ConfigWithOverrides<ConfigRules> {
|
|
|
70
69
|
* - [better-tailwindcss/enforce-consistent-line-wrapping: `printWidth` option](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-line-wrapping.md)
|
|
71
70
|
*
|
|
72
71
|
* @default 120
|
|
73
|
-
|
|
72
|
+
*/
|
|
74
73
|
maxLineLength?: number;
|
|
75
74
|
/**
|
|
76
75
|
* Enforce a consistent delimiter style in interfaces and type aliases.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PluginRules, RuleOptions } from "../eslintRules.mjs";
|
|
2
2
|
import { ConfigWithOverrides } from "../index.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/types/options/tailwind.d.ts
|
|
5
4
|
type ConfigRules = PluginRules<'better-tailwindcss'>;
|
|
6
5
|
interface BaseTailwindOptions extends ConfigWithOverrides<ConfigRules> {
|
|
@@ -8,7 +7,7 @@ interface BaseTailwindOptions extends ConfigWithOverrides<ConfigRules> {
|
|
|
8
7
|
* Path to the _tailwind.config.js_ file, relative to the current working directory (**v3**).
|
|
9
8
|
*
|
|
10
9
|
* @see [better-tailwindcss: `tailwindConfig` option](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#tailwindconfig)
|
|
11
|
-
|
|
10
|
+
*/
|
|
12
11
|
config?: string;
|
|
13
12
|
/**
|
|
14
13
|
* Current working directory used to resolve TailwindCSS and related config files in monorepos.
|
|
@@ -18,13 +17,13 @@ interface BaseTailwindOptions extends ConfigWithOverrides<ConfigRules> {
|
|
|
18
17
|
* @default undefined
|
|
19
18
|
*
|
|
20
19
|
* @see [better-tailwindcss: `cwd` option](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#cwd)
|
|
21
|
-
|
|
20
|
+
*/
|
|
22
21
|
cwd?: string;
|
|
23
22
|
/**
|
|
24
23
|
* Path to the CSS-based Tailwind config file, relative to the current working directory (**only v4**).
|
|
25
24
|
*
|
|
26
25
|
* @see [better-tailwindcss: `entryPoint` option](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#entrypoint)
|
|
27
|
-
|
|
26
|
+
*/
|
|
28
27
|
entryPoint?: string;
|
|
29
28
|
/**
|
|
30
29
|
* Regex patterns of unregistered class names that should be ignored.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PluginRules, RuleOptions } from "../eslintRules.mjs";
|
|
2
2
|
import { ConfigWithOverrides } from "../index.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/types/options/test.d.ts
|
|
5
4
|
type StorybookConfigRules = PluginRules<'storybook'>;
|
|
6
5
|
type VitestConfigRules = PluginRules<'vitest'>;
|
|
@@ -35,7 +34,7 @@ interface TestOptions {
|
|
|
35
34
|
* Use [eslint-plugin-playwright](https://github.com/playwright-community/eslint-plugin-playwright) to enforce best practices and code styles for Playwright tests.
|
|
36
35
|
*
|
|
37
36
|
* @default false // `true` if "@playwright/test" is detected in the dependencies when `autoDetectDeps` is enabled
|
|
38
|
-
|
|
37
|
+
*/
|
|
39
38
|
playwright?: boolean | ConfigWithOverrides<PlaywrightConfigRules>;
|
|
40
39
|
/**
|
|
41
40
|
* Use [eslint-plugin-storybook](https://github.com/storybookjs/eslint-plugin-storybook) to enforce best practices and code styles for Storybook stories and tests.
|
|
@@ -47,7 +46,7 @@ interface TestOptions {
|
|
|
47
46
|
* Use [@vitest/eslint-plugin](https://github.com/vitest-dev/eslint-plugin-vitest) to enforce best practices and code styles for Vitest tests.
|
|
48
47
|
*
|
|
49
48
|
* @default false // `true` if "vitest" is detected in the dependencies when `autoDetectDeps` is enabled
|
|
50
|
-
|
|
49
|
+
*/
|
|
51
50
|
vitest?: boolean | ConfigWithOverrides<VitestConfigRules>;
|
|
52
51
|
}
|
|
53
52
|
//#endregion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PluginRules, RuleOptions } from "../eslintRules.mjs";
|
|
2
2
|
import { ConfigWithOverrides } from "../index.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/types/options/typescript.d.ts
|
|
5
4
|
type ConfigRules = PluginRules<'@typescript-eslint'>;
|
|
6
5
|
interface TypeScriptOptions extends ConfigWithOverrides<ConfigRules> {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PluginRules, RuleOptions } from "../eslintRules.mjs";
|
|
2
2
|
import { ConfigWithOverrides } from "../index.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/types/options/vue.d.ts
|
|
5
4
|
type AnchorHasContentRuleOptions = RuleOptions<'vuejs-accessibility/anchor-has-content'>;
|
|
6
5
|
interface BlockLang {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shayanthenerd/eslint-config",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.2",
|
|
4
4
|
"description": "A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -49,30 +49,30 @@
|
|
|
49
49
|
"{**/*.ts,package.json}": "pnpm lint"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@eslint-react/eslint-plugin": "5.
|
|
52
|
+
"@eslint-react/eslint-plugin": "5.14.10",
|
|
53
53
|
"@eslint/css": "1.4.0",
|
|
54
54
|
"@eslint/markdown": "8.0.3",
|
|
55
|
-
"@html-eslint/eslint-plugin": "0.
|
|
56
|
-
"@html-eslint/eslint-plugin-react": "0.
|
|
55
|
+
"@html-eslint/eslint-plugin": "0.64.0",
|
|
56
|
+
"@html-eslint/eslint-plugin-react": "0.64.0",
|
|
57
57
|
"@next/eslint-plugin-next": "16.2.10",
|
|
58
58
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
59
|
-
"@vitest/eslint-plugin": "1.6.
|
|
60
|
-
"astro-eslint-parser": "
|
|
59
|
+
"@vitest/eslint-plugin": "1.6.23",
|
|
60
|
+
"astro-eslint-parser": "3.0.0",
|
|
61
61
|
"defu": "6.1.7",
|
|
62
62
|
"eslint-flat-config-utils": "3.2.0",
|
|
63
63
|
"eslint-import-resolver-typescript": "4.4.5",
|
|
64
|
-
"eslint-plugin-astro": "
|
|
64
|
+
"eslint-plugin-astro": "3.0.0",
|
|
65
65
|
"eslint-plugin-baseline-js": "0.7.0",
|
|
66
66
|
"eslint-plugin-better-tailwindcss": "4.6.1",
|
|
67
|
-
"eslint-plugin-cypress": "6.4.
|
|
67
|
+
"eslint-plugin-cypress": "6.4.3",
|
|
68
68
|
"eslint-plugin-import-x": "4.17.1",
|
|
69
69
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
70
|
-
"eslint-plugin-n": "18.2.
|
|
71
|
-
"eslint-plugin-package-json": "1.
|
|
70
|
+
"eslint-plugin-n": "18.2.2",
|
|
71
|
+
"eslint-plugin-package-json": "1.6.0",
|
|
72
72
|
"eslint-plugin-perfectionist": "5.10.0",
|
|
73
73
|
"eslint-plugin-playwright": "2.10.5",
|
|
74
74
|
"eslint-plugin-promise": "7.3.0",
|
|
75
|
-
"eslint-plugin-storybook": "10.
|
|
75
|
+
"eslint-plugin-storybook": "10.5.0",
|
|
76
76
|
"eslint-plugin-unicorn": "71.1.0",
|
|
77
77
|
"eslint-plugin-vue": "10.9.2",
|
|
78
78
|
"eslint-plugin-vuejs-accessibility": "2.5.0",
|
|
@@ -81,23 +81,23 @@
|
|
|
81
81
|
"globals": "17.7.0",
|
|
82
82
|
"local-pkg": "1.2.1",
|
|
83
83
|
"tailwind-csstree": "0.3.3",
|
|
84
|
-
"typescript-eslint": "8.
|
|
84
|
+
"typescript-eslint": "8.64.0"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@arethetypeswrong/cli": "0.18.
|
|
88
|
-
"@eslint/config-inspector": "3.0
|
|
87
|
+
"@arethetypeswrong/cli": "0.18.5",
|
|
88
|
+
"@eslint/config-inspector": "3.1.0",
|
|
89
89
|
"@types/eslint-plugin-jsx-a11y": "6.10.1",
|
|
90
90
|
"@types/node": "26.1.1",
|
|
91
91
|
"actions-up": "1.16.0",
|
|
92
|
-
"eslint": "10.
|
|
92
|
+
"eslint": "10.7.0",
|
|
93
93
|
"eslint-typegen": "2.3.1",
|
|
94
94
|
"nano-staged": "1.0.2",
|
|
95
|
-
"prettier": "3.9.
|
|
95
|
+
"prettier": "3.9.5",
|
|
96
96
|
"publint": "0.3.21",
|
|
97
97
|
"serve": "14.2.6",
|
|
98
98
|
"simple-git-hooks": "2.13.1",
|
|
99
99
|
"ts-morph": "28.0.0",
|
|
100
|
-
"tsdown": "0.22.
|
|
100
|
+
"tsdown": "0.22.7",
|
|
101
101
|
"typescript": "6.0.3",
|
|
102
102
|
"unplugin-unused": "0.5.7"
|
|
103
103
|
},
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"devEngines": {
|
|
111
111
|
"packageManager": {
|
|
112
112
|
"name": "pnpm",
|
|
113
|
-
"version": "11.
|
|
113
|
+
"version": "11.13.0",
|
|
114
114
|
"onFail": "warn"
|
|
115
115
|
},
|
|
116
116
|
"runtime": {
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"scripts": {
|
|
126
126
|
"git:gitmessage": "git config --local commit.template '.gitmessage'",
|
|
127
127
|
"update:actions": "actions-up --yes",
|
|
128
|
-
"update:deps": "pnpm update --latest
|
|
128
|
+
"update:deps": "pnpm update --latest && pnpm dedupe && pnpm generate:types && pnpm generate:docs",
|
|
129
129
|
"check:spell": "pnpx cspell . --gitignore --exclude='pnpm-lock.yaml' --cache --cache-location='./node_modules/.cache/.cspellcache'",
|
|
130
130
|
"inspect": "pnpm build:package && eslint-config-inspector",
|
|
131
131
|
"build:inspector": "eslint-config-inspector build --config=./scripts/configs/eslint.config.reference.ts --outDir=./netlify/eslint-config-inspector",
|