@eslint-sets/eslint-config 6.2.0-beta.2 → 6.2.0-beta.3

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
@@ -41,7 +41,7 @@ Try it online with StackBlitz:
41
41
  - 🔍 **Editor Detection** - Automatically detect editor environment
42
42
  - 🔎 **Config Inspector** - Visual tool for inspecting your ESLint config
43
43
  - 📊 **Perfectionist Sorting** - Import/export sorting with natural ordering
44
- - 🔄 **CJS & ESM Support** - Works with both CommonJS and ES Module config files
44
+ - 🚀 **ESM-only** - Modern ESM package for optimal compatibility
45
45
 
46
46
  ## Supported Frameworks
47
47
 
@@ -84,6 +84,7 @@ bun add -D @eslint-sets/eslint-config eslint
84
84
 
85
85
  - **Node.js**: `^18.18.0` or `^20.9.0` or `>=21.1.0`
86
86
  - **ESLint**: `^9.10.0` or `^9.22.0`
87
+ - **Config file**: Must use `eslint.config.ts` or `eslint.config.mjs` (ESM format required)
87
88
 
88
89
  > Note: `eslint-plugin-toml` requires Node.js `^20.19.0 || ^22.13.0 || >=24`. If you need TOML support on Node.js 18, consider downgrading to `eslint-plugin-toml@0.13.1`.
89
90
 
@@ -65,5 +65,5 @@ export declare const StylisticConfigDefaults: StylisticOptions;
65
65
  /**
66
66
  * Stylistic configuration
67
67
  */
68
- export declare function stylistic(options?: StylisticOptions): Linter.Config[];
68
+ export declare function stylistic(options?: StylisticOptions): Promise<Linter.Config[]>;
69
69
  //# sourceMappingURL=stylistic.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stylistic.d.ts","sourceRoot":"","sources":["../../src/configs/stylistic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAIpC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,YA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;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,GAAG,eAAe,CAAA;IAE7C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,WAAW,CAAA;IAE9B;;;OAGG;IACH,UAAU,CAAC,EAAE,QAAQ,GAAG,WAAW,GAAG,YAAY,GAAG,sBAAsB,CAAA;IAE3E;;;OAGG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAE5B;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;OAGG;IACH,aAAa,CAAC,EAAE,kBAAkB,GAAG,QAAQ,GAAG,OAAO,GAAG,gBAAgB,CAAA;CAC1E;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAWrC,CAAA;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAyHxF"}
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ const __importMetaUrl=require('url').pathToFileURL(__filename).href;
1
2
  "use strict";
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
@@ -1857,7 +1858,6 @@ async function sortTsconfig(options = {}) {
1857
1858
  }
1858
1859
 
1859
1860
  // src/configs/stylistic.ts
