@luxass/eslint-config 4.2.6 → 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 (134) hide show
  1. package/README.md +4 -5
  2. package/dist/index.cjs +145 -446
  3. package/dist/index.d.cts +733 -12
  4. package/dist/index.d.ts +733 -12
  5. package/dist/{configs/index.cjs → index.js} +288 -516
  6. package/package.json +51 -85
  7. package/dist/chunk-2IR43M6N.mjs +0 -48
  8. package/dist/chunk-47ISSTHW.mjs +0 -291
  9. package/dist/chunk-4YBQZLPS.mjs +0 -68
  10. package/dist/chunk-4YT54JFZ.mjs +0 -48
  11. package/dist/chunk-5NK24IKQ.mjs +0 -26
  12. package/dist/chunk-AJS3TMZE.mjs +0 -63
  13. package/dist/chunk-C6FE5KXJ.mjs +0 -104
  14. package/dist/chunk-DAJA5AV3.mjs +0 -29
  15. package/dist/chunk-DCOLHWHC.mjs +0 -269
  16. package/dist/chunk-E4RVBKZB.mjs +0 -207
  17. package/dist/chunk-HZNHG5PB.mjs +0 -45
  18. package/dist/chunk-KOXCJL3C.mjs +0 -109
  19. package/dist/chunk-PFCAWBCD.mjs +0 -93
  20. package/dist/chunk-PFYV2TWZ.mjs +0 -117
  21. package/dist/chunk-QT6FHTFU.mjs +0 -92
  22. package/dist/chunk-RDZJT36Z.mjs +0 -57
  23. package/dist/chunk-RVSUTDCE.mjs +0 -57
  24. package/dist/chunk-TWAETZPX.mjs +0 -149
  25. package/dist/chunk-WSQOWO67.mjs +0 -16
  26. package/dist/chunk-XBASVDU6.mjs +0 -215
  27. package/dist/chunk-XD3UVRU7.mjs +0 -274
  28. package/dist/chunk-XGI647GZ.mjs +0 -81
  29. package/dist/chunk-XMXYE5WC.mjs +0 -183
  30. package/dist/chunk-YNMFVYL6.mjs +0 -69
  31. package/dist/chunk-YO3IYQ2L.mjs +0 -220
  32. package/dist/chunk-YZCJUX6Z.mjs +0 -0
  33. package/dist/configs/comments.cjs +0 -63
  34. package/dist/configs/comments.d.cts +0 -15
  35. package/dist/configs/comments.d.ts +0 -15
  36. package/dist/configs/comments.mjs +0 -6
  37. package/dist/configs/css/tailwindcss.cjs +0 -148
  38. package/dist/configs/css/tailwindcss.d.cts +0 -11
  39. package/dist/configs/css/tailwindcss.d.ts +0 -11
  40. package/dist/configs/css/tailwindcss.mjs +0 -8
  41. package/dist/configs/css/unocss.cjs +0 -133
  42. package/dist/configs/css/unocss.d.cts +0 -11
  43. package/dist/configs/css/unocss.d.ts +0 -11
  44. package/dist/configs/css/unocss.mjs +0 -8
  45. package/dist/configs/data/json.cjs +0 -155
  46. package/dist/configs/data/json.d.cts +0 -11
  47. package/dist/configs/data/json.d.ts +0 -11
  48. package/dist/configs/data/json.mjs +0 -8
  49. package/dist/configs/data/toml.cjs +0 -131
  50. package/dist/configs/data/toml.d.cts +0 -11
  51. package/dist/configs/data/toml.d.ts +0 -11
  52. package/dist/configs/data/toml.mjs +0 -8
  53. package/dist/configs/data/yaml.cjs +0 -143
  54. package/dist/configs/data/yaml.d.cts +0 -11
  55. package/dist/configs/data/yaml.d.ts +0 -11
  56. package/dist/configs/data/yaml.mjs +0 -8
  57. package/dist/configs/docs/jsdoc.cjs +0 -85
  58. package/dist/configs/docs/jsdoc.d.cts +0 -27
  59. package/dist/configs/docs/jsdoc.d.ts +0 -27
  60. package/dist/configs/docs/jsdoc.mjs +0 -7
  61. package/dist/configs/docs/markdown.cjs +0 -164
  62. package/dist/configs/docs/markdown.d.cts +0 -35
  63. package/dist/configs/docs/markdown.d.ts +0 -35
  64. package/dist/configs/docs/markdown.mjs +0 -8
  65. package/dist/configs/formatters.cjs +0 -274
  66. package/dist/configs/formatters.d.cts +0 -11
  67. package/dist/configs/formatters.d.ts +0 -11
  68. package/dist/configs/formatters.mjs +0 -9
  69. package/dist/configs/frameworks/astro.cjs +0 -179
  70. package/dist/configs/frameworks/astro.d.cts +0 -11
  71. package/dist/configs/frameworks/astro.d.ts +0 -11
  72. package/dist/configs/frameworks/astro.mjs +0 -8
  73. package/dist/configs/frameworks/nextjs.cjs +0 -180
  74. package/dist/configs/frameworks/nextjs.d.cts +0 -11
  75. package/dist/configs/frameworks/nextjs.d.ts +0 -11
  76. package/dist/configs/frameworks/nextjs.mjs +0 -8
  77. package/dist/configs/frameworks/react.cjs +0 -377
  78. package/dist/configs/frameworks/react.d.cts +0 -11
  79. package/dist/configs/frameworks/react.d.ts +0 -11
  80. package/dist/configs/frameworks/react.mjs +0 -8
  81. package/dist/configs/frameworks/solid.cjs +0 -360
  82. package/dist/configs/frameworks/solid.d.cts +0 -11
  83. package/dist/configs/frameworks/solid.d.ts +0 -11
  84. package/dist/configs/frameworks/solid.mjs +0 -8
  85. package/dist/configs/frameworks/vue.cjs +0 -293
  86. package/dist/configs/frameworks/vue.d.cts +0 -11
  87. package/dist/configs/frameworks/vue.d.ts +0 -11
  88. package/dist/configs/frameworks/vue.mjs +0 -8
  89. package/dist/configs/ignores.cjs +0 -96
  90. package/dist/configs/ignores.d.cts +0 -15
  91. package/dist/configs/ignores.d.ts +0 -15
  92. package/dist/configs/ignores.mjs +0 -7
  93. package/dist/configs/imports.cjs +0 -104
  94. package/dist/configs/imports.d.cts +0 -23
  95. package/dist/configs/imports.d.ts +0 -23
  96. package/dist/configs/imports.mjs +0 -7
  97. package/dist/configs/index.d.cts +0 -19
  98. package/dist/configs/index.d.ts +0 -19
  99. package/dist/configs/index.mjs +0 -99
  100. package/dist/configs/javascript.cjs +0 -324
  101. package/dist/configs/javascript.d.cts +0 -11
  102. package/dist/configs/javascript.d.ts +0 -11
  103. package/dist/configs/javascript.mjs +0 -7
  104. package/dist/configs/node.cjs +0 -60
  105. package/dist/configs/node.d.cts +0 -15
  106. package/dist/configs/node.d.ts +0 -15
  107. package/dist/configs/node.mjs +0 -6
  108. package/dist/configs/sort.cjs +0 -240
  109. package/dist/configs/sort.d.cts +0 -26
  110. package/dist/configs/sort.d.ts +0 -26
  111. package/dist/configs/sort.mjs +0 -8
  112. package/dist/configs/stylistic.cjs +0 -98
  113. package/dist/configs/stylistic.d.cts +0 -11
  114. package/dist/configs/stylistic.d.ts +0 -11
  115. package/dist/configs/stylistic.mjs +0 -9
  116. package/dist/configs/test.cjs +0 -210
  117. package/dist/configs/test.d.cts +0 -11
  118. package/dist/configs/test.d.ts +0 -11
  119. package/dist/configs/test.mjs +0 -8
  120. package/dist/configs/typescript.cjs +0 -291
  121. package/dist/configs/typescript.d.cts +0 -11
  122. package/dist/configs/typescript.d.ts +0 -11
  123. package/dist/configs/typescript.mjs +0 -8
  124. package/dist/configs/unicorn.cjs +0 -91
  125. package/dist/configs/unicorn.d.cts +0 -15
  126. package/dist/configs/unicorn.d.ts +0 -15
  127. package/dist/configs/unicorn.mjs +0 -6
  128. package/dist/globs.cjs +0 -158
  129. package/dist/globs.d.cts +0 -28
  130. package/dist/globs.d.ts +0 -28
  131. package/dist/globs.mjs +0 -56
  132. package/dist/index.mjs +0 -278
  133. package/dist/types-HqEzZfQU.d.cts +0 -668
  134. package/dist/types-HqEzZfQU.d.ts +0 -668
