@shayanthenerd/eslint-config 0.14.0 → 0.15.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 (51) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +187 -178
  3. package/dist/configs/base.mjs +13 -9
  4. package/dist/configs/css.mjs +2 -2
  5. package/dist/configs/cypress.mjs +2 -2
  6. package/dist/configs/html.mjs +2 -2
  7. package/dist/configs/importX.mjs +2 -2
  8. package/dist/configs/oxlintOverrides.mjs +16 -11
  9. package/dist/configs/perfectionist.mjs +2 -2
  10. package/dist/configs/playwright.mjs +2 -2
  11. package/dist/configs/restrictedExports.mjs +1 -1
  12. package/dist/configs/storybook.mjs +2 -2
  13. package/dist/configs/stylistic.mjs +2 -2
  14. package/dist/configs/tailwind.mjs +4 -4
  15. package/dist/configs/typescript.mjs +2 -2
  16. package/dist/configs/vitest.mjs +2 -2
  17. package/dist/configs/vue.mjs +2 -2
  18. package/dist/configs/vueComponentNames.mjs +1 -1
  19. package/dist/configs/vueServerComponents.mjs +1 -1
  20. package/dist/configs/zod.mjs +2 -2
  21. package/dist/{utils → helpers}/globs.mjs +1 -1
  22. package/dist/{utils → helpers}/ignores/defaultIgnorePatterns.mjs +1 -1
  23. package/dist/{utils → helpers}/ignores/getIgnorePatterns.mjs +1 -1
  24. package/dist/{utils → helpers}/ignores/resolveGitignorePatterns.mjs +1 -1
  25. package/dist/{utils → helpers}/isPackageDetected.mjs +1 -1
  26. package/dist/{utils → helpers}/options/defaultOptions.mjs +13 -7
  27. package/dist/{utils → helpers}/options/enableDetectedConfigs.mjs +1 -3
  28. package/dist/{utils → helpers}/options/mergeWithDefaults.mjs +4 -5
  29. package/dist/{utils → helpers}/vue/getRestrictedVueElements.mjs +1 -1
  30. package/dist/{utils → helpers}/vue/getRestrictedVueInputs.mjs +1 -1
  31. package/dist/index.mjs +3 -3
  32. package/dist/oxlint.config.jsonc +209 -206
  33. package/dist/prettier.config.mjs +1 -1
  34. package/dist/rules/css.mjs +1 -1
  35. package/dist/rules/html.mjs +3 -3
  36. package/dist/rules/importX.mjs +1 -1
  37. package/dist/rules/javascript.mjs +1 -2
  38. package/dist/rules/perfectionist.mjs +2 -2
  39. package/dist/rules/stylistic.mjs +10 -7
  40. package/dist/rules/tailwind.mjs +4 -4
  41. package/dist/rules/typescript.mjs +2 -2
  42. package/dist/rules/vue.mjs +6 -6
  43. package/dist/rules/vueAccessibility.mjs +1 -1
  44. package/dist/types/configOptions/base.d.mts +8 -8
  45. package/dist/types/configOptions/nuxt.d.mts +3 -3
  46. package/dist/types/configOptions/stylistic.d.mts +0 -15
  47. package/dist/types/configOptions/test.d.mts +4 -4
  48. package/dist/types/configOptions/vue.d.mts +1 -1
  49. package/dist/types/eslint-schema.d.mts +549 -201
  50. package/dist/types/index.d.mts +36 -19
  51. package/package.json +139 -124
