@shayanthenerd/eslint-config 0.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.
Files changed (128) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +496 -0
  3. package/dist/_virtual/rolldown_runtime.cjs +30 -0
  4. package/dist/configs/base.cjs +44 -0
  5. package/dist/configs/base.js +43 -0
  6. package/dist/configs/commons.cjs +26 -0
  7. package/dist/configs/commons.js +25 -0
  8. package/dist/configs/css.cjs +29 -0
  9. package/dist/configs/css.js +28 -0
  10. package/dist/configs/cypress.cjs +23 -0
  11. package/dist/configs/cypress.js +22 -0
  12. package/dist/configs/html.cjs +23 -0
  13. package/dist/configs/html.js +22 -0
  14. package/dist/configs/importX.cjs +26 -0
  15. package/dist/configs/importX.js +25 -0
  16. package/dist/configs/nuxtMultiRootTemplate.cjs +14 -0
  17. package/dist/configs/nuxtMultiRootTemplate.js +14 -0
  18. package/dist/configs/oxlintOverrides.cjs +49 -0
  19. package/dist/configs/oxlintOverrides.js +48 -0
  20. package/dist/configs/perfectionist.cjs +24 -0
  21. package/dist/configs/perfectionist.js +23 -0
  22. package/dist/configs/playwright.cjs +23 -0
  23. package/dist/configs/playwright.js +22 -0
  24. package/dist/configs/storybook.cjs +24 -0
  25. package/dist/configs/storybook.js +23 -0
  26. package/dist/configs/stylistic.cjs +23 -0
  27. package/dist/configs/stylistic.js +22 -0
  28. package/dist/configs/tailwind.cjs +43 -0
  29. package/dist/configs/tailwind.js +42 -0
  30. package/dist/configs/typescript.cjs +31 -0
  31. package/dist/configs/typescript.js +30 -0
  32. package/dist/configs/vitest.cjs +23 -0
  33. package/dist/configs/vitest.js +22 -0
  34. package/dist/configs/vue.cjs +35 -0
  35. package/dist/configs/vue.js +34 -0
  36. package/dist/configs/vueComponentNames.cjs +19 -0
  37. package/dist/configs/vueComponentNames.js +19 -0
  38. package/dist/index.cjs +55 -0
  39. package/dist/index.d.cts +16 -0
  40. package/dist/index.d.ts +16 -0
  41. package/dist/index.js +54 -0
  42. package/dist/oxlint.config.jsonc +192 -0
  43. package/dist/prettier.config.js +42 -0
  44. package/dist/rules/css.cjs +65 -0
  45. package/dist/rules/css.js +65 -0
  46. package/dist/rules/cypress.cjs +16 -0
  47. package/dist/rules/cypress.js +15 -0
  48. package/dist/rules/html.cjs +53 -0
  49. package/dist/rules/html.js +53 -0
  50. package/dist/rules/importX.cjs +51 -0
  51. package/dist/rules/importX.js +50 -0
  52. package/dist/rules/javascript.cjs +164 -0
  53. package/dist/rules/javascript.js +163 -0
  54. package/dist/rules/perfectionist.cjs +73 -0
  55. package/dist/rules/perfectionist.js +73 -0
  56. package/dist/rules/playwright.cjs +28 -0
  57. package/dist/rules/playwright.js +27 -0
  58. package/dist/rules/storybook.cjs +16 -0
  59. package/dist/rules/storybook.js +15 -0
  60. package/dist/rules/stylistic.cjs +160 -0
  61. package/dist/rules/stylistic.js +160 -0
  62. package/dist/rules/tailwind.cjs +36 -0
  63. package/dist/rules/tailwind.js +36 -0
  64. package/dist/rules/typescript.cjs +62 -0
  65. package/dist/rules/typescript.js +62 -0
  66. package/dist/rules/vitest.cjs +47 -0
  67. package/dist/rules/vitest.js +46 -0
  68. package/dist/rules/vue.cjs +169 -0
  69. package/dist/rules/vue.js +169 -0
  70. package/dist/rules/vueAccessibility.cjs +23 -0
  71. package/dist/rules/vueAccessibility.js +23 -0
  72. package/dist/types/configOptions/base.d.cts +47 -0
  73. package/dist/types/configOptions/base.d.ts +47 -0
  74. package/dist/types/configOptions/css.d.cts +27 -0
  75. package/dist/types/configOptions/css.d.ts +27 -0
  76. package/dist/types/configOptions/html.d.cts +27 -0
  77. package/dist/types/configOptions/html.d.ts +27 -0
  78. package/dist/types/configOptions/importX.d.cts +20 -0
  79. package/dist/types/configOptions/importX.d.ts +20 -0
  80. package/dist/types/configOptions/nuxt.d.cts +42 -0
  81. package/dist/types/configOptions/nuxt.d.ts +42 -0
  82. package/dist/types/configOptions/perfectionist.d.cts +16 -0
  83. package/dist/types/configOptions/perfectionist.d.ts +16 -0
  84. package/dist/types/configOptions/stylistic.d.cts +145 -0
  85. package/dist/types/configOptions/stylistic.d.ts +145 -0
  86. package/dist/types/configOptions/tailwind.d.cts +46 -0
  87. package/dist/types/configOptions/tailwind.d.ts +46 -0
  88. package/dist/types/configOptions/test.d.cts +55 -0
  89. package/dist/types/configOptions/test.d.ts +55 -0
  90. package/dist/types/configOptions/typescript.d.cts +36 -0
  91. package/dist/types/configOptions/typescript.d.ts +36 -0
  92. package/dist/types/configOptions/vue.d.cts +211 -0
  93. package/dist/types/configOptions/vue.d.ts +211 -0
  94. package/dist/types/configOptions/vueAccessibility.d.cts +34 -0
  95. package/dist/types/configOptions/vueAccessibility.d.ts +34 -0
  96. package/dist/types/eslint-schema.d.cts +13258 -0
  97. package/dist/types/eslint-schema.d.ts +13258 -0
  98. package/dist/types/eslintRules.d.cts +12 -0
  99. package/dist/types/eslintRules.d.ts +12 -0
  100. package/dist/types/helpers.d.cts +5 -0
  101. package/dist/types/helpers.d.ts +5 -0
  102. package/dist/types/index.d.cts +360 -0
  103. package/dist/types/index.d.ts +360 -0
  104. package/dist/utils/globs.cjs +31 -0
  105. package/dist/utils/globs.js +30 -0
  106. package/dist/utils/ignores/defaultIgnorePatterns.cjs +58 -0
  107. package/dist/utils/ignores/defaultIgnorePatterns.js +57 -0
  108. package/dist/utils/ignores/getIgnorePatterns.cjs +16 -0
  109. package/dist/utils/ignores/getIgnorePatterns.js +16 -0
  110. package/dist/utils/ignores/resolveGitignorePatterns.cjs +27 -0
  111. package/dist/utils/ignores/resolveGitignorePatterns.js +26 -0
  112. package/dist/utils/isEmptyString.cjs +8 -0
  113. package/dist/utils/isEmptyString.js +7 -0
  114. package/dist/utils/isEnabled.cjs +8 -0
  115. package/dist/utils/isEnabled.js +7 -0
  116. package/dist/utils/isPackageDetected.cjs +22 -0
  117. package/dist/utils/isPackageDetected.js +20 -0
  118. package/dist/utils/options/defaultOptions.cjs +168 -0
  119. package/dist/utils/options/defaultOptions.js +167 -0
  120. package/dist/utils/options/enableDetectedConfigs.cjs +36 -0
  121. package/dist/utils/options/enableDetectedConfigs.js +36 -0
  122. package/dist/utils/options/mergeWithDefaults.cjs +22 -0
  123. package/dist/utils/options/mergeWithDefaults.js +21 -0
  124. package/dist/utils/vue/getRestrictedVueElements.cjs +28 -0
  125. package/dist/utils/vue/getRestrictedVueElements.js +27 -0
  126. package/dist/utils/vue/getRestrictedVueInputs.cjs +24 -0
  127. package/dist/utils/vue/getRestrictedVueInputs.js +23 -0
  128. package/package.json +130 -0
