@eslint-sets/eslint-config 6.3.0 → 6.3.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/README.md CHANGED
@@ -33,7 +33,7 @@ Try it online with StackBlitz:
33
33
  - 📦 **Auto-detection** - Automatically detects installed frameworks
34
34
  - 🔧 **Highly Configurable** - Fine-grained control over enabled features
35
35
  - 🙈 **Git Ignore Support** - Automatically read `.gitignore` patterns (default: on)
36
- - 🛠️ **Disables Support** - Automatically disable strict rules in config files
36
+ - 🛠️ **Disables Support** - Automatically disable strict rules in config files and script directories (`scripts/`, `tasks/`, `tools/`, `cli/`, `bin/`)
37
37
  - 🖥️ **Command Support** - Relaxed rules for command-line scripts
38
38
  - 🏷️ **Project Types** - Support for `app` and `lib` project types
39
39
  - ♿ **Accessibility** - Optional a11y rules for Vue and React
@@ -50,7 +50,7 @@ Try it online with StackBlitz:
50
50
  | TypeScript | ✅ | Default enabled |
51
51
  | Vue | ✅ | Vue 2 & 3 support, with a11y option |
52
52
  | React | ✅ | With hooks, refresh, and React Compiler support |
53
- | Svelte | ✅ | |
53
+ | Svelte | ✅ | Svelte 5 runes support in `.svelte` and TS files |
54
54
  | Solid | ✅ | |
55
55
  | Next.js | ✅ | Requires `@next/eslint-plugin-next` |
56
56
  | Nuxt | ✅ | |