@@ -1,208 +1,211 @@
1
1
  {
2
- "$schema": "../node_modules/oxlint/configuration_schema.json",
3
-
4
- "env": {
5
- "builtin": true,
6
- "es2026": true,
7
- "commonjs": false,
8
- "node": true,
9
- "browser": true,
10
- "worker": true,
11
- "serviceworker": false,
12
- "webextensions": false
13
- },
14
-
15
- "categories": {
16
- "correctness": "error",
17
- "suspicious": "error",
18
- "restriction": "error",
19
- "pedantic": "error",
20
- "perf": "warn",
21
- "style": "warn",
22
- "nursery": "error"
23
- },
24
-
25
- "plugins": [
26
- "oxc",
27
- "vue",
28
- "node",
29
- "jest",
30
- "jsdoc",
31
- "eslint",
32
- "import",
33
- "vitest",
34
- "promise",
35
- "unicorn",
36
- "jsx-a11y",
37
- "typescript"
38
- ],
39
-
40
- "rules": {
41
- /*** OXC ***/
42
- "oxc/no-async-await": "off",
43
- "oxc/no-optional-chaining": "off",
44
- "oxc/no-rest-spread-properties": "off",
45
-
46
- /*** ESLint ***/
47
- "eslint/yoda": "error",
48
- "eslint/alert": "warn",
49
- "eslint/id-length": "off",
50
- "eslint/sort-vars": "off",
51
- "eslint/sort-keys": "off",
52
- "eslint/no-ternary": "off",
53
- "eslint/no-undefined": "off",
54
- "eslint/sort-imports": "off",
55
- "eslint/max-statements": "off",
56
- "eslint/no-else-return": "off",
57
- "eslint/arrow-body-style": "off",
58
- "eslint/no-magic-numbers": "off",
59
- "eslint/no-inline-comments": "off",
60
- "eslint/capitalized-comments": "off",
61
- "eslint/func-names": ["error", "as-needed"],
62
- "no-sequences": ["error", { "allowInParentheses": false }],
63
- "eslint/no-plusplus": ["warn", { "allowForLoopAfterthoughts": true }],
64
- "eslint/no-unused-vars": ["error", { "ignoreUsingDeclarations": true }],
65
- "eslint/no-duplicate-imports": ["error", { "allowSeparateTypeImports": true }],
66
- "eslint/grouped-accessor-pairs": ["warn", "anyOrder", { "enforceForTSTypes": true }],
67
- "eslint/no-console": [
68
- "warn",
69
- {
70
- "allow": ["info", "warn", "error", "table", "group", "groupEnd", "groupCollapsed"]
71
- }
72
- ],
73
-
74
- /*** TypeScript ***/
75
- "typescript/triple-slash-reference": "off",
76
- "typescript/strict-boolean-expressions": "off",
77
- "typescript/explicit-function-return-type": "off",
78
- "typescript/explicit-module-boundary-types": "off",
79
- "typescript/consistent-indexed-object-style": ["warn", "record"],
80
-
81
- /*** Import ***/
82
- "import/extensions": "off",
83
- "import/unambiguous": "off",
84
- "import/no-namespace": "off",
85
- "import/exports-last": "off",
86
- "import/no-named-export": "off",
87
- "import/max-dependencies": "off",
88
- "import/no-default-export": "off",
89
- "import/prefer-default-export": "off",
90
- "import/no-named-as-default-member": "off",
91
- "import/no-anonymous-default-export": "off",
92
-
93
- /*** Unicorn ***/
94
- "unicorn/no-null": "off",
95
- "unicorn/filename-case": "off",
96
- "unicorn/prefer-set-has": "off",
97
- "unicorn/no-array-reduce": "off",
98
- "unicorn/prefer-string-raw": "off",
99
- "unicorn/no-array-for-each": "off",
100
- "unicorn/prefer-global-this": "off",
101
- "unicorn/no-useless-undefined": "off",
102
- "unicorn/no-immediate-mutation": "warn",
103
- "unicorn/prefer-prototype-methods": "off",
104
- "unicorn/no-await-expression-member": "off",
105
-
106
- /*** Jest ***/
107
- "jest/require-hook": "off",
108
- "jest/prefer-lowercase-title": "warn",
109
- "jest/require-top-level-describe": "off",
110
-
111
- /*** JSDoc ***/
112
- "jsdoc/require-param": "off",
113
- "jsdoc/require-returns": "off",
114
- "jsdoc/require-property": "off",
115
-
116
- /*** Vue ***/
117
- "vue/max-props": "off",
118
- "vue/no-required-prop-with-default": "off",
119
-
120
- /*** Customizable Overrides ***/
121
- /* These rules are customizable in the ESLint config, but OXLint doesn't respect them. */
122
- "eslint/max-depth": "off",
123
- "eslint/func-style": "off",
124
- "eslint/max-nested-callbacks": "off",
125
- "typescript/consistent-type-definitions": "off",
126
- "vitest/consistent-test-it": "off",
127
- "jest/max-nested-describe": "off",
128
- "vue/define-props-destructuring": "off"
129
- },
130
-
131
- "overrides": [
132
- {
133
- "files": ["**/{src,app,server}/**/*.{vue,js,mjs,cjs,jsx,ts,mts,cts,tsx}"],
134
- "rules": {
135
- "eslint/no-undef": "off"
136
- }
137
- }
138
- ],
139
-
140
- "ignorePatterns": [
141
- /* Dependencies */
142
- "**/*.min.*",
143
- "**/jspm_packages",
144
- "**/pnpm-lock.yaml",
145
- "**/bower_components",
146
- "**/package-lock.json",
147
-
148
- /* Auto-generated type definitions */
149
- "**/typegen.d.ts",
150
- "**/components.d.ts",
151
- "**/auto-import?(s).d.ts",
152
-
153
- /* Build outputs */
154
- "**/out",
155
- "**/dist",
156
- "**/build",
157
- "**/.data",
158
- "**/output",
159
- "**/.output",
160
- "**/.serverless",
161
- "**/public/build",
162
- "**/public/static",
163
- "**/.eslint-config-inspector",
164
-
165
- /* Cache */
166
- "**/tmp",
167
- "**/.tmp",
168
- "**/.npm",
169
- "**/temp",
170
- "**/.temp",
171
- "**/cache",
172
- "**/.cache",
173
- "**/deno_dir",
174
- "**/.parcel-cache",
175
- "**/*.lerna_backup",
176
- "**/.postcss-cache",
177
- "**/.vitepress/cache",
178
- "**/vite.config.*.timestamp-*",
179
-
180
- /* Frameworks and tools */
181
- "**/.nx",
182
- "**/.vite",
183
- "**/.yarn",
184
- "**/.nuxt",
185
- "**/.next",
186
- "**/.vitest",
187
- "**/.vercel",
188
- "**/.svelte-kit",
189
- "**/.vite-inspect",
190
-
191
- /* Tests */
192
- "**/coverage",
193
- "**/_fixtures",
194
- "**/.nyc_output",
195
- "**/__snapshots__",
196
-
197
- /* Development environment */
198
- "**/.idea",
199
- "**/.fleet",
200
- "**/.history",
201
-
202
- // Documentation
203
- "**/LICENSE*",
204
- "**/CHANGELOG*.md",
205
- "**/CODEOWNERS.md",
206
- "**/CODE_OF_CONDUCT.md"
207
- ]
2
+ "$schema": "../node_modules/oxlint/configuration_schema.json",
3
+
4
+ "env": {
5
+ "builtin": true,
6
+ "es2026": true,
7
+ "commonjs": false,
8
+ "node": true,
9
+ "browser": true,
10
+ "worker": true,
11
+ "serviceworker": false,
12
+ "webextensions": false
13
+ },
14
+
15
+ "categories": {
16
+ "correctness": "error",
17
+ "suspicious": "error",
18
+ "restriction": "error",
19
+ "pedantic": "error",
20
+ "perf": "warn",
21
+ "style": "warn",
22
+ "nursery": "error"
23
+ },
24
+
25
+ "plugins": [
26
+ "oxc",
27
+ "vue",
28
+ "node",
29
+ "jest",
30
+ "jsdoc",
31
+ "eslint",
32
+ "import",
33
+ "vitest",
34
+ "promise",
35
+ "unicorn",
36
+ "jsx-a11y",
37
+ "typescript"
38
+ ],
39
+
40
+ "rules": {
41
+ /*** OXC ***/
42
+ "oxc/no-async-await": "off",
43
+ "oxc/no-optional-chaining": "off",
44
+ "oxc/no-rest-spread-properties": "off",
45
+
46
+ /*** ESLint ***/
47
+ "eslint/alert": "warn",
48
+ "eslint/arrow-body-style": "off",
49
+ "eslint/capitalized-comments": "off",
50
+ "eslint/func-names": ["error", "as-needed"],
51
+ "eslint/grouped-accessor-pairs": ["warn", "anyOrder", { "enforceForTSTypes": true }],
52
+ "eslint/id-length": "off",
53
+ "eslint/max-statements": "off",
54
+ "eslint/no-console": [
55
+ "warn",
56
+ {
57
+ "allow": ["info", "warn", "error", "table", "group", "groupEnd", "groupCollapsed"]
58
+ }
59
+ ],
60
+ "eslint/no-continue": "off",
61
+ "eslint/no-duplicate-imports": ["error", { "allowSeparateTypeImports": true }],
62
+ "eslint/no-else-return": "off",
63
+ "eslint/no-inline-comments": "off",
64
+ "eslint/no-magic-numbers": "off",
65
+ "eslint/no-plusplus": ["warn", { "allowForLoopAfterthoughts": true }],
66
+ "eslint/no-sequences": ["error", { "allowInParentheses": false }],
67
+ "eslint/no-ternary": "off",
68
+ "eslint/no-undefined": "off",
69
+ "eslint/no-unused-vars": ["error", { "ignoreUsingDeclarations": true }],
70
+ "eslint/prefer-destructuring": ["warn", { "array": false }],
71
+ "eslint/sort-imports": "off",
72
+ "eslint/sort-keys": "off",
73
+ "eslint/sort-vars": "off",
74
+ "eslint/yoda": "error",
75
+ "no-sequences": ["error", { "allowInParentheses": false }],
76
+
77
+ /*** TypeScript ***/
78
+ "typescript/consistent-indexed-object-style": ["warn", "record"],
79
+ "typescript/explicit-function-return-type": "off",
80
+ "typescript/explicit-module-boundary-types": "off",
81
+ "typescript/strict-boolean-expressions": "off",
82
+ "typescript/triple-slash-reference": "off",
83
+
84
+ /*** Import ***/
85
+ "import/extensions": "off",
86
+ "import/exports-last": "off",
87
+ "import/max-dependencies": "off",
88
+ "import/no-anonymous-default-export": "off",
89
+ "import/no-default-export": "off",
90
+ "import/no-named-as-default-member": "off",
91
+ "import/no-named-export": "off",
92
+ "import/no-namespace": "off",
93
+ "import/prefer-default-export": "off",
94
+ "import/unambiguous": "off",
95
+
96
+ /*** Unicorn ***/
97
+ "unicorn/filename-case": "off",
98
+ "unicorn/no-array-for-each": "off",
99
+ "unicorn/no-array-reduce": "off",
100
+ "unicorn/no-await-expression-member": "off",
101
+ "unicorn/no-immediate-mutation": "warn",
102
+ "unicorn/no-null": "off",
103
+ "unicorn/no-useless-undefined": "off",
104
+ "unicorn/prefer-global-this": "off",
105
+ "unicorn/prefer-prototype-methods": "off",
106
+ "unicorn/prefer-set-has": "off",
107
+ "unicorn/prefer-string-raw": "off",
108
+
109
+ /*** Jest ***/
110
+ "jest/prefer-lowercase-title": "warn",
111
+ "jest/require-hook": "off",
112
+ "jest/require-top-level-describe": "off",
113
+
114
+ /*** JSDoc ***/
115
+ "jsdoc/require-param": "off",
116
+ "jsdoc/require-property": "off",
117
+ "jsdoc/require-returns": "off",
118
+
119
+ /*** Vue ***/
120
+ "vue/max-props": "off",
121
+ "vue/no-required-prop-with-default": "off",
122
+
123
+ /*** Customizable Overrides ***/
124
+ /* These rules are customizable in the ESLint config, but the customizations aren't reflected here. */
125
+ "eslint/func-style": "off",
126
+ "eslint/max-depth": "off",
127
+ "eslint/max-nested-callbacks": "off",
128
+ "typescript/consistent-type-definitions": "off",
129
+ "vitest/consistent-test-it": "off",
130
+ "jest/max-nested-describe": "off",
131
+ "vue/define-props-destructuring": "off"
132
+ },
133
+
134
+ "overrides": [
135
+ {
136
+ "files": ["**/{src,app,server}/**/*.{vue,js,mjs,cjs,jsx,ts,mts,cts,tsx}"],
137
+ "rules": {
138
+ "eslint/no-undef": "off"
139
+ }
140
+ }
141
+ ],
142
+
143
+ "ignorePatterns": [
144
+ /* Dependencies */
145
+ "**/*.min.*",
146
+ "**/jspm_packages",
147
+ "**/pnpm-lock.yaml",
148
+ "**/bower_components",
149
+ "**/package-lock.json",
150
+
151
+ /* Auto-generated type definitions */
152
+ "**/typegen.d.ts",
153
+ "**/components.d.ts",
154
+ "**/auto-import?(s).d.ts",
155
+
156
+ /* Build outputs */
157
+ "**/out",
158
+ "**/dist",
159
+ "**/build",
160
+ "**/.data",
161
+ "**/output",
162
+ "**/.output",
163
+ "**/.serverless",
164
+ "**/public/build",
165
+ "**/public/static",
166
+ "**/.eslint-config-inspector",
167
+
168
+ /* Cache */
169
+ "**/tmp",
170
+ "**/.tmp",
171
+ "**/.npm",
172
+ "**/temp",
173
+ "**/.temp",
174
+ "**/cache",
175
+ "**/.cache",
176
+ "**/deno_dir",
177
+ "**/.parcel-cache",
178
+ "**/*.lerna_backup",
179
+ "**/.postcss-cache",
180
+ "**/.vitepress/cache",
181
+ "**/vite.config.*.timestamp-*",
182
+
183
+ /* Frameworks and tools */
184
+ "**/.nx",
185
+ "**/.vite",
186
+ "**/.yarn",
187
+ "**/.nuxt",
188
+ "**/.next",
189
+ "**/.vitest",
190
+ "**/.vercel",
191
+ "**/.svelte-kit",
192
+ "**/.vite-inspect",
193
+
194
+ /* Tests */
195
+ "**/coverage",
196
+ "**/_fixtures",
197
+ "**/.nyc_output",
198
+ "**/__snapshots__",
199
+
200
+ /* Development environment */
201
+ "**/.idea",
202
+ "**/.fleet",
203
+ "**/.history",
204
+
205
+ // Documentation
206
+ "**/LICENSE*",
207
+ "**/CHANGELOG*.md",
208
+ "**/CODEOWNERS.md",
209
+ "**/CODE_OF_CONDUCT.md"
210
+ ]
208
211
  }
