@luxass/eslint-config 4.2.3 → 4.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-IASQD7KX.mjs → chunk-3ZMCYBTA.mjs} +2 -14
- package/dist/chunk-MX3BZIQW.mjs +117 -0
- package/dist/{chunk-K6TLNQJF.mjs → chunk-RAIFRO2A.mjs} +0 -1
- package/dist/configs/astro.cjs +45 -7
- package/dist/configs/astro.d.cts +1 -1
- package/dist/configs/astro.d.ts +1 -1
- package/dist/configs/astro.mjs +1 -1
- package/dist/configs/comments.d.cts +1 -1
- package/dist/configs/comments.d.ts +1 -1
- package/dist/configs/formatters.d.cts +1 -1
- package/dist/configs/formatters.d.ts +1 -1
- package/dist/configs/ignores.d.cts +1 -1
- package/dist/configs/ignores.d.ts +1 -1
- package/dist/configs/imports.d.cts +1 -1
- package/dist/configs/imports.d.ts +1 -1
- package/dist/configs/index.cjs +373 -22
- package/dist/configs/index.d.cts +1 -1
- package/dist/configs/index.d.ts +1 -1
- package/dist/configs/index.mjs +12 -4
- package/dist/configs/javascript.cjs +0 -1
- package/dist/configs/javascript.d.cts +1 -1
- package/dist/configs/javascript.d.ts +1 -1
- package/dist/configs/javascript.mjs +1 -1
- package/dist/configs/jsdoc.d.cts +1 -1
- package/dist/configs/jsdoc.d.ts +1 -1
- package/dist/configs/jsonc.d.cts +1 -1
- package/dist/configs/jsonc.d.ts +1 -1
- package/dist/configs/markdown.d.cts +1 -1
- package/dist/configs/markdown.d.ts +1 -1
- package/dist/configs/nextjs.d.cts +1 -1
- package/dist/configs/nextjs.d.ts +1 -1
- package/dist/configs/node.d.cts +1 -1
- package/dist/configs/node.d.ts +1 -1
- package/dist/configs/perfectionist.d.cts +1 -1
- package/dist/configs/perfectionist.d.ts +1 -1
- package/dist/configs/react.d.cts +1 -1
- package/dist/configs/react.d.ts +1 -1
- package/dist/configs/solid.d.cts +1 -1
- package/dist/configs/solid.d.ts +1 -1
- package/dist/configs/sort.d.cts +1 -1
- package/dist/configs/sort.d.ts +1 -1
- package/dist/configs/stylistic.d.cts +1 -1
- package/dist/configs/stylistic.d.ts +1 -1
- package/dist/configs/tailwindcss.d.cts +1 -1
- package/dist/configs/tailwindcss.d.ts +1 -1
- package/dist/configs/test.d.cts +1 -1
- package/dist/configs/test.d.ts +1 -1
- package/dist/configs/toml.d.cts +1 -1
- package/dist/configs/toml.d.ts +1 -1
- package/dist/configs/typescript.cjs +2 -14
- package/dist/configs/typescript.d.cts +1 -1
- package/dist/configs/typescript.d.ts +1 -1
- package/dist/configs/typescript.mjs +1 -1
- package/dist/configs/unicorn.d.cts +1 -1
- package/dist/configs/unicorn.d.ts +1 -1
- package/dist/configs/unocss.d.cts +1 -1
- package/dist/configs/unocss.d.ts +1 -1
- package/dist/configs/vue.d.cts +1 -1
- package/dist/configs/vue.d.ts +1 -1
- package/dist/configs/yaml.d.cts +1 -1
- package/dist/configs/yaml.d.ts +1 -1
- package/dist/index.cjs +60 -35
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +10 -10
- package/dist/{types-A-NO9UF1.d.cts → types-HqEzZfQU.d.cts} +6 -6
- package/dist/{types-A-NO9UF1.d.ts → types-HqEzZfQU.d.ts} +6 -6
- package/package.json +1 -1
- package/dist/chunk-GBLPCM3X.mjs +0 -79
- /package/dist/{chunk-ME2OAMS3.mjs → chunk-YGZJUKJC.mjs} +0 -0
|
@@ -58,7 +58,7 @@ async function typescript(options = {}) {
|
|
|
58
58
|
return {
|
|
59
59
|
files: files2,
|
|
60
60
|
...ignores ? { ignores } : {},
|
|
61
|
-
name: `
|
|
61
|
+
name: `luxass:typescript:${typeAware ? "type-aware-parser" : "parser"}`,
|
|
62
62
|
languageOptions: {
|
|
63
63
|
parser: parserTs,
|
|
64
64
|
parserOptions: {
|
|
@@ -89,18 +89,6 @@ async function typescript(options = {}) {
|
|
|
89
89
|
{
|
|
90
90
|
name: "luxass:typescript:rules",
|
|
91
91
|
files,
|
|
92
|
-
languageOptions: {
|
|
93
|
-
parser: parserTs,
|
|
94
|
-
parserOptions: {
|
|
95
|
-
extraFileExtensions: exts.map((ext) => `.${ext}`),
|
|
96
|
-
sourceType: "module",
|
|
97
|
-
...tsconfigPath ? {
|
|
98
|
-
project: tsconfigPath,
|
|
99
|
-
tsconfigRootDir: process.cwd()
|
|
100
|
-
} : {},
|
|
101
|
-
...parserOptions
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
92
|
rules: {
|
|
105
93
|
...renameRules(
|
|
106
94
|
pluginTs.configs["eslint-recommended"].overrides[0].rules,
|
|
@@ -185,7 +173,7 @@ async function typescript(options = {}) {
|
|
|
185
173
|
}
|
|
186
174
|
},
|
|
187
175
|
{
|
|
188
|
-
name: "
|
|
176
|
+
name: "luxass:typescript:rules-type-aware",
|
|
189
177
|
files: filesTypeAware,
|
|
190
178
|
rules: {
|
|
191
179
|
...tsconfigPath ? typeAwareRules : {},
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import {
|
|
2
|
+
interop
|
|
3
|
+
} from "./chunk-4YBQZLPS.mjs";
|
|
4
|
+
import {
|
|
5
|
+
GLOB_ASTRO
|
|
6
|
+
} from "./chunk-ATRL3UZP.mjs";
|
|
7
|
+
|
|
8
|
+
// src/configs/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
|
+
};
|
package/dist/configs/astro.cjs
CHANGED
|
@@ -96,9 +96,10 @@ async function astro(options) {
|
|
|
96
96
|
name: "luxass:astro:rules",
|
|
97
97
|
files,
|
|
98
98
|
languageOptions: {
|
|
99
|
-
// @ts-expect-error hmmm
|
|
100
99
|
globals: {
|
|
101
|
-
|
|
100
|
+
"astro/astro": true,
|
|
101
|
+
"es2020": true,
|
|
102
|
+
"node": true
|
|
102
103
|
},
|
|
103
104
|
parser: parserAstro,
|
|
104
105
|
parserOptions: {
|
|
@@ -107,31 +108,68 @@ async function astro(options) {
|
|
|
107
108
|
sourceType: "module"
|
|
108
109
|
}
|
|
109
110
|
},
|
|
110
|
-
// @ts-expect-error hmmm
|
|
111
111
|
rules: {
|
|
112
|
+
// Disallow conflicting set directives and child contents
|
|
113
|
+
// https://ota-meshi.github.io/eslint-plugin-astro/rules/no-conflict-set-directives/
|
|
114
|
+
"astro/no-conflict-set-directives": "error",
|
|
115
|
+
// Disallow using deprecated Astro.canonicalURL
|
|
116
|
+
// https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-canonicalurl/
|
|
117
|
+
"astro/no-deprecated-astro-canonicalurl": "error",
|
|
118
|
+
// Disallow using deprecated Astro.fetchContent()
|
|
119
|
+
// https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-fetchcontent/
|
|
120
|
+
"astro/no-deprecated-astro-fetchcontent": "error",
|
|
121
|
+
// Disallow using deprecated Astro.resolve()
|
|
122
|
+
// https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-resolve/
|
|
123
|
+
"astro/no-deprecated-astro-resolve": "error",
|
|
124
|
+
// Disallow using deprecated getEntryBySlug()
|
|
125
|
+
// https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-getentrybyslug/
|
|
126
|
+
"astro/no-deprecated-getentrybyslug": "error",
|
|
127
|
+
// Disallow unused define:vars={...} in style tag
|
|
128
|
+
// https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-define-vars-in-style/
|
|
129
|
+
"astro/no-unused-define-vars-in-style": "error",
|
|
130
|
+
// Disallow warnings when compiling
|
|
131
|
+
// https://ota-meshi.github.io/eslint-plugin-astro/rules/valid-compile/
|
|
132
|
+
"astro/valid-compile": "error",
|
|
112
133
|
"style/jsx-closing-tag-location": "off",
|
|
113
134
|
"style/jsx-indent": "off",
|
|
114
135
|
"style/jsx-one-expression-per-line": "off",
|
|
115
|
-
...pluginAstro.configs.all.rules,
|
|
116
136
|
"style/multiline-ternary": ["error", "never"],
|
|
117
137
|
...overrides
|
|
118
138
|
}
|
|
119
139
|
},
|
|
120
140
|
{
|
|
121
|
-
name: "luxass:astro:
|
|
141
|
+
name: "luxass:astro:scripts-js",
|
|
122
142
|
files: [
|
|
123
143
|
"**/*.astro/*.js",
|
|
124
144
|
"*.astro/*.js"
|
|
125
145
|
],
|
|
126
146
|
languageOptions: {
|
|
127
|
-
// @ts-expect-error hmmm
|
|
128
147
|
globals: {
|
|
129
|
-
|
|
148
|
+
browser: true,
|
|
149
|
+
es2020: true
|
|
130
150
|
},
|
|
131
151
|
parserOptions: {
|
|
132
152
|
sourceType: "module"
|
|
133
153
|
}
|
|
134
154
|
}
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: "luxass:astro:scripts-ts",
|
|
158
|
+
files: [
|
|
159
|
+
"**/*.astro/*.ts",
|
|
160
|
+
"*.astro/*.ts"
|
|
161
|
+
],
|
|
162
|
+
languageOptions: {
|
|
163
|
+
globals: {
|
|
164
|
+
browser: true,
|
|
165
|
+
es2020: true
|
|
166
|
+
},
|
|
167
|
+
parser: typescript ? await interop(import("@typescript-eslint/parser")) : null,
|
|
168
|
+
parserOptions: {
|
|
169
|
+
project: null,
|
|
170
|
+
sourceType: "module"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
135
173
|
}
|
|
136
174
|
];
|
|
137
175
|
}
|
package/dist/configs/astro.d.cts
CHANGED
package/dist/configs/astro.d.ts
CHANGED
package/dist/configs/astro.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { F as FormattersOptions, i as formatters } from '../types-
|
|
1
|
+
export { F as FormattersOptions, i as formatters } from '../types-HqEzZfQU.cjs';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
3
|
import '@antfu/eslint-define-config';
|
|
4
4
|
import '@eslint-types/jsdoc/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { F as FormattersOptions, i as formatters } from '../types-
|
|
1
|
+
export { F as FormattersOptions, i as formatters } from '../types-HqEzZfQU.js';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
3
|
import '@antfu/eslint-define-config';
|
|
4
4
|
import '@eslint-types/jsdoc/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StylisticConfig,
|
|
1
|
+
import { S as StylisticConfig, p as FlatConfigItem } from '../types-HqEzZfQU.cjs';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
3
|
import '@antfu/eslint-define-config';
|
|
4
4
|
import '@eslint-types/jsdoc/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StylisticConfig,
|
|
1
|
+
import { S as StylisticConfig, p as FlatConfigItem } from '../types-HqEzZfQU.js';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
3
|
import '@antfu/eslint-define-config';
|
|
4
4
|
import '@eslint-types/jsdoc/types';
|