@@ -1 +1 @@
1
- {"version":3,"file":"disables.d.ts","sourceRoot":"","sources":["../../src/configs/disables.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAGpC;;;GAGG;AACH,wBAAgB,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,CA+C1C"}
1
+ {"version":3,"file":"disables.d.ts","sourceRoot":"","sources":["../../src/configs/disables.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAGpC;;;GAGG;AACH,wBAAgB,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,CA6D1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/configs/react.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,8BAA8B,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAI5G;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,gBAAgB,EAAE,8BAA8B,EAAE,0BAA0B;IACjH;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAEhB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;CACb;AA8BD;;;GAGG;AACH,wBAAsB,KAAK,CAAC,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CA6KhF"}
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/configs/react.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,8BAA8B,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAI5G;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,gBAAgB,EAAE,8BAA8B,EAAE,0BAA0B;IACjH;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAEhB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;CACb;AA8BD;;;GAGG;AACH,wBAAsB,KAAK,CAAC,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAmLhF"}
@@ -1 +1 @@
1
- {"version":3,"file":"svelte.d.ts","sourceRoot":"","sources":["../../src/configs/svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAQhD;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACtD;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACpB;AAED;;GAEG;AACH,wBAAsB,MAAM,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CA+DlF"}
1
+ {"version":3,"file":"svelte.d.ts","sourceRoot":"","sources":["../../src/configs/svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAQhD;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACtD;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACpB;AAED;;GAEG;AACH,wBAAsB,MAAM,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAwElF"}
package/dist/index.js CHANGED
@@ -474,6 +474,20 @@ function disables() {
474
474
  files: ["**/bin/**/*", `**/bin.${GLOB_SRC_EXT}`],
475
475
  rules: {}
476
476
  },
477
+ {
478
+ name: "eslint-sets/disables/tasks",
479
+ files: [`**/tasks/${GLOB_SRC}`],
480
+ rules: {
481
+ "no-console": "off"
482
+ }
483
+ },
484
+ {
485
+ name: "eslint-sets/disables/tools",
486
+ files: [`**/tools/${GLOB_SRC}`],
487
+ rules: {
488
+ "no-console": "off"
489
+ }
490
+ },
477
491
  {
478
492
  name: "eslint-sets/disables/dts",
479
493
  files: ["**/*.d.?([cm])ts"],
@@ -1030,7 +1044,7 @@ async function jsdoc(options = {}) {
1030
1044
  rules: {
1031
1045
  "jsdoc/check-access": "warn",
1032
1046
  "jsdoc/check-alignment": "warn",
1033
- "jsdoc/check-param-names": "warn",
1047
+ "jsdoc/check-param-names": ["warn", { checkDestructured: false, useDefaultObjectProperties: false }],
1034
1048
  "jsdoc/check-property-names": "warn",
1035
1049
  "jsdoc/check-types": "warn",
1036
1050
  "jsdoc/empty-tags": "warn",
@@ -1621,6 +1635,8 @@ async function react(options = {}) {
1621
1635
  const isUsingNext = hasNextjs();
1622
1636
  const allPlugins = pluginReact.configs.all.plugins;
1623
1637
  const hasRscPlugin = !!allPlugins["@eslint-react/rsc"];
1638
+ const hasNamespaceImportRule = "prefer-namespace-import" in pluginReact.rules;
1639
+ const namespaceImportRuleName = hasNamespaceImportRule ? "react/prefer-namespace-import" : "react/prefer-react-namespace-import";
1624
1640
  const recommendedRules = renameRules2(pluginReact.configs.recommended?.rules || {});
1625
1641
  const typeAwareRules = {
1626
1642
  "react/no-leaked-conditional-rendering": "warn",
@@ -1655,7 +1671,7 @@ async function react(options = {}) {
1655
1671
  // Use recommended rules from @eslint-react/eslint-plugin (renamed)
1656
1672
  ...recommendedRules,
1657
1673
  // Additional rules
1658
- "react/prefer-react-namespace-import": "error",
1674
+ [namespaceImportRuleName]: "error",
1659
1675
  // RSC (React Server Components) rules - only if plugin is available
1660
1676
  ...rsc && hasRscPlugin ? {
1661
1677
  "react-rsc/function-definition": "error"
@@ -2098,21 +2114,21 @@ async function svelte(options = {}) {
2098
2114
  if (!sveltePlugin || !svelteParser) {
2099
2115
  return [];
2100
2116
  }
2117
+ const svelteRunesGlobals = {
2118
+ $state: "readonly",
2119
+ $derived: "readonly",
2120
+ $effect: "readonly",
2121
+ $props: "readonly",
2122
+ $bindable: "readonly",
2123
+ $inspect: "readonly",
2124
+ $host: "readonly"
2125
+ };
2101
2126
  return [
2102
2127
  {
2103
2128
  name: "eslint-sets/svelte",
2104
2129
  files: [GLOB_SVELTE],
2105
2130
  languageOptions: {
2106
- globals: {
2107
- // Svelte 5 Runes
2108
- $state: "readonly",
2109
- $derived: "readonly",
2110
- $effect: "readonly",
2111
- $props: "readonly",
2112
- $bindable: "readonly",
2113
- $inspect: "readonly",
2114
- $host: "readonly"
2115
- },
2131
+ globals: svelteRunesGlobals,
2116
2132
  parser: svelteParser,
2117
2133
  parserOptions: {
2118
2134
  ecmaVersion: "latest",
@@ -2145,6 +2161,13 @@ async function svelte(options = {}) {
2145
2161
  // User overrides
2146
2162
  ...overrides
2147
2163
  }
2164
+ },
2165
+ {
2166
+ name: "eslint-sets/svelte/runes-in-ts",
2167
+ files: [`**/composables/${GLOB_SRC}`, `**/stores/${GLOB_SRC}`],
2168
+ languageOptions: {
2169
+ globals: svelteRunesGlobals
2170
+ }
2148
2171
  }
2149
2172
  ];
2150
2173
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@eslint-sets/eslint-config",
3
3
  "description": "Modern ESLint config with flat config support for Vue, React, Svelte, TypeScript, Next.js, Nuxt, Astro, Angular, UnoCSS and more",
4
4
  "type": "module",
5
- "version": "6.3.0",
5
+ "version": "6.3.1",
6
6
  "bin": {
7
7
  "eslint-sets": "./dist/cli/index.js"
8
8
  },