@@ -1,7 +1,7 @@
1
1
  //#region src/prettier.config.ts
2
2
  const prettierConfig = {
3
3
  semi: true,
4
- useTabs: true,
4
+ useTabs: false,
5
5
  tabWidth: 2,
6
6
  vueIndentScriptAndStyle: false,
7
7
  printWidth: 120,
@@ -1,5 +1,5 @@
1
1
  import { isEnabled } from "../utils/isEnabled.mjs";
2
- import { defaultOptions } from "../utils/options/defaultOptions.mjs";
2
+ import { defaultOptions } from "../helpers/options/defaultOptions.mjs";
3
3
 
4
4
  //#region src/rules/css.ts
5
5
  const allowedPhysicalUnits = [
@@ -1,11 +1,11 @@
1
1
  import { isEnabled } from "../utils/isEnabled.mjs";
2
- import { defaultOptions } from "../utils/options/defaultOptions.mjs";
2
+ import { defaultOptions } from "../helpers/options/defaultOptions.mjs";
3
3
 
4
4
  //#region src/rules/html.ts
5
5
  function getHTMLRules(options) {
6
6
  const { html, tailwind, stylistic } = options.configs;
7
7
  const { useBaseline, idNamingConvention } = isEnabled(html) ? html : defaultOptions.configs.html;
8
- const { indent, useTabs, maxAttributesPerLine, maxConsecutiveEmptyLines, selfCloseVoidHTMLElements } = isEnabled(stylistic) ? stylistic : defaultOptions.configs.stylistic;
8
+ const { indent, maxAttributesPerLine, maxConsecutiveEmptyLines, selfCloseVoidHTMLElements } = isEnabled(stylistic) ? stylistic : defaultOptions.configs.stylistic;
9
9
  const htmlRules = {
10
10
  "@html-eslint/no-duplicate-attrs": "error",
11
11
  "@html-eslint/no-duplicate-class": "warn",
@@ -51,7 +51,7 @@ function getHTMLRules(options) {
51
51
  "@html-eslint/attrs-newline": ["warn", { ifAttrsMoreThan: maxAttributesPerLine }],
52
52
  "@html-eslint/element-newline": ["warn", { inline: ["$inline"] }],
53
53
  "@html-eslint/id-naming-convention": ["warn", idNamingConvention],
54
- "@html-eslint/indent": ["warn", useTabs ? "tab" : indent],
54
+ "@html-eslint/indent": ["warn", indent],
55
55
  "@html-eslint/lowercase": "warn",
56
56
  "@html-eslint/no-extra-spacing-attrs": ["warn", {
57
57
  disallowTabs: true,
@@ -1,5 +1,5 @@
1
1
  import { isEnabled } from "../utils/isEnabled.mjs";
2
- import { defaultOptions } from "../utils/options/defaultOptions.mjs";
2
+ import { defaultOptions } from "../helpers/options/defaultOptions.mjs";
3
3
  import path from "node:path";
4
4
 
5
5
  //#region src/rules/importX.ts
@@ -100,7 +100,6 @@ function getJavaScriptRules(options) {
100
100
  "groupEnd",
101
101
  "groupCollapsed"
102
102
  ] }],
103
- "no-continue": "warn",
104
103
  "no-empty": "warn",
105
104
  "no-empty-function": ["error", { allow: [
106
105
  "overrideMethods",
@@ -193,7 +192,7 @@ function getJavaScriptRules(options) {
193
192
  "operator-assignment": "error",
194
193
  "prefer-arrow-callback": ["warn", { allowUnboundThis: true }],
195
194
  "prefer-const": "error",
196
- "prefer-destructuring": "warn",
195
+ "prefer-destructuring": ["warn", { array: false }],
197
196
  "prefer-exponentiation-operator": "warn",
198
197
  "prefer-named-capture-group": "warn",
199
198
  "prefer-numeric-literals": "warn",
@@ -1,5 +1,5 @@
1
1
  import { isEnabled } from "../utils/isEnabled.mjs";
2
- import { defaultOptions } from "../utils/options/defaultOptions.mjs";
2
+ import { defaultOptions } from "../helpers/options/defaultOptions.mjs";
3
3
 
4
4
  //#region src/rules/perfectionist.ts
5
5
  function getPerfectionistRules(options) {
@@ -15,7 +15,7 @@ function getPerfectionistRules(options) {
15
15
  "perfectionist/sort-named-imports": "warn",
16
16
  "perfectionist/sort-named-exports": "warn",
17
17
  "perfectionist/sort-imports": ["warn", {
18
- environment: env,
18
+ environment: env === "bun" ? "bun" : "node",
19
19
  tsconfig: tsConfig || void 0,
20
20
  sortSideEffects: true,
21
21
  fallbackSort: {
@@ -1,10 +1,10 @@
1
1
  import { isEnabled } from "../utils/isEnabled.mjs";
2
- import { defaultOptions } from "../utils/options/defaultOptions.mjs";
2
+ import { defaultOptions } from "../helpers/options/defaultOptions.mjs";
3
3
 
4
4
  //#region src/rules/stylistic.ts
5
5
  function getStylisticRules(options) {
6
6
  const { stylistic } = options.configs;
7
- const { semi, quotes, indent, useTabs, jsxQuotes, arrowParens, trailingComma, maxLineLength, maxAttributesPerLine, memberDelimiterStyle, maxConsecutiveEmptyLines } = isEnabled(stylistic) ? stylistic : defaultOptions.configs.stylistic;
7
+ const { semi, quotes, indent, jsxQuotes, arrowParens, trailingComma, maxLineLength, maxAttributesPerLine, memberDelimiterStyle, maxConsecutiveEmptyLines } = isEnabled(stylistic) ? stylistic : defaultOptions.configs.stylistic;
8
8
  return {
9
9
  "@stylistic/array-bracket-newline": ["warn", "consistent"],
10
10
  "@stylistic/array-bracket-spacing": "warn",
@@ -28,13 +28,13 @@ function getStylisticRules(options) {
28
28
  "@stylistic/implicit-arrow-linebreak": ["warn", "beside"],
29
29
  "@stylistic/indent": [
30
30
  "warn",
31
- useTabs ? "tab" : indent,
31
+ indent,
32
32
  {
33
33
  tabLength: indent,
34
34
  SwitchCase: 1
35
35
  }
36
36
  ],
37
- "@stylistic/indent-binary-ops": ["warn", useTabs ? "tab" : indent],
37
+ "@stylistic/indent-binary-ops": ["warn", indent],
38
38
  "@stylistic/jsx-closing-bracket-location": "warn",
39
39
  "@stylistic/jsx-closing-tag-location": "warn",
40
40
  "@stylistic/jsx-curly-brace-presence": "warn",
@@ -43,7 +43,7 @@ function getStylisticRules(options) {
43
43
  "@stylistic/jsx-equals-spacing": "warn",
44
44
  "@stylistic/jsx-first-prop-new-line": "warn",
45
45
  "@stylistic/jsx-function-call-newline": "warn",
46
- "@stylistic/jsx-indent-props": ["warn", useTabs ? "tab" : indent],
46
+ "@stylistic/jsx-indent-props": ["warn", indent],
47
47
  "@stylistic/jsx-max-props-per-line": ["warn", { maximum: {
48
48
  multi: 1,
49
49
  single: maxAttributesPerLine
@@ -63,7 +63,10 @@ function getStylisticRules(options) {
63
63
  allowArrayStart: true,
64
64
  allowModuleStart: true,
65
65
  allowObjectStart: true,
66
- allowInterfaceStart: true
66
+ allowInterfaceStart: true,
67
+ afterHashbangComment: true,
68
+ applyDefaultIgnorePatterns: false,
69
+ ignorePattern: "@ts|eslint|oxlint"
67
70
  }],
68
71
  "@stylistic/max-len": ["warn", {
69
72
  tabWidth: indent,
@@ -96,7 +99,7 @@ function getStylisticRules(options) {
96
99
  maxEOF: 0,
97
100
  max: maxConsecutiveEmptyLines
98
101
  }],
99
- "@stylistic/no-tabs": useTabs ? "off" : "warn",
102
+ "@stylistic/no-tabs": "warn",
100
103
  "@stylistic/no-trailing-spaces": "warn",
101
104
  "@stylistic/no-whitespace-before-property": "warn",
102
105
  "@stylistic/nonblock-statement-body-position": "warn",
@@ -1,17 +1,17 @@
1
1
  import { isEnabled } from "../utils/isEnabled.mjs";
2
- import { defaultOptions } from "../utils/options/defaultOptions.mjs";
2
+ import { defaultOptions } from "../helpers/options/defaultOptions.mjs";
3
3
 
4
4
  //#region src/rules/tailwind.ts
5
5
  function getTailwindRules(options) {
6
6
  const { tailwind, stylistic } = options.configs;
7
7
  const { multilineSort, ignoredUnregisteredClasses: userIgnoredUnregisteredClasses } = isEnabled(tailwind) ? tailwind : defaultOptions.configs.tailwind;
8
- const { indent, useTabs, maxLineLength } = isEnabled(stylistic) ? stylistic : defaultOptions.configs.stylistic;
8
+ const { indent, maxLineLength } = isEnabled(stylistic) ? stylistic : defaultOptions.configs.stylistic;
9
9
  const isTailwindV4 = isEnabled(tailwind) && tailwind.entryPoint;
10
10
  const tailwindRules = {
11
11
  "better-tailwindcss/enforce-consistent-line-wrapping": [multilineSort ? "warn" : "off", {
12
+ indent,
12
13
  preferSingleLine: true,
13
- printWidth: maxLineLength,
14
- indent: useTabs ? "tab" : indent
14
+ printWidth: maxLineLength
15
15
  }],
16
16
  "better-tailwindcss/enforce-consistent-class-order": "warn",
17
17
  "better-tailwindcss/enforce-consistent-variable-syntax": "warn",
@@ -1,5 +1,5 @@
1
1
  import { isEnabled } from "../utils/isEnabled.mjs";
2
- import { defaultOptions } from "../utils/options/defaultOptions.mjs";
2
+ import { defaultOptions } from "../helpers/options/defaultOptions.mjs";
3
3
 
4
4
  //#region src/rules/typescript.ts
5
5
  function getTypeScriptRules(options) {
@@ -126,7 +126,7 @@ function getTypeScriptRules(options) {
126
126
  "@typescript-eslint/prefer-string-starts-ends-with": "warn",
127
127
  "@typescript-eslint/no-loop-func": "error",
128
128
  "@typescript-eslint/default-param-last": "warn",
129
- "@typescript-eslint/prefer-destructuring": "warn",
129
+ "@typescript-eslint/prefer-destructuring": ["warn", { array: false }],
130
130
  "@typescript-eslint/promise-function-async": "error",
131
131
  "@typescript-eslint/consistent-type-imports": "warn",
132
132
  "@typescript-eslint/no-useless-empty-export": "error",