@tb-dev/eslint-config 5.7.0 → 5.7.1
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/index.cjs +29 -0
- package/dist/index.js +29 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -280,6 +280,34 @@ async function vue(options) {
|
|
|
280
280
|
];
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
+
async function svelte(options) {
|
|
284
|
+
if (!isEnabled(options.features, "svelte")) return [];
|
|
285
|
+
const [sveltePlugin, svelteParser, tsParser] = await Promise.all([
|
|
286
|
+
interopDefault(import('eslint-plugin-svelte')),
|
|
287
|
+
interopDefault(import('svelte-eslint-parser')),
|
|
288
|
+
interopDefault(import('@typescript-eslint/parser'))
|
|
289
|
+
]);
|
|
290
|
+
const rules = {
|
|
291
|
+
...sveltePlugin.configs.recommended,
|
|
292
|
+
...options.overrides?.svelte
|
|
293
|
+
};
|
|
294
|
+
return [
|
|
295
|
+
{ plugins: { svelte: sveltePlugin } },
|
|
296
|
+
{
|
|
297
|
+
files: [Glob.Svelte],
|
|
298
|
+
languageOptions: {
|
|
299
|
+
parser: svelteParser,
|
|
300
|
+
parserOptions: {
|
|
301
|
+
parser: tsParser,
|
|
302
|
+
project: options.project,
|
|
303
|
+
extraFileExtensions: [".svelte"]
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
{ rules }
|
|
308
|
+
];
|
|
309
|
+
}
|
|
310
|
+
|
|
283
311
|
async function unicorn(options) {
|
|
284
312
|
if (!isEnabled(options.features, "unicorn")) return {};
|
|
285
313
|
const plugin = await interopDefault(import('eslint-plugin-unicorn'));
|
|
@@ -901,6 +929,7 @@ async function defineConfig(options) {
|
|
|
901
929
|
javascript(options),
|
|
902
930
|
typescript(options),
|
|
903
931
|
...await vue(options),
|
|
932
|
+
...await svelte(options),
|
|
904
933
|
perfectionist(options),
|
|
905
934
|
unicorn(options),
|
|
906
935
|
tailwind(options),
|
package/dist/index.js
CHANGED
|
@@ -276,6 +276,34 @@ async function vue(options) {
|
|
|
276
276
|
];
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
+
async function svelte(options) {
|
|
280
|
+
if (!isEnabled(options.features, "svelte")) return [];
|
|
281
|
+
const [sveltePlugin, svelteParser, tsParser] = await Promise.all([
|
|
282
|
+
interopDefault(import('eslint-plugin-svelte')),
|
|
283
|
+
interopDefault(import('svelte-eslint-parser')),
|
|
284
|
+
interopDefault(import('@typescript-eslint/parser'))
|
|
285
|
+
]);
|
|
286
|
+
const rules = {
|
|
287
|
+
...sveltePlugin.configs.recommended,
|
|
288
|
+
...options.overrides?.svelte
|
|
289
|
+
};
|
|
290
|
+
return [
|
|
291
|
+
{ plugins: { svelte: sveltePlugin } },
|
|
292
|
+
{
|
|
293
|
+
files: [Glob.Svelte],
|
|
294
|
+
languageOptions: {
|
|
295
|
+
parser: svelteParser,
|
|
296
|
+
parserOptions: {
|
|
297
|
+
parser: tsParser,
|
|
298
|
+
project: options.project,
|
|
299
|
+
extraFileExtensions: [".svelte"]
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
{ rules }
|
|
304
|
+
];
|
|
305
|
+
}
|
|
306
|
+
|
|
279
307
|
async function unicorn(options) {
|
|
280
308
|
if (!isEnabled(options.features, "unicorn")) return {};
|
|
281
309
|
const plugin = await interopDefault(import('eslint-plugin-unicorn'));
|
|
@@ -897,6 +925,7 @@ async function defineConfig(options) {
|
|
|
897
925
|
javascript(options),
|
|
898
926
|
typescript(options),
|
|
899
927
|
...await vue(options),
|
|
928
|
+
...await svelte(options),
|
|
900
929
|
perfectionist(options),
|
|
901
930
|
unicorn(options),
|
|
902
931
|
tailwind(options),
|