@@ -0,0 +1,145 @@
1
+ import { RuleOptions } from "../eslintRules.cjs";
2
+ import { ConfigWithOverrides } from "../index.cjs";
3
+
4
+ //#region src/types/configOptions/stylistic.d.ts
5
+ interface StylisticOptions extends ConfigWithOverrides {
6
+ /**
7
+ * Add semicolons at the end of statements.
8
+ *
9
+ * @default 'always'
10
+ *
11
+ * @see [@stylistic/semi](https://eslint.style/rules/semi)
12
+ */
13
+ semi?: RuleOptions<'@stylistic/semi'>;
14
+
15
+ /**
16
+ * Add trailing commas to object and array literals.
17
+ *
18
+ * This is also used by
19
+ * [@stylistic/member-delimiter-style: `delimiter` option](https://eslint.style/rules/member-delimiter-style#delimiter)
20
+ * to add a trailing delimiter to the last item in multi-line interfaces and type aliases.
21
+ *
22
+ * @default 'always-multiline'
23
+ *
24
+ * @see [@stylistic/comma-dangle](https://eslint.style/rules/comma-dangle)
25
+ */
26
+ trailingComma?: Exclude<RuleOptions<'@stylistic/comma-dangle'>, object>;
27
+
28
+ /**
29
+ * Enforce a consistent delimiter style in interfaces and type aliases.
30
+ *
31
+ * @default 'comma'
32
+ *
33
+ * @see [@stylistic/member-delimiter-style: `delimiter` option](https://eslint.style/rules/member-delimiter-style#delimiter)
34
+ */
35
+ memberDelimiterStyle?: RuleOptions<'@stylistic/member-delimiter-style'>['singleline']['delimiter'];
36
+
37
+ /**
38
+ * The style of quotes to use for strings.
39
+ *
40
+ * @default 'single'
41
+ *
42
+ * @see [@stylistic/quotes](https://eslint.style/rules/quotes)
43
+ */
44
+ quotes?: RuleOptions<'@stylistic/quotes'>;
45
+
46
+ /**
47
+ * The style of quotes to use for JSX attributes.
48
+ *
49
+ * @default 'prefer-double'
50
+ *
51
+ * @see [@stylistic/jsx-quotes](https://eslint.style/rules/jsx-quotes)
52
+ */
53
+ jsxQuotes?: RuleOptions<'@stylistic/jsx-quotes'>;
54
+
55
+ /**
56
+ * Add parentheses around arrow function parameters.
57
+ *
58
+ * @default 'always'
59
+ *
60
+ * @see [@stylistic/arrow-parens](https://eslint.style/rules/arrow-parens)
61
+ */
62
+ arrowParens?: RuleOptions<'@stylistic/arrow-parens'>;
63
+
64
+ /**
65
+ * Use tabs for indentation.
66
+ *
67
+ * This is used by
68
+ * - [vue/html-indent](https://eslint.vuejs.org/rules/html-indent)
69
+ * - [@html-eslint/indent](https://html-eslint.org/docs/rules/indent)
70
+ * - [@stylistic/indent](https://eslint.style/rules/indent)
71
+ * - [@stylistic/no-tabs](https://eslint.style/rules/no-tabs)
72
+ * - [@stylistic/indent-binary-ops](https://eslint.style/rules/indent-binary-ops)
73
+ * - [better-tailwindcss/enforce-consistent-line-wrapping](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-line-wrapping.md)
74
+ *
75
+ * @default true
76
+ */
77
+ useTabs?: boolean;
78
+
79
+ /**
80
+ * The number of space characters used for indentation.
81
+ *
82
+ * If `stylistic.useTabs` is `true`, this determines the number of space characters that each tab indentation consists of.
83
+ *
84
+ * This is used by
85
+ * - [vue/max-len](https://eslint.vuejs.org/rules/max-len)
86
+ * - [vue/html-indent](https://eslint.vuejs.org/rules/html-indent)
87
+ * - [vue/html-comment-indent](https://eslint.vuejs.org/rules/html-comment-indent.html)
88
+ * - [@stylistic/indent](https://eslint.style/rules/indent)
89
+ * - [@stylistic/max-len](https://eslint.style/rules/max-len)
90
+ * - [@stylistic/indent-binary-ops](https://eslint.style/rules/indent-binary-ops)
91
+ * - [perfectionist/sort-imports: `maxLineLength` option](https://perfectionist.dev/rules/sort-imports#maxlinelength)
92
+ * - [better-tailwindcss/enforce-consistent-line-wrapping: `indent` option](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-line-wrapping.md)
93
+ *
94
+ * @default 2
95
+ */
96
+ indent?: number;
97
+
98
+ /**
99
+ * Maximum number of consecutive empty lines.
100
+ *
101
+ * This is used by
102
+ * - [vue/block-tag-newline: `maxEmptyLines` option](https://eslint.vuejs.org/rules/block-tag-newline#options)
103
+ * - [@html-eslint/no-multiple-empty-lines: `max` option](https://html-eslint.org/docs/rules/no-multiple-empty-lines)
104
+ *
105
+ * @default 1
106
+ */
107
+ maxConsecutiveEmptyLines?: RuleOptions<'@stylistic/no-multiple-empty-lines'>['max'];
108
+
109
+ /**
110
+ * Maximum line length for the code. Strings, texts, and comments are ignored.
111
+ *
112
+ * This is used by
113
+ * - [vue/max-len](https://eslint.vuejs.org/rules/max-len)
114
+ * - [@stylistic/max-len](https://eslint.style/rules/max-len)
115
+ * - [perfectionist/sort-imports: `maxLineLength` option](https://perfectionist.dev/rules/sort-imports#maxlinelength)
116
+ * - [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)
117
+ *
118
+ * @default 120
119
+ */
120
+ maxLineLength?: number;
121
+
122
+ /**
123
+ * Maximum number of HTML attributes per line.
124
+ *
125
+ * This is used by
126
+ * - [vue/max-attributes-per-line: `singleline.max` option](https://eslint.vuejs.org/rules/max-attributes-per-line)
127
+ * - [@html-eslint/attrs-newline: `ifAttrsMoreThan` option](https://html-eslint.dev/rules/attrs-newline)
128
+ *
129
+ * @default 3
130
+ */
131
+ maxAttributesPerLine?: number;
132
+
133
+ /**
134
+ * Require void HTML elements to be self-closing.
135
+ *
136
+ * This is used by
137
+ * - [vue/html-self-closing: `html.void` option](https://eslint.vuejs.org/rules/html-self-closing.html#options)
138
+ * - [@html-eslint/require-closing-tags: `selfClosing` option](https://html-eslint.org/docs/rules/require-closing-tags#options)
139
+ *
140
+ * @default 'always'
141
+ */
142
+ selfCloseVoidHTMLElements?: 'never' | 'always';
143
+ }
144
+ //#endregion
145
+ export { type StylisticOptions };
@@ -0,0 +1,145 @@
1
+ import { RuleOptions } from "../eslintRules.js";
2
+ import { ConfigWithOverrides } from "../index.js";
3
+
4
+ //#region src/types/configOptions/stylistic.d.ts
5
+ interface StylisticOptions extends ConfigWithOverrides {
6
+ /**
7
+ * Add semicolons at the end of statements.
8
+ *
9
+ * @default 'always'
10
+ *
11
+ * @see [@stylistic/semi](https://eslint.style/rules/semi)
12
+ */
13
+ semi?: RuleOptions<'@stylistic/semi'>;
14
+
15
+ /**
16
+ * Add trailing commas to object and array literals.
17
+ *
18
+ * This is also used by
19
+ * [@stylistic/member-delimiter-style: `delimiter` option](https://eslint.style/rules/member-delimiter-style#delimiter)
20
+ * to add a trailing delimiter to the last item in multi-line interfaces and type aliases.
21
+ *
22
+ * @default 'always-multiline'
23
+ *
24
+ * @see [@stylistic/comma-dangle](https://eslint.style/rules/comma-dangle)
25
+ */
26
+ trailingComma?: Exclude<RuleOptions<'@stylistic/comma-dangle'>, object>;
27
+
28
+ /**
29
+ * Enforce a consistent delimiter style in interfaces and type aliases.
30
+ *
31
+ * @default 'comma'
32
+ *
33
+ * @see [@stylistic/member-delimiter-style: `delimiter` option](https://eslint.style/rules/member-delimiter-style#delimiter)
34
+ */
35
+ memberDelimiterStyle?: RuleOptions<'@stylistic/member-delimiter-style'>['singleline']['delimiter'];
36
+
37
+ /**
38
+ * The style of quotes to use for strings.
39
+ *
40
+ * @default 'single'
41
+ *
42
+ * @see [@stylistic/quotes](https://eslint.style/rules/quotes)
43
+ */
44
+ quotes?: RuleOptions<'@stylistic/quotes'>;
45
+
46
+ /**
47
+ * The style of quotes to use for JSX attributes.
48
+ *
49
+ * @default 'prefer-double'
50
+ *
51
+ * @see [@stylistic/jsx-quotes](https://eslint.style/rules/jsx-quotes)
52
+ */
53
+ jsxQuotes?: RuleOptions<'@stylistic/jsx-quotes'>;
54
+
55
+ /**
56
+ * Add parentheses around arrow function parameters.
57
+ *
58
+ * @default 'always'
59
+ *
60
+ * @see [@stylistic/arrow-parens](https://eslint.style/rules/arrow-parens)
61
+ */
62
+ arrowParens?: RuleOptions<'@stylistic/arrow-parens'>;
63
+
64
+ /**
65
+ * Use tabs for indentation.
66
+ *
67
+ * This is used by
68
+ * - [vue/html-indent](https://eslint.vuejs.org/rules/html-indent)
69
+ * - [@html-eslint/indent](https://html-eslint.org/docs/rules/indent)
70
+ * - [@stylistic/indent](https://eslint.style/rules/indent)
71
+ * - [@stylistic/no-tabs](https://eslint.style/rules/no-tabs)
72
+ * - [@stylistic/indent-binary-ops](https://eslint.style/rules/indent-binary-ops)
73
+ * - [better-tailwindcss/enforce-consistent-line-wrapping](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-line-wrapping.md)
74
+ *
75
+ * @default true
76
+ */
77
+ useTabs?: boolean;
78
+
79
+ /**
80
+ * The number of space characters used for indentation.
81
+ *
82
+ * If `stylistic.useTabs` is `true`, this determines the number of space characters that each tab indentation consists of.
83
+ *
84
+ * This is used by
85
+ * - [vue/max-len](https://eslint.vuejs.org/rules/max-len)
86
+ * - [vue/html-indent](https://eslint.vuejs.org/rules/html-indent)
87
+ * - [vue/html-comment-indent](https://eslint.vuejs.org/rules/html-comment-indent.html)
88
+ * - [@stylistic/indent](https://eslint.style/rules/indent)
89
+ * - [@stylistic/max-len](https://eslint.style/rules/max-len)
90
+ * - [@stylistic/indent-binary-ops](https://eslint.style/rules/indent-binary-ops)
91
+ * - [perfectionist/sort-imports: `maxLineLength` option](https://perfectionist.dev/rules/sort-imports#maxlinelength)
92
+ * - [better-tailwindcss/enforce-consistent-line-wrapping: `indent` option](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-line-wrapping.md)
93
+ *
94
+ * @default 2
95
+ */
96
+ indent?: number;
97
+
98
+ /**
99
+ * Maximum number of consecutive empty lines.
100
+ *
101
+ * This is used by
102
+ * - [vue/block-tag-newline: `maxEmptyLines` option](https://eslint.vuejs.org/rules/block-tag-newline#options)
103
+ * - [@html-eslint/no-multiple-empty-lines: `max` option](https://html-eslint.org/docs/rules/no-multiple-empty-lines)
104
+ *
105
+ * @default 1
106
+ */
107
+ maxConsecutiveEmptyLines?: RuleOptions<'@stylistic/no-multiple-empty-lines'>['max'];
108
+
109
+ /**
110
+ * Maximum line length for the code. Strings, texts, and comments are ignored.
111
+ *
112
+ * This is used by
113
+ * - [vue/max-len](https://eslint.vuejs.org/rules/max-len)
114
+ * - [@stylistic/max-len](https://eslint.style/rules/max-len)
115
+ * - [perfectionist/sort-imports: `maxLineLength` option](https://perfectionist.dev/rules/sort-imports#maxlinelength)
116
+ * - [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)
117
+ *
118
+ * @default 120
119
+ */
120
+ maxLineLength?: number;
121
+
122
+ /**
123
+ * Maximum number of HTML attributes per line.
124
+ *
125
+ * This is used by
126
+ * - [vue/max-attributes-per-line: `singleline.max` option](https://eslint.vuejs.org/rules/max-attributes-per-line)
127
+ * - [@html-eslint/attrs-newline: `ifAttrsMoreThan` option](https://html-eslint.dev/rules/attrs-newline)
128
+ *
129
+ * @default 3
130
+ */
131
+ maxAttributesPerLine?: number;
132
+
133
+ /**
134
+ * Require void HTML elements to be self-closing.
135
+ *
136
+ * This is used by
137
+ * - [vue/html-self-closing: `html.void` option](https://eslint.vuejs.org/rules/html-self-closing.html#options)
138
+ * - [@html-eslint/require-closing-tags: `selfClosing` option](https://html-eslint.org/docs/rules/require-closing-tags#options)
139
+ *
140
+ * @default 'always'
141
+ */
142
+ selfCloseVoidHTMLElements?: 'never' | 'always';
143
+ }
144
+ //#endregion
145
+ export { type StylisticOptions };
@@ -0,0 +1,46 @@
1
+ import { RuleOptions } from "../eslintRules.cjs";
2
+ import { ConfigWithOverrides } from "../index.cjs";
3
+
4
+ //#region src/types/configOptions/tailwind.d.ts
5
+ interface BaseTailwindOptions extends ConfigWithOverrides {
6
+ /** Path to the _tailwind.config.js_ file, relative to the current working directory (**v3**).
7
+ *
8
+ * @see [better-tailwindcss: `tailwindConfig` option](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#tailwindconfig)
9
+ */
10
+ config?: string;
11
+
12
+ /** Path to the CSS-based Tailwind config file, relative to the current working directory (**only v4**).
13
+ *
14
+ * @see [better-tailwindcss: `entryPoint` option](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#entrypoint)
15
+ */
16
+ entryPoint?: string;
17
+
18
+ /**
19
+ * Enforce breaking Tailwind classes into multiple lines if they exceed the line length defined by `stylistic.maxLineLength`.
20
+ *
21
+ * @default true
22
+ *
23
+ * @see [better-tailwindcss/enforce-consistent-line-wrapping](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-line-wrapping.md)
24
+ */
25
+ multilineSort?: boolean;
26
+
27
+ /**
28
+ * Regex patterns of unregistered class names that should be ignored.
29
+ *
30
+ * [Component classes](https://tailwindcss.com/docs/adding-custom-styles#adding-component-classes) are detected automatically and don't need to be ignored.
31
+ *
32
+ * @default []
33
+ *
34
+ * @see [better-tailwindcss/no-unregistered-classes: `ignore` option](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unregistered-classes.md#ignore)
35
+ */
36
+ ignoredUnregisteredClasses?: RuleOptions<'better-tailwindcss/no-unregistered-classes'>['ignore'];
37
+ }
38
+ interface EntryPointRequired {
39
+ entryPoint: string;
40
+ }
41
+ interface ConfigRequired {
42
+ config: string;
43
+ }
44
+ type TailwindOptions = BaseTailwindOptions & (ConfigRequired | EntryPointRequired);
45
+ //#endregion
46
+ export { type TailwindOptions };
@@ -0,0 +1,46 @@
1
+ import { RuleOptions } from "../eslintRules.js";
2
+ import { ConfigWithOverrides } from "../index.js";
3
+
4
+ //#region src/types/configOptions/tailwind.d.ts
5
+ interface BaseTailwindOptions extends ConfigWithOverrides {
6
+ /** Path to the _tailwind.config.js_ file, relative to the current working directory (**v3**).
7
+ *
8
+ * @see [better-tailwindcss: `tailwindConfig` option](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#tailwindconfig)
9
+ */
10
+ config?: string;
11
+
12
+ /** Path to the CSS-based Tailwind config file, relative to the current working directory (**only v4**).
13
+ *
14
+ * @see [better-tailwindcss: `entryPoint` option](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#entrypoint)
15
+ */
16
+ entryPoint?: string;
17
+
18
+ /**
19
+ * Enforce breaking Tailwind classes into multiple lines if they exceed the line length defined by `stylistic.maxLineLength`.
20
+ *
21
+ * @default true
22
+ *
23
+ * @see [better-tailwindcss/enforce-consistent-line-wrapping](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-line-wrapping.md)
24
+ */
25
+ multilineSort?: boolean;
26
+
27
+ /**
28
+ * Regex patterns of unregistered class names that should be ignored.
29
+ *
30
+ * [Component classes](https://tailwindcss.com/docs/adding-custom-styles#adding-component-classes) are detected automatically and don't need to be ignored.
31
+ *
32
+ * @default []
33
+ *
34
+ * @see [better-tailwindcss/no-unregistered-classes: `ignore` option](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unregistered-classes.md#ignore)
35
+ */
36
+ ignoredUnregisteredClasses?: RuleOptions<'better-tailwindcss/no-unregistered-classes'>['ignore'];
37
+ }
38
+ interface EntryPointRequired {
39
+ entryPoint: string;
40
+ }
41
+ interface ConfigRequired {
42
+ config: string;
43
+ }
44
+ type TailwindOptions = BaseTailwindOptions & (ConfigRequired | EntryPointRequired);
45
+ //#endregion
46
+ export { type TailwindOptions };
@@ -0,0 +1,55 @@
1
+ import { RuleOptions } from "../eslintRules.cjs";
2
+ import { ConfigWithOverrides } from "../index.cjs";
3
+
4
+ //#region src/types/configOptions/test.d.ts
5
+ interface TestOptions {
6
+ /**
7
+ * Use [eslint-plugin-storybook](https://github.com/storybookjs/eslint-plugin-storybook) to enforce best practices and code styles for Storybook stories and tests.
8
+ *
9
+ * @default false // `true` if "storybook" is detected in the package.json file when `autoDetectDeps` is enabled
10
+ */
11
+ storybook?: boolean | ConfigWithOverrides;
12
+
13
+ /**
14
+ * Use [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest) to enforce best practices and code styles for Vitest tests.
15
+ *
16
+ * @default false // `true` if "vitest" is detected in the package.json file when `autoDetectDeps` is enabled
17
+ */
18
+ vitest?: boolean | ConfigWithOverrides;
19
+
20
+ /**
21
+ * Use [eslint-plugin-playwright](https://github.com/playwright-community/eslint-plugin-playwright) to enforce best practices and code styles for Playwright tests.
22
+ *
23
+ * @default false // `true` if "@playwright/test" is detected in the package.json file when `autoDetectDeps` is enabled
24
+ */
25
+ playwright?: boolean | ConfigWithOverrides;
26
+
27
+ /**
28
+ * Use [eslint-plugin-cypress](https://github.com/cypress-io/eslint-plugin-cypress) to enforce best practices and code styles for Cypress tests.
29
+ *
30
+ * @default false // `true` if "cypress" is detected in the package.json file when `autoDetectDeps` is enabled
31
+ */
32
+ cypress?: boolean | ConfigWithOverrides;
33
+
34
+ /**
35
+ * Enforce the consistent use of either `test` or `it` as the test function.
36
+ *
37
+ * @default 'test'
38
+ *
39
+ * @see [vitest/consistent-test-it](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-it.md)
40
+ */
41
+ testFunction?: RuleOptions<'vitest/consistent-test-it'>['fn'];
42
+
43
+ /**
44
+ * Enforce a maximum depth for nested `describe` calls to increase code clarity.
45
+ *
46
+ * This is used by
47
+ * - [vitest/max-nested-describe](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-nested-describe.md)
48
+ * - [playwright/max-nested-describe](https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/max-nested-describe.md)
49
+ *
50
+ * @default 1
51
+ */
52
+ maxNestedDescribe?: RuleOptions<'vitest/max-nested-describe'>['max'];
53
+ }
54
+ //#endregion
55
+ export { type TestOptions };
@@ -0,0 +1,55 @@
1
+ import { RuleOptions } from "../eslintRules.js";
2
+ import { ConfigWithOverrides } from "../index.js";
3
+
4
+ //#region src/types/configOptions/test.d.ts
5
+ interface TestOptions {
6
+ /**
7
+ * Use [eslint-plugin-storybook](https://github.com/storybookjs/eslint-plugin-storybook) to enforce best practices and code styles for Storybook stories and tests.
8
+ *
9
+ * @default false // `true` if "storybook" is detected in the package.json file when `autoDetectDeps` is enabled
10
+ */
11
+ storybook?: boolean | ConfigWithOverrides;
12
+
13
+ /**
14
+ * Use [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest) to enforce best practices and code styles for Vitest tests.
15
+ *
16
+ * @default false // `true` if "vitest" is detected in the package.json file when `autoDetectDeps` is enabled
17
+ */
18
+ vitest?: boolean | ConfigWithOverrides;
19
+
20
+ /**
21
+ * Use [eslint-plugin-playwright](https://github.com/playwright-community/eslint-plugin-playwright) to enforce best practices and code styles for Playwright tests.
22
+ *
23
+ * @default false // `true` if "@playwright/test" is detected in the package.json file when `autoDetectDeps` is enabled
24
+ */
25
+ playwright?: boolean | ConfigWithOverrides;
26
+
27
+ /**
28
+ * Use [eslint-plugin-cypress](https://github.com/cypress-io/eslint-plugin-cypress) to enforce best practices and code styles for Cypress tests.
29
+ *
30
+ * @default false // `true` if "cypress" is detected in the package.json file when `autoDetectDeps` is enabled
31
+ */
32
+ cypress?: boolean | ConfigWithOverrides;
33
+
34
+ /**
35
+ * Enforce the consistent use of either `test` or `it` as the test function.
36
+ *
37
+ * @default 'test'
38
+ *
39
+ * @see [vitest/consistent-test-it](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-it.md)
40
+ */
41
+ testFunction?: RuleOptions<'vitest/consistent-test-it'>['fn'];
42
+
43
+ /**
44
+ * Enforce a maximum depth for nested `describe` calls to increase code clarity.
45
+ *
46
+ * This is used by
47
+ * - [vitest/max-nested-describe](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-nested-describe.md)
48
+ * - [playwright/max-nested-describe](https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/max-nested-describe.md)
49
+ *
50
+ * @default 1
51
+ */
52
+ maxNestedDescribe?: RuleOptions<'vitest/max-nested-describe'>['max'];
53
+ }
54
+ //#endregion
55
+ export { type TestOptions };
@@ -0,0 +1,36 @@
1
+ import { RuleOptions } from "../eslintRules.cjs";
2
+ import { ConfigWithOverrides } from "../index.cjs";
3
+
4
+ //#region src/types/configOptions/typescript.d.ts
5
+ interface TypeScriptOptions extends ConfigWithOverrides {
6
+ /**
7
+ * Globs of files to allow running with the default project compiler options despite not being matched by the project service (_tsconfig.json_).
8
+ *
9
+ * The matched files may not also be included in their nearest _tsconfig.json_ file.
10
+ *
11
+ * @default []
12
+ *
13
+ * @see [@typescript-eslint: `allowDefaultProject` option](https://typescript-eslint.io/packages/parser#allowdefaultproject)
14
+ */
15
+ allowedDefaultProjects?: string[];
16
+
17
+ /**
18
+ * Enforce the consistent use of either `method` or `property` syntax for method signatures.
19
+ *
20
+ * @default 'method'
21
+ *
22
+ * @see [@typescript-eslint/method-signature-style](https://typescript-eslint.io/rules/method-signature-style)
23
+ */
24
+ methodSignatureStyle?: RuleOptions<'@typescript-eslint/method-signature-style'>;
25
+
26
+ /**
27
+ * Enforce the consistent use of either `interface` or `type` for type definitions.
28
+ *
29
+ * @default 'interface'
30
+ *
31
+ * @see [@typescript-eslint/consistent-type-definitions](https://typescript-eslint.io/rules/consistent-type-definitions)
32
+ */
33
+ typeDefinitionStyle?: RuleOptions<'@typescript-eslint/consistent-type-definitions'>;
34
+ }
35
+ //#endregion
36
+ export { type TypeScriptOptions };
@@ -0,0 +1,36 @@
1
+ import { RuleOptions } from "../eslintRules.js";
2
+ import { ConfigWithOverrides } from "../index.js";
3
+
4
+ //#region src/types/configOptions/typescript.d.ts
5
+ interface TypeScriptOptions extends ConfigWithOverrides {
6
+ /**
7
+ * Globs of files to allow running with the default project compiler options despite not being matched by the project service (_tsconfig.json_).
8
+ *
9
+ * The matched files may not also be included in their nearest _tsconfig.json_ file.
10
+ *
11
+ * @default []
12
+ *
13
+ * @see [@typescript-eslint: `allowDefaultProject` option](https://typescript-eslint.io/packages/parser#allowdefaultproject)
14
+ */
15
+ allowedDefaultProjects?: string[];
16
+
17
+ /**
18
+ * Enforce the consistent use of either `method` or `property` syntax for method signatures.
19
+ *
20
+ * @default 'method'
21
+ *
22
+ * @see [@typescript-eslint/method-signature-style](https://typescript-eslint.io/rules/method-signature-style)
23
+ */
24
+ methodSignatureStyle?: RuleOptions<'@typescript-eslint/method-signature-style'>;
25
+
26
+ /**
27
+ * Enforce the consistent use of either `interface` or `type` for type definitions.
28
+ *
29
+ * @default 'interface'
30
+ *
31
+ * @see [@typescript-eslint/consistent-type-definitions](https://typescript-eslint.io/rules/consistent-type-definitions)
32
+ */
33
+ typeDefinitionStyle?: RuleOptions<'@typescript-eslint/consistent-type-definitions'>;
34
+ }
35
+ //#endregion
36
+ export { type TypeScriptOptions };