@sushichan044/eslint-config-array-resolver 0.0.2 → 0.1.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/dist/index.d.ts CHANGED
@@ -8,10 +8,16 @@ interface ESLintConfig {
8
8
  dependencies: string[];
9
9
  payload: Payload;
10
10
  }
11
+ /**
12
+ * Traverse and find the ESLint config file.
13
+ *
14
+ * @internal
15
+ */
16
+
11
17
  interface ReadFlatConfigOptions {
12
18
  suppressOutput?: boolean;
13
19
  }
14
- declare const readFlatConfig: (root: string, options?: ReadFlatConfigOptions) => Promise<ESLintConfig>;
20
+ declare const resolveFlatConfig: (root: string, options?: ReadFlatConfigOptions) => Promise<ESLintConfig>;
15
21
  interface FlatConfigItem extends Linter.Config {
16
22
  index: number;
17
23
  }
@@ -36,4 +42,4 @@ interface RuleInfo extends RuleMetaData<string, unknown> {
36
42
  plugin: string;
37
43
  }
38
44
  //#endregion
39
- export { type ESLintConfig, type RuleInfo, readFlatConfig };
45
+ export { type ESLintConfig, type RuleInfo, resolveFlatConfig };
package/dist/index.js CHANGED
@@ -45,7 +45,7 @@ const executeWithSilentLogs = async (function_) => {
45
45
  if (res.err) throw res.err;
46
46
  return res.data;
47
47
  };
48
- const resolveConfigPath = (root) => {
48
+ const findConfigPath = (root) => {
49
49
  const configPath = any([
50
50
  "eslint.config.js",
51
51
  "eslint.config.mjs",
@@ -60,9 +60,9 @@ const resolveConfigPath = (root) => {
60
60
  fullPath: configPath
61
61
  };
62
62
  };
63
- const readFlatConfig = async (root, options = {}) => {
63
+ const resolveFlatConfig = async (root, options = {}) => {
64
64
  const { suppressOutput = false } = options;
65
- const { basePath, fullPath } = resolveConfigPath(root);
65
+ const { basePath, fullPath } = findConfigPath(root);
66
66
  const moduleImportPromise = runInDirectory(basePath, async () => {
67
67
  return bundleRequire({
68
68
  cwd: basePath,
@@ -142,4 +142,4 @@ const readFlatConfig = async (root, options = {}) => {
142
142
  payload
143
143
  };
144
144
  };
145
- export { readFlatConfig };
145
+ export { resolveFlatConfig };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sushichan044/eslint-config-array-resolver",
3
3
  "description": "Resolves flat config module. For internal use only.",
4
- "version": "0.0.2",
4
+ "version": "0.1.1",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
7
7
  "author": {