@tb-dev/eslint-config 5.6.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 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.d.ts CHANGED
@@ -22,6 +22,7 @@ declare interface ConfigOptions {
22
22
  overrides?: {
23
23
  javascript?: Rules;
24
24
  perfectionist?: Rules;
25
+ svelte?: Rules;
25
26
  tailwind?: Rules;
26
27
  typescript?: Rules;
27
28
  unicorn?: Rules;
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),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/eslint-config",
3
- "version": "5.6.0",
3
+ "version": "5.7.1",
4
4
  "description": "ESLint config",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -20,13 +20,15 @@
20
20
  "vue"
21
21
  ],
22
22
  "dependencies": {
23
- "@typescript-eslint/eslint-plugin": "^8.18.0",
24
- "@typescript-eslint/parser": "^8.18.0",
25
- "eslint-plugin-perfectionist": "^4.3.0",
23
+ "@typescript-eslint/eslint-plugin": "^8.18.2",
24
+ "@typescript-eslint/parser": "^8.18.2",
25
+ "eslint-plugin-perfectionist": "^4.4.0",
26
+ "eslint-plugin-svelte": "^2.46.1",
26
27
  "eslint-plugin-tailwindcss": "^3.17.5",
27
28
  "eslint-plugin-unicorn": "^56.0.1",
28
29
  "eslint-plugin-vue": "^9.32.0",
29
- "globals": "^15.13.0",
30
+ "globals": "^15.14.0",
31
+ "svelte-eslint-parser": "^0.43.0",
30
32
  "vue-eslint-parser": "^9.4.3"
31
33
  },
32
34
  "devDependencies": {
@@ -35,8 +37,8 @@
35
37
  "prettier": "^3.4.2",
36
38
  "tslib": "^2.8.1",
37
39
  "typescript": "^5.7.2",
38
- "vite": "^6.0.3",
39
- "vite-plugin-dts": "^4.3.0"
40
+ "vite": "^6.0.5",
41
+ "vite-plugin-dts": "^4.4.0"
40
42
  },
41
43
  "peerDependencies": {
42
44
  "eslint": "^9.8.0",