@svifty7/eslint-config 0.0.4 → 0.0.5

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.d.mts CHANGED
@@ -16672,7 +16672,7 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
16672
16672
  * @default true
16673
16673
  */
16674
16674
  autoRenamePlugins?: boolean;
16675
- prettier?: false | PrettierConfig;
16675
+ prettier?: boolean | PrettierConfig;
16676
16676
  }
16677
16677
  //#endregion
16678
16678
  //#region src/factory.d.ts
@@ -16708,7 +16708,7 @@ declare function comments(): TypedFlatConfigItem[];
16708
16708
  declare function disables(): TypedFlatConfigItem[];
16709
16709
  //#endregion
16710
16710
  //#region src/configs/formatters.d.ts
16711
- declare function formatters(stylistic?: Omit<StylisticCustomizeOptions, 'pluginName'>): Promise<TypedFlatConfigItem[]>;
16711
+ declare function formatters(stylistic?: Omit<StylisticCustomizeOptions, 'pluginName'>, prettier?: Partial<PrettierConfig>): Promise<TypedFlatConfigItem[]>;
16712
16712
  //#endregion
16713
16713
  //#region src/configs/ignores.d.ts
16714
16714
  declare function ignores(userIgnores?: string[]): TypedFlatConfigItem[];
package/dist/index.mjs CHANGED
@@ -554,7 +554,7 @@ function mergePrettierOptions(options, overrides = {}) {
554
554
  };
555
555
  return config;
556
556
  }
557
- async function formatters(stylistic$1 = {}) {
557
+ async function formatters(stylistic$1 = {}, prettier = {}) {
558
558
  const { indent, quotes, semi } = {
559
559
  ...StylisticConfigDefaults,
560
560
  ...stylistic$1
@@ -576,7 +576,8 @@ async function formatters(stylistic$1 = {}) {
576
576
  htmlWhitespaceSensitivity: "css",
577
577
  vueIndentScriptAndStyle: true,
578
578
  endOfLine: "lf",
579
- singleAttributePerLine: true
579
+ singleAttributePerLine: true,
580
+ ...prettier
580
581
  };
581
582
  const pluginFormat = await interopDefault(import("eslint-plugin-format"));
582
583
  const tailwindPluginPath = resolveModule("prettier-plugin-tailwindcss", { paths: [fileURLToPath(import.meta.url)] });
@@ -2045,7 +2046,8 @@ function configure(options = {}, ...userConfigs) {
2045
2046
  regexp: true,
2046
2047
  typescript: isPackageExists("typescript") ? {} : void 0,
2047
2048
  unicorn: true,
2048
- vue: VuePackages.some((i) => isPackageExists(i)) ? {} : void 0
2049
+ vue: VuePackages.some((i) => isPackageExists(i)) ? {} : void 0,
2050
+ prettier: true
2049
2051
  };
2050
2052
  const { autoRenamePlugins, componentExts = [], gitignore: enableGitignore, jsx: enableJsx, pnpm: enableCatalogs, regexp: enableRegexp, typescript: enableTypeScript, unicorn: enableUnicorn, vue: enableVue } = Object.assign(defaultConfig, options);
2051
2053
  let isInEditor = options.isInEditor;
@@ -2086,7 +2088,8 @@ function configure(options = {}, ...userConfigs) {
2086
2088
  if (options.yaml ?? true) configs$1.push(yaml({ stylistic: stylisticOptions }));
2087
2089
  if (options.toml ?? true) configs$1.push(toml({ stylistic: stylisticOptions }));
2088
2090
  if (options.markdown ?? true) configs$1.push(markdown({ componentExts }));
2089
- configs$1.push(formatters(stylisticOptions));
2091
+ if (typeof options.prettier === "object") configs$1.push(formatters(options.stylistic, options.prettier));
2092
+ else if (options.prettier ?? true) configs$1.push(formatters(options.stylistic));
2090
2093
  configs$1.push(disables());
2091
2094
  if ("files" in options) throw new Error("[@svifty7/eslint-config] The first argument should not contain the \"files\" property as the options are supposed to be global. Place it in the second or later config instead.");
2092
2095
  const fusedConfig = flatConfigProps.reduce((acc, key) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@svifty7/eslint-config",
3
3
  "type": "module",
4
- "version": "0.0.4",
4
+ "version": "0.0.5",
5
5
  "description": "ESLint config by svifty7 based on @antfu/eslint-config",
6
6
  "author": "svifty7 (https://github.com/svifty7)",
7
7
  "license": "MIT",