@tb-dev/eslint-config 5.7.0 → 5.7.2

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 CHANGED
@@ -280,6 +280,36 @@ 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
+ {
296
+ plugins: { svelte: sveltePlugin },
297
+ rules
298
+ },
299
+ {
300
+ files: [Glob.Svelte],
301
+ languageOptions: {
302
+ parser: svelteParser,
303
+ parserOptions: {
304
+ parser: tsParser,
305
+ project: options.project,
306
+ extraFileExtensions: [".svelte"]
307
+ }
308
+ }
309
+ }
310
+ ];
311
+ }
312
+
283
313
  async function unicorn(options) {
284
314
  if (!isEnabled(options.features, "unicorn")) return {};
285
315
  const plugin = await interopDefault(import('eslint-plugin-unicorn'));
@@ -901,6 +931,7 @@ async function defineConfig(options) {
901
931
  javascript(options),
902
932
  typescript(options),
903
933
  ...await vue(options),
934
+ ...await svelte(options),
904
935
  perfectionist(options),
905
936
  unicorn(options),
906
937
  tailwind(options),
package/dist/index.js CHANGED
@@ -276,6 +276,36 @@ 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
+ {
292
+ plugins: { svelte: sveltePlugin },
293
+ rules
294
+ },
295
+ {
296
+ files: [Glob.Svelte],
297
+ languageOptions: {
298
+ parser: svelteParser,
299
+ parserOptions: {
300
+ parser: tsParser,
301
+ project: options.project,
302
+ extraFileExtensions: [".svelte"]
303
+ }
304
+ }
305
+ }
306
+ ];
307
+ }
308
+
279
309
  async function unicorn(options) {
280
310
  if (!isEnabled(options.features, "unicorn")) return {};
281
311
  const plugin = await interopDefault(import('eslint-plugin-unicorn'));
@@ -897,6 +927,7 @@ async function defineConfig(options) {
897
927
  javascript(options),
898
928
  typescript(options),
899
929
  ...await vue(options),
930
+ ...await svelte(options),
900
931
  perfectionist(options),
901
932
  unicorn(options),
902
933
  tailwind(options),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/eslint-config",
3
- "version": "5.7.0",
3
+ "version": "5.7.2",
4
4
  "description": "ESLint config",
5
5
  "license": "MIT",
6
6
  "type": "module",