@daopk/eslint-config 0.5.3 → 0.5.4

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
@@ -1,5 +1,4 @@
1
- import { n as Options, t as LinterConfig } from "./types-CT32pGP-.mjs";
2
- import { Linter } from "eslint";
1
+ import { n as Options, r as Linter, t as LinterConfig } from "./types-BjcNTPcQ.mjs";
3
2
 
4
3
  //#region src/index.d.ts
5
4
  declare function daopk(options?: Options, ...userConfigs: Linter.Config[]): Promise<LinterConfig[]>;
package/dist/index.mjs CHANGED
@@ -1,3 +1,27 @@
1
- import { t as daopk } from "./src-clcGUe6i.mjs";
1
+ import { a as node, c as builtin, i as perfectionist, l as antfu, n as typescript, o as imports, r as stylistic, s as ignores, t as interopDefault } from "./utils-CFgnT6wG.mjs";
2
+ import { isPackageExists } from "local-pkg";
2
3
 
4
+ //#region src/index.ts
5
+ async function daopk(options = {}, ...userConfigs) {
6
+ const { vue: enableVue = isPackageExists("vue") } = options;
7
+ const configs = [
8
+ ignores(options.ignores),
9
+ builtin(),
10
+ stylistic(options.stylistic),
11
+ typescript(),
12
+ imports(),
13
+ antfu(),
14
+ node(),
15
+ perfectionist()
16
+ ];
17
+ if (enableVue) configs.push(...await interopDefault((await import("./vue-DYgMNyp7.mjs")).vue()));
18
+ if (options.rules) configs.push({
19
+ name: "daopk/rules",
20
+ rules: { ...options.rules }
21
+ });
22
+ if (userConfigs.length > 0) configs.push(...userConfigs);
23
+ return configs;
24
+ }
25
+
26
+ //#endregion
3
27
  export { daopk as default };
@@ -1,4 +1,4 @@
1
- import { n as Options, t as LinterConfig } from "../types-CT32pGP-.mjs";
1
+ import { n as Options, t as LinterConfig } from "../types-BjcNTPcQ.mjs";
2
2
 
3
3
  //#region src/presets/nestjs.d.ts
4
4
  declare function presetNestjs(options?: Options, ...userConfigs: LinterConfig[]): Promise<LinterConfig[]>;
@@ -1,4 +1,5 @@
1
- import { t as daopk } from "../src-clcGUe6i.mjs";
1
+ import "../utils-CFgnT6wG.mjs";
2
+ import daopk from "../index.mjs";
2
3
 
3
4
  //#region src/presets/nestjs.ts
4
5
  async function presetNestjs(options = {}, ...userConfigs) {