@luxass/eslint-config 4.2.5 → 4.2.7

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 (144) hide show
  1. package/README.md +35 -54
  2. package/dist/index.cjs +166 -479
  3. package/dist/index.d.cts +733 -12
  4. package/dist/index.d.ts +733 -12
  5. package/dist/{configs/index.cjs → index.js} +300 -542
  6. package/package.json +51 -86
  7. package/dist/chunk-4YBQZLPS.mjs +0 -68
  8. package/dist/chunk-4YT54JFZ.mjs +0 -48
  9. package/dist/chunk-5NK24IKQ.mjs +0 -26
  10. package/dist/chunk-6T7MXPCT.mjs +0 -17
  11. package/dist/chunk-7ODEIBF5.mjs +0 -144
  12. package/dist/chunk-AQRBQAKE.mjs +0 -48
  13. package/dist/chunk-DAJA5AV3.mjs +0 -29
  14. package/dist/chunk-DCOLHWHC.mjs +0 -269
  15. package/dist/chunk-DVQQVCGF.mjs +0 -45
  16. package/dist/chunk-EHWA727G.mjs +0 -69
  17. package/dist/chunk-FNOIGW47.mjs +0 -104
  18. package/dist/chunk-KOXCJL3C.mjs +0 -109
  19. package/dist/chunk-MMSZW2UW.mjs +0 -92
  20. package/dist/chunk-MT5P5EKH.mjs +0 -207
  21. package/dist/chunk-O2BXTQHK.mjs +0 -117
  22. package/dist/chunk-QDSV5ONX.mjs +0 -93
  23. package/dist/chunk-QMGT2Z63.mjs +0 -57
  24. package/dist/chunk-RVSUTDCE.mjs +0 -57
  25. package/dist/chunk-SPD4DGYN.mjs +0 -274
  26. package/dist/chunk-UITQW3RA.mjs +0 -293
  27. package/dist/chunk-V57HXOSW.mjs +0 -81
  28. package/dist/chunk-WDSV2EFG.mjs +0 -7
  29. package/dist/chunk-WOBGA3K2.mjs +0 -63
  30. package/dist/chunk-WSQOWO67.mjs +0 -16
  31. package/dist/chunk-XBASVDU6.mjs +0 -215
  32. package/dist/chunk-XPKGXA67.mjs +0 -183
  33. package/dist/chunk-YGZJUKJC.mjs +0 -0
  34. package/dist/chunk-YO3IYQ2L.mjs +0 -220
  35. package/dist/configs/astro.cjs +0 -179
  36. package/dist/configs/astro.d.cts +0 -11
  37. package/dist/configs/astro.d.ts +0 -11
  38. package/dist/configs/astro.mjs +0 -8
  39. package/dist/configs/comments.cjs +0 -63
  40. package/dist/configs/comments.d.cts +0 -15
  41. package/dist/configs/comments.d.ts +0 -15
  42. package/dist/configs/comments.mjs +0 -6
  43. package/dist/configs/formatters.cjs +0 -274
  44. package/dist/configs/formatters.d.cts +0 -11
  45. package/dist/configs/formatters.d.ts +0 -11
  46. package/dist/configs/formatters.mjs +0 -9
  47. package/dist/configs/ignores.cjs +0 -96
  48. package/dist/configs/ignores.d.cts +0 -15
  49. package/dist/configs/ignores.d.ts +0 -15
  50. package/dist/configs/ignores.mjs +0 -7
  51. package/dist/configs/imports.cjs +0 -104
  52. package/dist/configs/imports.d.cts +0 -23
  53. package/dist/configs/imports.d.ts +0 -23
  54. package/dist/configs/imports.mjs +0 -7
  55. package/dist/configs/index.d.cts +0 -20
  56. package/dist/configs/index.d.ts +0 -20
  57. package/dist/configs/index.mjs +0 -104
  58. package/dist/configs/javascript.cjs +0 -324
  59. package/dist/configs/javascript.d.cts +0 -11
  60. package/dist/configs/javascript.d.ts +0 -11
  61. package/dist/configs/javascript.mjs +0 -7
  62. package/dist/configs/jsdoc.cjs +0 -85
  63. package/dist/configs/jsdoc.d.cts +0 -27
  64. package/dist/configs/jsdoc.d.ts +0 -27
  65. package/dist/configs/jsdoc.mjs +0 -7
  66. package/dist/configs/jsonc.cjs +0 -155
  67. package/dist/configs/jsonc.d.cts +0 -11
  68. package/dist/configs/jsonc.d.ts +0 -11
  69. package/dist/configs/jsonc.mjs +0 -8
  70. package/dist/configs/markdown.cjs +0 -164
  71. package/dist/configs/markdown.d.cts +0 -35
  72. package/dist/configs/markdown.d.ts +0 -35
  73. package/dist/configs/markdown.mjs +0 -8
  74. package/dist/configs/nextjs.cjs +0 -180
  75. package/dist/configs/nextjs.d.cts +0 -11
  76. package/dist/configs/nextjs.d.ts +0 -11
  77. package/dist/configs/nextjs.mjs +0 -8
  78. package/dist/configs/node.cjs +0 -60
  79. package/dist/configs/node.d.cts +0 -15
  80. package/dist/configs/node.d.ts +0 -15
  81. package/dist/configs/node.mjs +0 -6
  82. package/dist/configs/perfectionist.cjs +0 -51
  83. package/dist/configs/perfectionist.d.cts +0 -20
  84. package/dist/configs/perfectionist.d.ts +0 -20
  85. package/dist/configs/perfectionist.mjs +0 -6
  86. package/dist/configs/react.cjs +0 -379
  87. package/dist/configs/react.d.cts +0 -11
  88. package/dist/configs/react.d.ts +0 -11
  89. package/dist/configs/react.mjs +0 -8
  90. package/dist/configs/solid.cjs +0 -360
  91. package/dist/configs/solid.d.cts +0 -11
  92. package/dist/configs/solid.d.ts +0 -11
  93. package/dist/configs/solid.mjs +0 -8
  94. package/dist/configs/sort.cjs +0 -240
  95. package/dist/configs/sort.d.cts +0 -26
  96. package/dist/configs/sort.d.ts +0 -26
  97. package/dist/configs/sort.mjs +0 -8
  98. package/dist/configs/stylistic.cjs +0 -98
  99. package/dist/configs/stylistic.d.cts +0 -11
  100. package/dist/configs/stylistic.d.ts +0 -11
  101. package/dist/configs/stylistic.mjs +0 -9
  102. package/dist/configs/tailwindcss.cjs +0 -148
  103. package/dist/configs/tailwindcss.d.cts +0 -11
  104. package/dist/configs/tailwindcss.d.ts +0 -11
  105. package/dist/configs/tailwindcss.mjs +0 -8
  106. package/dist/configs/test.cjs +0 -206
  107. package/dist/configs/test.d.cts +0 -11
  108. package/dist/configs/test.d.ts +0 -11
  109. package/dist/configs/test.mjs +0 -9
  110. package/dist/configs/toml.cjs +0 -131
  111. package/dist/configs/toml.d.cts +0 -11
  112. package/dist/configs/toml.d.ts +0 -11
  113. package/dist/configs/toml.mjs +0 -8
  114. package/dist/configs/typescript.cjs +0 -291
  115. package/dist/configs/typescript.d.cts +0 -11
  116. package/dist/configs/typescript.d.ts +0 -11
  117. package/dist/configs/typescript.mjs +0 -8
  118. package/dist/configs/unicorn.cjs +0 -91
  119. package/dist/configs/unicorn.d.cts +0 -15
  120. package/dist/configs/unicorn.d.ts +0 -15
  121. package/dist/configs/unicorn.mjs +0 -6
  122. package/dist/configs/unocss.cjs +0 -133
  123. package/dist/configs/unocss.d.cts +0 -11
  124. package/dist/configs/unocss.d.ts +0 -11
  125. package/dist/configs/unocss.mjs +0 -8
  126. package/dist/configs/vue.cjs +0 -293
  127. package/dist/configs/vue.d.cts +0 -11
  128. package/dist/configs/vue.d.ts +0 -11
  129. package/dist/configs/vue.mjs +0 -8
  130. package/dist/configs/yaml.cjs +0 -143
  131. package/dist/configs/yaml.d.cts +0 -11
  132. package/dist/configs/yaml.d.ts +0 -11
  133. package/dist/configs/yaml.mjs +0 -8
  134. package/dist/custom-rules/utils.cjs +0 -31
  135. package/dist/custom-rules/utils.d.cts +0 -6
  136. package/dist/custom-rules/utils.d.ts +0 -6
  137. package/dist/custom-rules/utils.mjs +0 -6
  138. package/dist/globs.cjs +0 -158
  139. package/dist/globs.d.cts +0 -28
  140. package/dist/globs.d.ts +0 -28
  141. package/dist/globs.mjs +0 -56
  142. package/dist/index.mjs +0 -284
  143. package/dist/types-HqEzZfQU.d.cts +0 -668
  144. package/dist/types-HqEzZfQU.d.ts +0 -668