@@ -1,207 +0,0 @@
1
- import {
2
- ensure,
3
- interop
4
- } from "./chunk-4YBQZLPS.mjs";
5
- import {
6
- GLOB_VUE
7
- } from "./chunk-KOXCJL3C.mjs";
8
-
9
- // src/configs/frameworks/vue.ts
10
- import { mergeProcessors } from "eslint-merge-processors";
11
- async function vue(options = {}) {
12
- const {
13
- a11y = false,
14
- files = [GLOB_VUE],
15
- overrides = {},
16
- stylistic = true
17
- } = options;
18
- if (a11y) {
19
- await ensure(["eslint-plugin-vuejs-accessibility"]);
20
- }
21
- const [
22
- pluginVue,
23
- parserVue,
24
- processorVueBlocks,
25
- pluginA11y
26
- ] = await Promise.all([
27
- interop(import("eslint-plugin-vue")),
28
- interop(import("vue-eslint-parser")),
29
- interop(import("eslint-processor-vue-blocks")),
30
- ...a11y ? [interop(import("eslint-plugin-vuejs-accessibility"))] : []
31
- ]);
32
- const sfcBlocks = options.sfcBlocks === true ? {} : options.sfcBlocks ?? {};
33
- const {
34
- indent = 2
35
- } = typeof stylistic === "boolean" ? {} : stylistic;
36
- return [
37
- {
38
- name: "luxass:vue:setup",
39
- plugins: {
40
- vue: pluginVue,
41
- ...a11y ? { "vue-a11y": pluginA11y } : {}
42
- }
43
- },
44
- {
45
- name: "luxass:vue:rules",
46
- files,
47
- languageOptions: {
48
- parser: parserVue,
49
- parserOptions: {
50
- ecmaFeatures: {
51
- jsx: true
52
- },
53
- extraFileExtensions: [".vue"],
54
- parser: options.typescript ? await interop(import("@typescript-eslint/parser")) : null,
55
- sourceType: "module"
56
- }
57
- },
58
- processor: sfcBlocks === false ? pluginVue.processors[".vue"] : mergeProcessors([
59
- pluginVue.processors[".vue"],
60
- processorVueBlocks({
61
- ...sfcBlocks,
62
- blocks: {
63
- styles: true,
64
- ...sfcBlocks.blocks
65
- }
66
- })
67
- ]),
68
- rules: {
69
- ...pluginVue.configs.base.rules,
70
- ...pluginVue.configs["vue3-essential"].rules,
71
- ...pluginVue.configs["vue3-strongly-recommended"].rules,
72
- ...pluginVue.configs["vue3-recommended"].rules,
73
- "node/prefer-global/process": "off",
74
- "vue/block-order": [
75
- "error",
76
- {
77
- order: ["script", "template", "style"]
78
- }
79
- ],
80
- "vue/component-name-in-template-casing": ["error", "PascalCase"],
81
- "vue/component-options-name-casing": ["error", "PascalCase"],
82
- // this is deprecated
83
- "vue/component-tags-order": "off",
84
- "vue/custom-event-name-casing": ["error", "camelCase"],
85
- "vue/define-macros-order": [
86
- "error",
87
- {
88
- order: [
89
- "defineOptions",
90
- "defineProps",
91
- "defineEmits",
92
- "defineSlots"
93
- ]
94
- }
95
- ],
96
- "vue/dot-location": ["error", "property"],
97
- "vue/dot-notation": ["error", { allowKeywords: true }],
98
- "vue/eqeqeq": ["error", "smart"],
99
- "vue/html-indent": ["error", indent],
100
- "vue/html-quotes": ["error", "double"],
101
- "vue/max-attributes-per-line": "off",
102
- "vue/multi-word-component-names": "off",
103
- "vue/no-dupe-keys": "off",
104
- "vue/no-empty-pattern": "error",
105
- "vue/no-irregular-whitespace": "error",
106
- "vue/no-loss-of-precision": "error",
107
- "vue/no-restricted-syntax": [
108
- "error",
109
- "DebuggerStatement",
110
- "LabeledStatement",
111
- "WithStatement"
112
- ],
113
- "vue/no-restricted-v-bind": ["error", "/^v-/"],
114
- "vue/no-setup-props-reactivity-loss": "off",
115
- "vue/no-sparse-arrays": "error",
116
- "vue/no-unused-refs": "error",
117
- "vue/no-useless-v-bind": "error",
118
- "vue/no-v-html": "off",
119
- "vue/object-shorthand": [
120
- "error",
121
- "always",
122
- {
123
- avoidQuotes: true,
124
- ignoreConstructors: false
125
- }
126
- ],
127
- "vue/prefer-separate-static-class": "error",
128
- "vue/prefer-template": "error",
129
- "vue/prop-name-casing": ["error", "camelCase"],
130
- "vue/require-default-prop": "off",
131
- "vue/require-prop-types": "off",
132
- "vue/space-infix-ops": "error",
133
- "vue/space-unary-ops": ["error", { nonwords: false, words: true }],
134
- ...stylistic ? {
135
- "vue/array-bracket-spacing": ["error", "never"],
136
- "vue/arrow-spacing": ["error", { after: true, before: true }],
137
- "vue/block-spacing": ["error", "always"],
138
- "vue/block-tag-newline": [
139
- "error",
140
- {
141
- multiline: "always",
142
- singleline: "always"
143
- }
144
- ],
145
- "vue/brace-style": [
146
- "error",
147
- "stroustrup",
148
- { allowSingleLine: true }
149
- ],
150
- "vue/comma-dangle": ["error", "always-multiline"],
151
- "vue/comma-spacing": ["error", { after: true, before: false }],
152
- "vue/comma-style": ["error", "last"],
153
- "vue/html-comment-content-spacing": [
154
- "error",
155
- "always",
156
- {
157
- exceptions: ["-"]
158
- }
159
- ],
160
- "vue/key-spacing": [
161
- "error",
162
- { afterColon: true, beforeColon: false }
163
- ],
164
- "vue/keyword-spacing": ["error", { after: true, before: true }],
165
- "vue/object-curly-newline": "off",
166
- "vue/object-curly-spacing": ["error", "always"],
167
- "vue/object-property-newline": [
168
- "error",
169
- { allowMultiplePropertiesPerLine: true }
170
- ],
171
- "vue/operator-linebreak": ["error", "before"],
172
- "vue/padding-line-between-blocks": ["error", "always"],
173
- "vue/quote-props": ["error", "consistent-as-needed"],
174
- "vue/space-in-parens": ["error", "never"],
175
- "vue/template-curly-spacing": "error"
176
- } : {},
177
- ...a11y ? {
178
- "vue-a11y/alt-text": "error",
179
- "vue-a11y/anchor-has-content": "error",
180
- "vue-a11y/aria-props": "error",
181
- "vue-a11y/aria-role": "error",
182
- "vue-a11y/aria-unsupported-elements": "error",
183
- "vue-a11y/click-events-have-key-events": "error",
184
- "vue-a11y/form-control-has-label": "error",
185
- "vue-a11y/heading-has-content": "error",
186
- "vue-a11y/iframe-has-title": "error",
187
- "vue-a11y/interactive-supports-focus": "error",
188
- "vue-a11y/label-has-for": "error",
189
- "vue-a11y/media-has-caption": "error",
190
- "vue-a11y/mouse-events-have-key-events": "error",
191
- "vue-a11y/no-access-key": "error",
192
- "vue-a11y/no-autofocus": "error",
193
- "vue-a11y/no-distracting-elements": "error",
194
- "vue-a11y/no-redundant-roles": "error",
195
- "vue-a11y/no-static-element-interactions": "error",
196
- "vue-a11y/role-has-required-aria-props": "error",
197
- "vue-a11y/tabindex-no-positive": "error"
198
- } : {},
199
- ...overrides
200
- }
201
- }
202
- ];
203
- }
204
-
205
- export {
206
- vue
207
- };
@@ -1,45 +0,0 @@
1
- import {
2
- interop
3
- } from "./chunk-4YBQZLPS.mjs";
4
-
5
- // src/configs/docs/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,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,93 +0,0 @@
1
- import {
2
- interop
3
- } from "./chunk-4YBQZLPS.mjs";
4
- import {
5
- GLOB_JSON,
6
- GLOB_JSON5,
7
- GLOB_JSONC
8
- } from "./chunk-KOXCJL3C.mjs";
9
-
10
- // src/configs/data/json.ts
11
- async function jsonc(options = {}) {
12
- const {
13
- files = [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
14
- overrides = {},
15
- stylistic = true
16
- } = options;
17
- const [
18
- pluginJsonc,
19
- parserJsonc
20
- ] = await Promise.all([
21
- interop(import("eslint-plugin-jsonc")),
22
- interop(import("jsonc-eslint-parser"))
23
- ]);
24
- return [
25
- {
26
- name: "luxass:jsonc:setup",
27
- plugins: {
28
- jsonc: pluginJsonc
29
- }
30
- },
31
- {
32
- name: "luxass:jsonc:rules",
33
- files,
34
- languageOptions: {
35
- parser: parserJsonc
36
- },
37
- rules: {
38
- "jsonc/no-bigint-literals": "error",
39
- "jsonc/no-binary-expression": "error",
40
- "jsonc/no-binary-numeric-literals": "error",
41
- "jsonc/no-dupe-keys": "error",
42
- "jsonc/no-escape-sequence-in-identifier": "error",
43
- "jsonc/no-floating-decimal": "error",
44
- "jsonc/no-hexadecimal-numeric-literals": "error",
45
- "jsonc/no-infinity": "error",
46
- "jsonc/no-multi-str": "error",
47
- "jsonc/no-nan": "error",
48
- "jsonc/no-number-props": "error",
49
- "jsonc/no-numeric-separators": "error",
50
- "jsonc/no-octal": "error",
51
- "jsonc/no-octal-escape": "error",
52
- "jsonc/no-octal-numeric-literals": "error",
53
- "jsonc/no-parenthesized": "error",
54
- "jsonc/no-plus-sign": "error",
55
- "jsonc/no-regexp-literals": "error",
56
- "jsonc/no-sparse-arrays": "error",
57
- "jsonc/no-template-literals": "error",
58
- "jsonc/no-undefined-value": "error",
59
- "jsonc/no-unicode-codepoint-escapes": "error",
60
- "jsonc/no-useless-escape": "error",
61
- "jsonc/space-unary-ops": "error",
62
- "jsonc/valid-json-number": "error",
63
- "jsonc/vue-custom-block/no-parsing-error": "error",
64
- ...stylistic ? {
65
- "jsonc/array-bracket-spacing": ["error", "never"],
66
- "jsonc/comma-dangle": ["error", "never"],
67
- "jsonc/comma-style": ["error", "last"],
68
- "jsonc/indent": ["error", 2],
69
- "jsonc/key-spacing": [
70
- "error",
71
- { afterColon: true, beforeColon: false }
72
- ],
73
- "jsonc/object-curly-newline": [
74
- "error",
75
- { consistent: true, multiline: true }
76
- ],
77
- "jsonc/object-curly-spacing": ["error", "always"],
78
- "jsonc/object-property-newline": [
79
- "error",
80
- { allowMultiplePropertiesPerLine: true }
81
- ],
82
- "jsonc/quote-props": "error",
83
- "jsonc/quotes": "error"
84
- } : {},
85
- ...overrides
86
- }
87
- }
88
- ];
89
- }
90
-
91
- export {
92
- jsonc
93
- };
@@ -1,117 +0,0 @@
1
- import {
2
- interop
3
- } from "./chunk-4YBQZLPS.mjs";
4
- import {
5
- GLOB_ASTRO
6
- } from "./chunk-KOXCJL3C.mjs";
7
-
8
- // src/configs/frameworks/astro.ts
9
- async function astro(options) {
10
- const {
11
- a11y = false,
12
- files = [GLOB_ASTRO],
13
- overrides = {},
14
- typescript = true
15
- } = options;
16
- const [
17
- pluginAstro,
18
- parserAstro,
19
- pluginA11y
20
- ] = await Promise.all([
21
- interop(import("eslint-plugin-astro")),
22
- interop(import("astro-eslint-parser")),
23
- ...a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
24
- ]);
25
- return [
26
- {
27
- name: "luxass:astro:setup",
28
- plugins: {
29
- astro: pluginAstro,
30
- ...a11y ? { "jsx-a11y": pluginA11y } : {}
31
- }
32
- },
33
- {
34
- name: "luxass:astro:rules",
35
- files,
36
- languageOptions: {
37
- globals: {
38
- "astro/astro": true,
39
- "es2020": true,
40
- "node": true
41
- },
42
- parser: parserAstro,
43
- parserOptions: {
44
- extraFileExtensions: [".astro"],
45
- parser: typescript ? await interop(import("@typescript-eslint/parser")) : null,
46
- sourceType: "module"
47
- }
48
- },
49
- rules: {
50
- // Disallow conflicting set directives and child contents
51
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-conflict-set-directives/
52
- "astro/no-conflict-set-directives": "error",
53
- // Disallow using deprecated Astro.canonicalURL
54
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-canonicalurl/
55
- "astro/no-deprecated-astro-canonicalurl": "error",
56
- // Disallow using deprecated Astro.fetchContent()
57
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-fetchcontent/
58
- "astro/no-deprecated-astro-fetchcontent": "error",
59
- // Disallow using deprecated Astro.resolve()
60
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-resolve/
61
- "astro/no-deprecated-astro-resolve": "error",
62
- // Disallow using deprecated getEntryBySlug()
63
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-getentrybyslug/
64
- "astro/no-deprecated-getentrybyslug": "error",
65
- // Disallow unused define:vars={...} in style tag
66
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-define-vars-in-style/
67
- "astro/no-unused-define-vars-in-style": "error",
68
- // Disallow warnings when compiling
69
- // https://ota-meshi.github.io/eslint-plugin-astro/rules/valid-compile/
70
- "astro/valid-compile": "error",
71
- "style/jsx-closing-tag-location": "off",
72
- "style/jsx-indent": "off",
73
- "style/jsx-one-expression-per-line": "off",
74
- "style/multiline-ternary": ["error", "never"],
75
- ...overrides
76
- }
77
- },
78
- {
79
- name: "luxass:astro:scripts-js",
80
- files: [
81
- "**/*.astro/*.js",
82
- "*.astro/*.js"
83
- ],
84
- languageOptions: {
85
- globals: {
86
- browser: true,
87
- es2020: true
88
- },
89
- parserOptions: {
90
- sourceType: "module"
91
- }
92
- }
93
- },
94
- {
95
- name: "luxass:astro:scripts-ts",
96
- files: [
97
- "**/*.astro/*.ts",
98
- "*.astro/*.ts"
99
- ],
100
- languageOptions: {
101
- globals: {
102
- browser: true,
103
- es2020: true
104
- },
105
- parser: typescript ? await interop(import("@typescript-eslint/parser")) : null,
106
- parserOptions: {
107
- project: null,
108
- sourceType: "module"
109
- }
110
- }
111
- }
112
- ];
113
- }
114
-
115
- export {
116
- astro
117
- };
@@ -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/frameworks/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
- };