@antfu/eslint-config 2.4.0 → 2.4.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/cli.cjs CHANGED
@@ -46,7 +46,7 @@ var import_parse_gitignore = __toESM(require("parse-gitignore"), 1);
46
46
  var import_picocolors = __toESM(require("picocolors"), 1);
47
47
 
48
48
  // package.json
49
- var version = "2.4.0";
49
+ var version = "2.4.2";
50
50
  var devDependencies = {
51
51
  "@antfu/eslint-config": "workspace:*",
52
52
  "@antfu/eslint-plugin-prettier": "^5.0.1-1",
package/dist/cli.js CHANGED
@@ -17,7 +17,7 @@ import parse from "parse-gitignore";
17
17
  import c from "picocolors";
18
18
 
19
19
  // package.json
20
- var version = "2.4.0";
20
+ var version = "2.4.2";
21
21
  var devDependencies = {
22
22
  "@antfu/eslint-config": "workspace:*",
23
23
  "@antfu/eslint-plugin-prettier": "^5.0.1-1",
package/dist/index.cjs CHANGED
@@ -797,6 +797,7 @@ async function formatters(options = {}, stylistic2 = {}) {
797
797
  };
798
798
  const prettierOptions = Object.assign(
799
799
  {
800
+ endOfLine: "auto",
800
801
  semi,
801
802
  singleQuote: quotes === "single",
802
803
  tabWidth: typeof indent === "number" ? indent : 2,
@@ -1565,8 +1566,8 @@ async function vue(options = {}) {
1565
1566
  processorVueBlocks({
1566
1567
  ...sfcBlocks,
1567
1568
  blocks: {
1568
- ...sfcBlocks.blocks,
1569
- styles: true
1569
+ styles: true,
1570
+ ...sfcBlocks.blocks
1570
1571
  }
1571
1572
  })
1572
1573
  ]),
@@ -1798,6 +1799,7 @@ async function antfu(options = {}, ...userConfigs) {
1798
1799
  }
1799
1800
  if (enableVue) {
1800
1801
  configs.push(vue({
1802
+ ...typeof enableVue !== "boolean" ? enableVue : {},
1801
1803
  overrides: overrides.vue,
1802
1804
  stylistic: stylisticOptions,
1803
1805
  typescript: !!enableTypeScript
package/dist/index.d.cts CHANGED
@@ -275,7 +275,7 @@ interface OptionsConfig extends OptionsComponentExts {
275
275
  *
276
276
  * @default auto-detect based on the dependencies
277
277
  */
278
- vue?: boolean;
278
+ vue?: boolean | OptionsVue;
279
279
  /**
280
280
  * Enable JSONC support.
281
281
  *
@@ -409,7 +409,7 @@ declare function unicorn(): Promise<FlatConfigItem[]>;
409
409
 
410
410
  declare function unocss(options?: OptionsUnoCSS): Promise<FlatConfigItem[]>;
411
411
 
412
- declare function vue(options?: OptionsHasTypeScript & OptionsOverrides & OptionsStylistic & OptionsFiles & OptionsVue): Promise<FlatConfigItem[]>;
412
+ declare function vue(options?: OptionsVue & OptionsHasTypeScript & OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<FlatConfigItem[]>;
413
413
 
414
414
  declare function yaml(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<FlatConfigItem[]>;
415
415
 
package/dist/index.d.ts CHANGED
@@ -275,7 +275,7 @@ interface OptionsConfig extends OptionsComponentExts {
275
275
  *
276
276
  * @default auto-detect based on the dependencies
277
277
  */
278
- vue?: boolean;
278
+ vue?: boolean | OptionsVue;
279
279
  /**
280
280
  * Enable JSONC support.
281
281
  *
@@ -409,7 +409,7 @@ declare function unicorn(): Promise<FlatConfigItem[]>;
409
409
 
410
410
  declare function unocss(options?: OptionsUnoCSS): Promise<FlatConfigItem[]>;
411
411
 
412
- declare function vue(options?: OptionsHasTypeScript & OptionsOverrides & OptionsStylistic & OptionsFiles & OptionsVue): Promise<FlatConfigItem[]>;
412
+ declare function vue(options?: OptionsVue & OptionsHasTypeScript & OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<FlatConfigItem[]>;
413
413
 
414
414
  declare function yaml(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<FlatConfigItem[]>;
415
415
 
package/dist/index.js CHANGED
@@ -711,6 +711,7 @@ async function formatters(options = {}, stylistic2 = {}) {
711
711
  };
712
712
  const prettierOptions = Object.assign(
713
713
  {
714
+ endOfLine: "auto",
714
715
  semi,
715
716
  singleQuote: quotes === "single",
716
717
  tabWidth: typeof indent === "number" ? indent : 2,
@@ -1479,8 +1480,8 @@ async function vue(options = {}) {
1479
1480
  processorVueBlocks({
1480
1481
  ...sfcBlocks,
1481
1482
  blocks: {
1482
- ...sfcBlocks.blocks,
1483
- styles: true
1483
+ styles: true,
1484
+ ...sfcBlocks.blocks
1484
1485
  }
1485
1486
  })
1486
1487
  ]),
@@ -1712,6 +1713,7 @@ async function antfu(options = {}, ...userConfigs) {
1712
1713
  }
1713
1714
  if (enableVue) {
1714
1715
  configs.push(vue({
1716
+ ...typeof enableVue !== "boolean" ? enableVue : {},
1715
1717
  overrides: overrides.vue,
1716
1718
  stylistic: stylisticOptions,
1717
1719
  typescript: !!enableTypeScript
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antfu/eslint-config",
3
3
  "type": "module",
4
- "version": "2.4.0",
4
+ "version": "2.4.2",
5
5
  "packageManager": "pnpm@8.11.0",
6
6
  "description": "Anthony's ESLint config",
7
7
  "author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
@@ -114,7 +114,7 @@
114
114
  "typescript": "^5.3.3",
115
115
  "vitest": "^1.0.2",
116
116
  "vue": "^3.3.10",
117
- "@antfu/eslint-config": "2.4.0"
117
+ "@antfu/eslint-config": "2.4.2"
118
118
  },
119
119
  "simple-git-hooks": {
120
120
  "pre-commit": "pnpm lint-staged"