@@ -1,269 +0,0 @@
1
- import {
2
- GLOB_SRC,
3
- GLOB_SRC_EXT
4
- } from "./chunk-KOXCJL3C.mjs";
5
-
6
- // src/configs/javascript.ts
7
- import globals from "globals";
8
- import pluginUnusedImports from "eslint-plugin-unused-imports";
9
- import pluginAntfu from "eslint-plugin-antfu";
10
- async function javascript(options = {}) {
11
- const { editor = false, overrides = {} } = options;
12
- return [
13
- {
14
- name: "luxass:javascript",
15
- languageOptions: {
16
- ecmaVersion: 2022,
17
- globals: {
18
- ...globals.browser,
19
- ...globals.es2021,
20
- ...globals.node,
21
- document: "readonly",
22
- navigator: "readonly",
23
- window: "readonly"
24
- },
25
- parserOptions: {
26
- ecmaFeatures: {
27
- jsx: true
28
- },
29
- ecmaVersion: 2022,
30
- sourceType: "module"
31
- },
32
- sourceType: "module"
33
- },
34
- linterOptions: {
35
- reportUnusedDisableDirectives: true
36
- },
37
- plugins: {
38
- "antfu": pluginAntfu,
39
- "unused-imports": pluginUnusedImports
40
- },
41
- rules: {
42
- "accessor-pairs": [
43
- "error",
44
- { enforceForClassMembers: true, setWithoutGet: true }
45
- ],
46
- "array-callback-return": "error",
47
- "block-scoped-var": "error",
48
- "constructor-super": "error",
49
- "default-case-last": "error",
50
- "dot-notation": ["error", { allowKeywords: true }],
51
- "eqeqeq": ["error", "smart"],
52
- "new-cap": [
53
- "error",
54
- { capIsNew: false, newIsCap: true, properties: true }
55
- ],
56
- "no-alert": "error",
57
- "no-array-constructor": "error",
58
- "no-async-promise-executor": "error",
59
- "no-caller": "error",
60
- "no-case-declarations": "error",
61
- "no-class-assign": "error",
62
- "no-compare-neg-zero": "error",
63
- "no-cond-assign": ["error", "always"],
64
- "no-console": ["error", { allow: ["warn", "error"] }],
65
- "no-const-assign": "error",
66
- "no-control-regex": "error",
67
- "no-debugger": "error",
68
- "no-delete-var": "error",
69
- "no-dupe-args": "error",
70
- "no-dupe-class-members": "error",
71
- "no-dupe-keys": "error",
72
- "no-duplicate-case": "error",
73
- "no-empty": ["error", { allowEmptyCatch: true }],
74
- "no-empty-character-class": "error",
75
- "no-empty-pattern": "error",
76
- "no-eval": "error",
77
- "no-ex-assign": "error",
78
- "no-extend-native": "error",
79
- "no-extra-bind": "error",
80
- "no-extra-boolean-cast": "error",
81
- "no-fallthrough": "error",
82
- "no-func-assign": "error",
83
- "no-global-assign": "error",
84
- "no-implied-eval": "error",
85
- "no-import-assign": "error",
86
- "no-invalid-regexp": "error",
87
- "no-invalid-this": "error",
88
- "no-irregular-whitespace": "error",
89
- "no-iterator": "error",
90
- "no-labels": ["error", { allowLoop: false, allowSwitch: false }],
91
- "no-lone-blocks": "error",
92
- "no-loss-of-precision": "error",
93
- "no-misleading-character-class": "error",
94
- "no-multi-str": "error",
95
- "no-new": "error",
96
- "no-new-func": "error",
97
- "no-new-symbol": "error",
98
- "no-new-wrappers": "error",
99
- "no-obj-calls": "error",
100
- "no-octal": "error",
101
- "no-octal-escape": "error",
102
- "no-proto": "error",
103
- "no-prototype-builtins": "error",
104
- "no-redeclare": ["error", { builtinGlobals: false }],
105
- "no-regex-spaces": "error",
106
- "no-restricted-globals": [
107
- "error",
108
- { name: "global", message: "Use `globalThis` instead." },
109
- { name: "self", message: "Use `globalThis` instead." }
110
- ],
111
- "no-restricted-properties": [
112
- "error",
113
- {
114
- message: "Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",
115
- property: "__proto__"
116
- },
117
- {
118
- message: "Use `Object.defineProperty` instead.",
119
- property: "__defineGetter__"
120
- },
121
- {
122
- message: "Use `Object.defineProperty` instead.",
123
- property: "__defineSetter__"
124
- },
125
- {
126
- message: "Use `Object.getOwnPropertyDescriptor` instead.",
127
- property: "__lookupGetter__"
128
- },
129
- {
130
- message: "Use `Object.getOwnPropertyDescriptor` instead.",
131
- property: "__lookupSetter__"
132
- }
133
- ],
134
- "no-restricted-syntax": [
135
- "error",
136
- "DebuggerStatement",
137
- "LabeledStatement",
138
- "WithStatement",
139
- "TSEnumDeclaration[const=true]",
140
- "TSExportAssignment"
141
- ],
142
- "no-self-assign": ["error", { props: true }],
143
- "no-self-compare": "error",
144
- "no-sequences": "error",
145
- "no-shadow-restricted-names": "error",
146
- "no-sparse-arrays": "error",
147
- "no-template-curly-in-string": "error",
148
- "no-this-before-super": "error",
149
- "no-throw-literal": "error",
150
- "no-undef": "error",
151
- "no-undef-init": "error",
152
- "no-unexpected-multiline": "error",
153
- "no-unmodified-loop-condition": "error",
154
- "no-unneeded-ternary": ["error", { defaultAssignment: false }],
155
- "no-unreachable": "error",
156
- "no-unreachable-loop": "error",
157
- "no-unsafe-finally": "error",
158
- "no-unsafe-negation": "error",
159
- "no-unused-expressions": [
160
- "error",
161
- {
162
- allowShortCircuit: true,
163
- allowTaggedTemplates: true,
164
- allowTernary: true
165
- }
166
- ],
167
- "no-unused-vars": [
168
- "error",
169
- {
170
- args: "none",
171
- caughtErrors: "none",
172
- ignoreRestSiblings: true,
173
- vars: "all"
174
- }
175
- ],
176
- "no-use-before-define": [
177
- "error",
178
- { classes: false, functions: false, variables: true }
179
- ],
180
- "no-useless-backreference": "error",
181
- "no-useless-call": "error",
182
- "no-useless-catch": "error",
183
- "no-useless-computed-key": "error",
184
- "no-useless-constructor": "error",
185
- "no-useless-rename": "error",
186
- "no-useless-return": "error",
187
- "no-var": "error",
188
- "no-with": "error",
189
- "object-shorthand": [
190
- "error",
191
- "always",
192
- {
193
- avoidQuotes: true,
194
- ignoreConstructors: false
195
- }
196
- ],
197
- "one-var": ["error", { initialized: "never" }],
198
- "prefer-arrow-callback": [
199
- "error",
200
- {
201
- allowNamedFunctions: false,
202
- allowUnboundThis: true
203
- }
204
- ],
205
- "prefer-const": [
206
- "error",
207
- {
208
- destructuring: "all",
209
- ignoreReadBeforeAssign: true
210
- }
211
- ],
212
- "prefer-exponentiation-operator": "error",
213
- "prefer-promise-reject-errors": "error",
214
- "prefer-regex-literals": ["error", { disallowRedundantWrapping: true }],
215
- "prefer-rest-params": "error",
216
- "prefer-spread": "error",
217
- "prefer-template": "error",
218
- "sort-imports": [
219
- "error",
220
- {
221
- allowSeparatedGroups: false,
222
- ignoreCase: false,
223
- ignoreDeclarationSort: true,
224
- ignoreMemberSort: false,
225
- memberSyntaxSortOrder: ["none", "all", "multiple", "single"]
226
- }
227
- ],
228
- "symbol-description": "error",
229
- "unicode-bom": ["error", "never"],
230
- "unused-imports/no-unused-imports": editor ? "off" : "error",
231
- "unused-imports/no-unused-vars": [
232
- "error",
233
- {
234
- args: "after-used",
235
- argsIgnorePattern: "^_",
236
- vars: "all",
237
- varsIgnorePattern: "^_"
238
- }
239
- ],
240
- "use-isnan": [
241
- "error",
242
- { enforceForIndexOf: true, enforceForSwitchCase: true }
243
- ],
244
- "valid-typeof": ["error", { requireStringLiterals: true }],
245
- "vars-on-top": "error",
246
- "yoda": ["error", "never"],
247
- ...overrides
248
- }
249
- },
250
- {
251
- name: "luxass:scripts-overrides",
252
- files: [`scripts/${GLOB_SRC}`, `cli.${GLOB_SRC_EXT}`],
253
- rules: {
254
- "no-console": "off"
255
- }
256
- },
257
- {
258
- name: "luxass:playground-overrides",
259
- files: [`**/playground.${GLOB_SRC_EXT}`],
260
- rules: {
261
- "no-console": "off"
262
- }
263
- }
264
- ];
265
- }
266
-
267
- export {
268
- javascript
269
- };
@@ -1,45 +0,0 @@
1
- import {
2
- interop
3
- } from "./chunk-4YBQZLPS.mjs";
4
-
5
- // src/configs/jsdoc.ts
6
- async function jsdoc(options = {}) {
7
- const {
8
- overrides,
9
- stylistic = true
10
- } = options;
11
- return [
12
- {
13
- name: "luxass:jsdoc",
14
- plugins: {
15
- jsdoc: await interop(import("eslint-plugin-jsdoc"))
16
- },
17
- rules: {
18
- "jsdoc/check-access": "warn",
19
- "jsdoc/check-param-names": "warn",
20
- "jsdoc/check-property-names": "warn",
21
- "jsdoc/check-types": "warn",
22
- "jsdoc/empty-tags": "warn",
23
- "jsdoc/implements-on-classes": "warn",
24
- "jsdoc/no-defaults": "warn",
25
- "jsdoc/no-multi-asterisks": "warn",
26
- "jsdoc/require-param-name": "warn",
27
- "jsdoc/require-property": "warn",
28
- "jsdoc/require-property-description": "warn",
29
- "jsdoc/require-property-name": "warn",
30
- "jsdoc/require-returns-check": "warn",
31
- "jsdoc/require-returns-description": "warn",
32
- "jsdoc/require-yields-check": "warn",
33
- ...stylistic ? {
34
- "jsdoc/check-alignment": "warn",
35
- "jsdoc/multiline-blocks": "warn"
36
- } : {},
37
- ...overrides
38
- }
39
- }
40
- ];
41
- }
42
-
43
- export {
44
- jsdoc
45
- };
@@ -1,69 +0,0 @@
1
- import {
2
- interop
3
- } from "./chunk-4YBQZLPS.mjs";
4
- import {
5
- GLOB_TOML
6
- } from "./chunk-KOXCJL3C.mjs";
7
-
8
- // src/configs/toml.ts
9
- async function toml(options = {}) {
10
- const {
11
- files = [GLOB_TOML],
12
- overrides = {},
13
- stylistic = true
14
- } = options;
15
- const {
16
- indent = 2
17
- } = typeof stylistic === "boolean" ? {} : stylistic;
18
- const [
19
- pluginToml,
20
- parserToml
21
- ] = await Promise.all([
22
- interop(import("eslint-plugin-toml")),
23
- interop(import("toml-eslint-parser"))
24
- ]);
25
- return [
26
- {
27
- name: "luxass:toml:setup",
28
- plugins: {
29
- toml: pluginToml
30
- }
31
- },
32
- {
33
- name: "luxass:toml:rules",
34
- files,
35
- languageOptions: {
36
- parser: parserToml
37
- },
38
- rules: {
39
- "style/spaced-comment": "off",
40
- "toml/comma-style": "error",
41
- "toml/keys-order": "error",
42
- "toml/no-space-dots": "error",
43
- "toml/no-unreadable-number-separator": "error",
44
- "toml/precision-of-fractional-seconds": "error",
45
- "toml/precision-of-integer": "error",
46
- "toml/tables-order": "error",
47
- "toml/vue-custom-block/no-parsing-error": "error",
48
- ...stylistic ? {
49
- "toml/array-bracket-newline": "error",
50
- "toml/array-bracket-spacing": "error",
51
- "toml/array-element-newline": "error",
52
- "toml/indent": ["error", indent === "tab" ? 2 : indent],
53
- "toml/inline-table-curly-spacing": "error",
54
- "toml/key-spacing": "error",
55
- "toml/padding-line-between-pairs": "error",
56
- "toml/padding-line-between-tables": "error",
57
- "toml/quoted-keys": "error",
58
- "toml/spaced-comment": "error",
59
- "toml/table-bracket-spacing": "error"
60
- } : {},
61
- ...overrides
62
- }
63
- }
64
- ];
65
- }
66
-
67
- export {
68
- toml
69
- };
@@ -1,104 +0,0 @@
1
- import {
2
- interop
3
- } from "./chunk-4YBQZLPS.mjs";
4
- import {
5
- GLOB_MARKDOWN,
6
- GLOB_MARKDOWN_CODE,
7
- GLOB_MARKDOWN_IN_MARKDOWN
8
- } from "./chunk-KOXCJL3C.mjs";
9
-
10
- // src/configs/markdown.ts
11
- import * as parserPlain from "eslint-parser-plain";
12
- import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
13
- async function markdown(options = {}) {
14
- const {
15
- exts = [],
16
- files = [GLOB_MARKDOWN],
17
- overrides = {}
18
- } = options;
19
- const markdown2 = await interop(import("eslint-plugin-markdown"));
20
- return [
21
- {
22
- name: "luxass:markdown:setup",
23
- plugins: {
24
- markdown: markdown2
25
- }
26
- },
27
- {
28
- name: "luxass:markdown:processor",
29
- files,
30
- ignores: [GLOB_MARKDOWN_IN_MARKDOWN],
31
- // `eslint-plugin-markdown` only creates virtual files for code blocks,
32
- // but not the markdown file itself. We use `eslint-merge-processors` to
33
- // add a pass-through processor for the markdown file itself.
34
- processor: mergeProcessors([
35
- markdown2.processors.markdown,
36
- processorPassThrough
37
- ])
38
- },
39
- {
40
- name: "luxass:markdown:parser",
41
- files,
42
- languageOptions: {
43
- parser: parserPlain
44
- }
45
- },
46
- {
47
- name: "luxass:markdown:disables",
48
- files: [
49
- GLOB_MARKDOWN_CODE,
50
- ...exts.map((ext) => `${GLOB_MARKDOWN}/**/*.${ext}`)
51
- ],
52
- languageOptions: {
53
- parserOptions: {
54
- ecmaFeatures: {
55
- impliedStrict: true
56
- }
57
- }
58
- },
59
- rules: {
60
- "import/newline-after-import": "off",
61
- "no-alert": "off",
62
- "no-console": "off",
63
- "no-undef": "off",
64
- "no-unused-expressions": "off",
65
- "no-unused-vars": "off",
66
- "node/prefer-global/process": "off",
67
- "style/comma-dangle": "off",
68
- "style/eol-last": "off",
69
- // Type aware rules
70
- "ts/await-thenable": "off",
71
- "ts/consistent-type-imports": "off",
72
- "ts/dot-notation": "off",
73
- "ts/no-floating-promises": "off",
74
- "ts/no-for-in-array": "off",
75
- "ts/no-implied-eval": "off",
76
- "ts/no-misused-promises": "off",
77
- "ts/no-namespace": "off",
78
- "ts/no-redeclare": "off",
79
- "ts/no-require-imports": "off",
80
- "ts/no-throw-literal": "off",
81
- "ts/no-unnecessary-type-assertion": "off",
82
- "ts/no-unsafe-argument": "off",
83
- "ts/no-unsafe-assignment": "off",
84
- "ts/no-unsafe-call": "off",
85
- "ts/no-unsafe-member-access": "off",
86
- "ts/no-unsafe-return": "off",
87
- "ts/no-unused-vars": "off",
88
- "ts/no-use-before-define": "off",
89
- "ts/no-var-requires": "off",
90
- "ts/restrict-plus-operands": "off",
91
- "ts/restrict-template-expressions": "off",
92
- "ts/unbound-method": "off",
93
- "unicode-bom": "off",
94
- "unused-imports/no-unused-imports": "off",
95
- "unused-imports/no-unused-vars": "off",
96
- ...overrides
97
- }
98
- }
99
- ];
100
- }
101
-
102
- export {
103
- markdown
104
- };
@@ -1,109 +0,0 @@
1
- // src/globs.ts
2
- var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
3
- var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
4
- var GLOB_JS = "**/*.?([cm])js";
5
- var GLOB_JSX = "**/*.?([cm])jsx";
6
- var GLOB_TS = "**/*.?([cm])ts";
7
- var GLOB_TSX = "**/*.?([cm])tsx";
8
- var GLOB_STYLE = "**/*.{c,le,sc}ss";
9
- var GLOB_CSS = "**/*.css";
10
- var GLOB_POSTCSS = "**/*.{p,post}css";
11
- var GLOB_LESS = "**/*.less";
12
- var GLOB_SCSS = "**/*.scss";
13
- var GLOB_JSON = "**/*.json";
14
- var GLOB_JSON5 = "**/*.json5";
15
- var GLOB_JSONC = "**/*.jsonc";
16
- var GLOB_MARKDOWN = "**/*.md";
17
- var GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
18
- var GLOB_VUE = "**/*.vue";
19
- var GLOB_YAML = "**/*.y?(a)ml";
20
- var GLOB_TOML = "**/*.toml";
21
- var GLOB_HTML = "**/*.htm?(l)";
22
- var GLOB_ASTRO = "**/*.astro";
23
- var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
24
- var GLOB_TESTS = [
25
- `**/__tests__/**/*.${GLOB_SRC_EXT}`,
26
- `**/*.spec.${GLOB_SRC_EXT}`,
27
- `**/*.test.${GLOB_SRC_EXT}`,
28
- `**/*.bench.${GLOB_SRC_EXT}`,
29
- `**/*.benchmark.${GLOB_SRC_EXT}`
30
- ];
31
- var GLOB_NEXTJS_OG = [
32
- `**/app/**/opengraph-image.[jt]s?(x)`,
33
- `**/app/**/twitter-image.[jt]s?(x)`,
34
- `**/app/**/route.[jt]s?(x)`
35
- ];
36
- var GLOB_NEXTJS_ROUTES = [
37
- `**/app/**/page.${GLOB_SRC_EXT}`,
38
- `**/app/**/layout.${GLOB_SRC_EXT}`,
39
- `**/app/**/error.${GLOB_SRC_EXT}`,
40
- `**/app/**/template.${GLOB_SRC_EXT}`,
41
- `**/app/**/not-found.${GLOB_SRC_EXT}`,
42
- `**/app/**/loading.${GLOB_SRC_EXT}`,
43
- `**/app/**/robots.${GLOB_SRC_EXT}`,
44
- `**/app/**/sitemap.${GLOB_SRC_EXT}`,
45
- `**/pages/**/*.${GLOB_SRC_EXT}`
46
- ];
47
- var GLOB_EXCLUDE = [
48
- "**/node_modules",
49
- "**/dist",
50
- "**/out",
51
- "**/build",
52
- "**/package-lock.json",
53
- "**/yarn.lock",
54
- "**/pnpm-lock.yaml",
55
- "**/bun.lockb",
56
- "**/output",
57
- "**/coverage",
58
- "**/temp",
59
- "**/.temp",
60
- "**/tmp",
61
- "**/.tmp",
62
- "**/.history",
63
- "**/.vitepress/cache",
64
- "**/.nuxt",
65
- "**/.next",
66
- "**/.vercel",
67
- "**/.netlify",
68
- "**/.changeset",
69
- "**/.idea",
70
- "**/.cache",
71
- "**/.output",
72
- "**/.vite-inspect",
73
- "**/.astro",
74
- "**/CHANGELOG*.md",
75
- "**/*.min.*",
76
- "**/LICENSE*",
77
- "**/__snapshots__",
78
- "**/auto-import?(s).d.ts",
79
- "**/components.d.ts"
80
- ];
81
-
82
- export {
83
- GLOB_SRC_EXT,
84
- GLOB_SRC,
85
- GLOB_JS,
86
- GLOB_JSX,
87
- GLOB_TS,
88
- GLOB_TSX,
89
- GLOB_STYLE,
90
- GLOB_CSS,
91
- GLOB_POSTCSS,
92
- GLOB_LESS,
93
- GLOB_SCSS,
94
- GLOB_JSON,
95
- GLOB_JSON5,
96
- GLOB_JSONC,
97
- GLOB_MARKDOWN,
98
- GLOB_MARKDOWN_IN_MARKDOWN,
99
- GLOB_VUE,
100
- GLOB_YAML,
101
- GLOB_TOML,
102
- GLOB_HTML,
103
- GLOB_ASTRO,
104
- GLOB_MARKDOWN_CODE,
105
- GLOB_TESTS,
106
- GLOB_NEXTJS_OG,
107
- GLOB_NEXTJS_ROUTES,
108
- GLOB_EXCLUDE
109
- };
@@ -1,92 +0,0 @@
1
- import {
2
- ensure,
3
- interop
4
- } from "./chunk-4YBQZLPS.mjs";
5
- import {
6
- GLOB_NEXTJS_OG,
7
- GLOB_NEXTJS_ROUTES,
8
- GLOB_SRC
9
- } from "./chunk-KOXCJL3C.mjs";
10
-
11
- // src/configs/nextjs.ts
12
- async function nextjs(options = {}) {
13
- const {
14
- files = [GLOB_SRC],
15
- overrides,
16
- rootDir
17
- } = options;
18
- await ensure([
19
- "@next/eslint-plugin-next"
20
- ]);
21
- const pluginNextjs = await interop(import("@next/eslint-plugin-next"));
22
- return [
23
- {
24
- name: "luxass:nextjs:setup",
25
- plugins: {
26
- "@next/next": pluginNextjs
27
- }
28
- },
29
- {
30
- name: "luxass:nextjs:rules",
31
- files,
32
- rules: {
33
- ...pluginNextjs.configs.recommended.rules,
34
- ...pluginNextjs.configs["core-web-vitals"].rules,
35
- "@next/next/google-font-display": ["error"],
36
- "@next/next/google-font-preconnect": ["error"],
37
- "@next/next/inline-script-id": ["error"],
38
- "@next/next/next-script-for-ga": ["warn"],
39
- "@next/next/no-assign-module-variable": ["error"],
40
- "@next/next/no-css-tags": ["warn"],
41
- "@next/next/no-document-import-in-page": ["error"],
42
- "@next/next/no-duplicate-head": ["error"],
43
- "@next/next/no-head-element": ["warn"],
44
- "@next/next/no-head-import-in-document": ["error"],
45
- "@next/next/no-html-link-for-pages": ["off"],
46
- "@next/next/no-img-element": ["warn"],
47
- "@next/next/no-page-custom-font": ["warn"],
48
- "@next/next/no-script-component-in-head": ["error"],
49
- "@next/next/no-styled-jsx-in-document": ["warn"],
50
- "@next/next/no-sync-scripts": ["warn"],
51
- "@next/next/no-title-in-document-head": ["warn"],
52
- "@next/next/no-typos": ["warn"],
53
- "@next/next/no-unwanted-polyfillio": ["warn"],
54
- // "jsx-a11y/anchor-is-valid": ["off"],
55
- // This rule creates errors with webpack parsing on edge runtime
56
- "unicorn/prefer-node-protocol": ["off"],
57
- ...overrides
58
- },
59
- settings: {
60
- next: {
61
- rootDir: rootDir ?? true
62
- },
63
- react: {
64
- pragma: "React",
65
- version: "detect"
66
- }
67
- }
68
- },
69
- {
70
- name: "luxass:nextjs:default-export-override",
71
- files: GLOB_NEXTJS_ROUTES,
72
- rules: {
73
- "import/prefer-default-export": "error",
74
- "react-refresh/only-export-components": "off"
75
- }
76
- },
77
- {
78
- name: "luxass:nextjs:og-override",
79
- files: GLOB_NEXTJS_OG,
80
- rules: {
81
- "@next/next/no-img-element": "off",
82
- "react/no-unknown-property": ["error", {
83
- ignore: ["tw"]
84
- }]
85
- }
86
- }
87
- ];
88
- }
89
-
90
- export {
91
- nextjs
92
- };