1860
- var import_eslint_plugin = __toESM(require("@stylistic/eslint-plugin"));
1861
1861
  var StylisticConfigDefaults = {
1862
1862
  arrowParens: true,
1863
1863
  braceStyle: "1tbs",
@@ -1870,7 +1870,7 @@ var StylisticConfigDefaults = {
1870
1870
  semi: false,
1871
1871
  trailingComma: "always-multiline"
1872
1872
  };
1873
- function stylistic(options = {}) {
1873
+ async function stylistic(options = {}) {
1874
1874
  const {
1875
1875
  arrowParens,
1876
1876
  braceStyle,
@@ -1887,7 +1887,8 @@ function stylistic(options = {}) {
1887
1887
  ...StylisticConfigDefaults,
1888
1888
  ...options
1889
1889
  };
1890
- const config2 = import_eslint_plugin.default.configs.customize({
1890
+ const stylisticPlugin = await interopDefault(import("@stylistic/eslint-plugin"));
1891
+ const config2 = stylisticPlugin.configs.customize({
1891
1892
  arrowParens,
1892
1893
  blockSpacing: true,
1893
1894
  braceStyle,
@@ -1905,7 +1906,7 @@ function stylistic(options = {}) {
1905
1906
  files: [GLOB_SRC],
1906
1907
  name: "eslint-sets/stylistic",
1907
1908
  plugins: {
1908
- "@stylistic": import_eslint_plugin.default
1909
+ "@stylistic": stylisticPlugin
1909
1910
  },
1910
1911
  rules: {
1911
1912
  // Base rules from customize
@@ -2035,17 +2036,17 @@ async function svelte(options = {}) {
2035
2036
  }
2036
2037
 
2037
2038
  // src/configs/test.ts
2038
- var import_eslint_plugin2 = __toESM(require("@vitest/eslint-plugin"));
2039
+ var import_eslint_plugin = __toESM(require("@vitest/eslint-plugin"));
2039
2040
  function test(options = {}) {
2040
2041
  const { overrides = {} } = options;
2041
2042
  return {
2042
2043
  files: [GLOB_TESTS],
2043
2044
  name: "eslint-sets/test",
2044
2045
  plugins: {
2045
- vitest: import_eslint_plugin2.default
2046
+ vitest: import_eslint_plugin.default
2046
2047
  },
2047
2048
  rules: {
2048
- ...import_eslint_plugin2.default.configs.recommended.rules,
2049
+ ...import_eslint_plugin.default.configs.recommended.rules,
2049
2050
  // Relax rules for test files
2050
2051
  "no-console": "off",
2051
2052
  "ts/no-explicit-any": "off",
@@ -2732,7 +2733,7 @@ async function config(options = {}) {
2732
2733
  }
2733
2734
  if (stylisticOption !== false && stylisticOption !== void 0) {
2734
2735
  const stylisticOpts = typeof stylisticOption === "object" ? stylisticOption : {};
2735
- configs.push(...stylistic(stylisticOpts));
2736
+ configs.push(...await stylistic(stylisticOpts));
2736
2737
  }
2737
2738
  if (prettierOption !== false && stylisticOption === false) {
2738
2739
  const prettierOpts = typeof prettierOption === "object" ? prettierOption : {};
package/dist/index.mjs CHANGED
@@ -1728,7 +1728,6 @@ async function sortTsconfig(options = {}) {
1728
1728
  }
1729
1729
 
1730
1730
  // src/configs/stylistic.ts
1731
- import stylisticPlugin from "@stylistic/eslint-plugin";
1732
1731
  var StylisticConfigDefaults = {
1733
1732
  arrowParens: true,
1734
1733
  braceStyle: "1tbs",
@@ -1741,7 +1740,7 @@ var StylisticConfigDefaults = {
1741
1740
  semi: false,
1742
1741
  trailingComma: "always-multiline"
1743
1742
  };
1744
- function stylistic(options = {}) {
1743
+ async function stylistic(options = {}) {
1745
1744
  const {
1746
1745
  arrowParens,
1747
1746
  braceStyle,
@@ -1758,6 +1757,7 @@ function stylistic(options = {}) {
1758
1757
  ...StylisticConfigDefaults,
1759
1758
  ...options
1760
1759
  };
1760
+ const stylisticPlugin = await interopDefault(import("@stylistic/eslint-plugin"));
1761
1761
  const config2 = stylisticPlugin.configs.customize({
1762
1762
  arrowParens,
1763
1763
  blockSpacing: true,
@@ -2603,7 +2603,7 @@ async function config(options = {}) {
2603
2603
  }
2604
2604
  if (stylisticOption !== false && stylisticOption !== void 0) {
2605
2605
  const stylisticOpts = typeof stylisticOption === "object" ? stylisticOption : {};
2606
- configs.push(...stylistic(stylisticOpts));
2606
+ configs.push(...await stylistic(stylisticOpts));
2607
2607
  }
2608
2608
  if (prettierOption !== false && stylisticOption === false) {
2609
2609
  const prettierOpts = typeof prettierOption === "object" ? prettierOption : {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
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
- "version": "6.2.0-beta.2",
4
+ "version": "6.2.0-beta.3",
5
5
  "packageManager": "pnpm@9.0.6",
6
6
  "bin": {
7
7
  "eslint-sets": "./dist/cli/index.js"