@eienjs/eslint-config 1.4.1 → 1.5.0
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/{constants_generated.js → constants_generated.mjs} +3 -3
- package/dist/cli/{index.js → index.mjs} +2 -2
- package/dist/cli/{run.js → run.mjs} +5 -5
- package/dist/cli/stages/{update_eslint_files.js → update_eslint_files.mjs} +1 -1
- package/dist/cli/stages/{update_package_json.js → update_package_json.mjs} +3 -3
- package/dist/cli/stages/{update_vscode_settings.js → update_vscode_settings.mjs} +1 -1
- package/dist/configs/{adonisjs.d.ts → adonisjs.d.mts} +1 -1
- package/dist/configs/{adonisjs.js → adonisjs.mjs} +7 -4
- package/dist/configs/{astro.d.ts → astro.d.mts} +1 -1
- package/dist/configs/{astro.js → astro.mjs} +2 -2
- package/dist/configs/{command.d.ts → command.d.mts} +1 -1
- package/dist/configs/{comments.d.ts → comments.d.mts} +1 -1
- package/dist/configs/{comments.js → comments.mjs} +1 -1
- package/dist/configs/{disables.d.ts → disables.d.mts} +1 -1
- package/dist/configs/{disables.js → disables.mjs} +1 -1
- package/dist/configs/{formatters.d.ts → formatters.d.mts} +1 -1
- package/dist/configs/{formatters.js → formatters.mjs} +3 -3
- package/dist/configs/ignores.d.mts +6 -0
- package/dist/configs/ignores.mjs +14 -0
- package/dist/configs/{imports.d.ts → imports.d.mts} +1 -1
- package/dist/configs/{imports.js → imports.mjs} +1 -1
- package/dist/configs/index.d.mts +26 -0
- package/dist/configs/index.mjs +27 -0
- package/dist/configs/{javascript.d.ts → javascript.d.mts} +1 -1
- package/dist/configs/{javascript.js → javascript.mjs} +1 -1
- package/dist/configs/{jsdoc.d.ts → jsdoc.d.mts} +1 -1
- package/dist/configs/{jsdoc.js → jsdoc.mjs} +1 -1
- package/dist/configs/{jsonc.d.ts → jsonc.d.mts} +1 -1
- package/dist/configs/{jsonc.js → jsonc.mjs} +2 -2
- package/dist/configs/{markdown.d.ts → markdown.d.mts} +1 -1
- package/dist/configs/{markdown.js → markdown.mjs} +2 -2
- package/dist/configs/{node.d.ts → node.d.mts} +1 -1
- package/dist/configs/{node.js → node.mjs} +1 -1
- package/dist/configs/{nuxt.d.ts → nuxt.d.mts} +1 -1
- package/dist/configs/{nuxt.js → nuxt.mjs} +2 -2
- package/dist/configs/{perfectionist.d.ts → perfectionist.d.mts} +1 -1
- package/dist/configs/{perfectionist.js → perfectionist.mjs} +1 -1
- package/dist/configs/{pnpm.d.ts → pnpm.d.mts} +1 -1
- package/dist/configs/{pnpm.js → pnpm.mjs} +1 -1
- package/dist/configs/{regexp.d.ts → regexp.d.mts} +1 -1
- package/dist/configs/{sort.d.ts → sort.d.mts} +1 -1
- package/dist/configs/{stylistic.d.ts → stylistic.d.mts} +1 -1
- package/dist/configs/{stylistic.js → stylistic.mjs} +2 -2
- package/dist/configs/{test.d.ts → test.d.mts} +1 -1
- package/dist/configs/{test.js → test.mjs} +2 -2
- package/dist/configs/{toml.d.ts → toml.d.mts} +1 -1
- package/dist/configs/{toml.js → toml.mjs} +2 -2
- package/dist/configs/{typescript.d.ts → typescript.d.mts} +1 -1
- package/dist/configs/{typescript.js → typescript.mjs} +4 -3
- package/dist/configs/{unicorn.d.ts → unicorn.d.mts} +1 -1
- package/dist/configs/{unicorn.js → unicorn.mjs} +2 -2
- package/dist/configs/{vue.d.ts → vue.d.mts} +1 -1
- package/dist/configs/{vue.js → vue.mjs} +2 -2
- package/dist/configs/{yaml.d.ts → yaml.d.mts} +1 -1
- package/dist/configs/{yaml.js → yaml.mjs} +2 -2
- package/dist/{factory.d.ts → factory.d.mts} +2 -2
- package/dist/{factory.js → factory.mjs} +29 -29
- package/dist/{index.d.ts → index.d.mts} +5 -5
- package/dist/{index.js → index.mjs} +3 -3
- package/dist/package.mjs +5 -0
- package/dist/{typegen.d.ts → typegen.d.mts} +344 -145
- package/dist/{types.d.ts → types.d.mts} +11 -2
- package/dist/{utils.d.ts → utils.d.mts} +1 -1
- package/package.json +29 -33
- package/dist/configs/ignores.d.ts +0 -6
- package/dist/configs/ignores.js +0 -12
- package/dist/configs/index.d.ts +0 -26
- package/dist/configs/index.js +0 -27
- package/dist/package.js +0 -5
- /package/dist/cli/{constants.js → constants.mjs} +0 -0
- /package/dist/cli/{index.d.ts → index.d.mts} +0 -0
- /package/dist/cli/{utils.js → utils.mjs} +0 -0
- /package/dist/configs/{command.js → command.mjs} +0 -0
- /package/dist/configs/{regexp.js → regexp.mjs} +0 -0
- /package/dist/configs/{sort.js → sort.mjs} +0 -0
- /package/dist/{globs.d.ts → globs.d.mts} +0 -0
- /package/dist/{globs.js → globs.mjs} +0 -0
- /package/dist/{plugins.js → plugins.mjs} +0 -0
- /package/dist/{utils.js → utils.mjs} +0 -0
- /package/dist/vendored/{prettier_types.d.ts → prettier_types.d.mts} +0 -0
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { interopDefault, isInEditorEnv } from "./utils.
|
|
2
|
-
import { adonisjs } from "./configs/adonisjs.
|
|
3
|
-
import { astro } from "./configs/astro.
|
|
4
|
-
import { command } from "./configs/command.
|
|
5
|
-
import { comments } from "./configs/comments.
|
|
6
|
-
import { disables } from "./configs/disables.
|
|
7
|
-
import { stylistic } from "./configs/stylistic.
|
|
8
|
-
import { formatters } from "./configs/formatters.
|
|
9
|
-
import { ignores } from "./configs/ignores.
|
|
10
|
-
import { imports } from "./configs/imports.
|
|
11
|
-
import { javascript } from "./configs/javascript.
|
|
12
|
-
import { jsdoc } from "./configs/jsdoc.
|
|
13
|
-
import { jsonc } from "./configs/jsonc.
|
|
14
|
-
import { markdown } from "./configs/markdown.
|
|
15
|
-
import { node } from "./configs/node.
|
|
16
|
-
import { nuxt } from "./configs/nuxt.
|
|
17
|
-
import { perfectionist } from "./configs/perfectionist.
|
|
18
|
-
import { pnpm } from "./configs/pnpm.
|
|
19
|
-
import { regexp } from "./configs/regexp.
|
|
20
|
-
import { sortPackageJson, sortTsconfig } from "./configs/sort.
|
|
21
|
-
import { test } from "./configs/test.
|
|
22
|
-
import { toml } from "./configs/toml.
|
|
23
|
-
import { typescript } from "./configs/typescript.
|
|
24
|
-
import { unicorn } from "./configs/unicorn.
|
|
25
|
-
import { vue } from "./configs/vue.
|
|
26
|
-
import { yaml } from "./configs/yaml.
|
|
27
|
-
import "./configs/index.
|
|
1
|
+
import { interopDefault, isInEditorEnv } from "./utils.mjs";
|
|
2
|
+
import { adonisjs } from "./configs/adonisjs.mjs";
|
|
3
|
+
import { astro } from "./configs/astro.mjs";
|
|
4
|
+
import { command } from "./configs/command.mjs";
|
|
5
|
+
import { comments } from "./configs/comments.mjs";
|
|
6
|
+
import { disables } from "./configs/disables.mjs";
|
|
7
|
+
import { stylistic } from "./configs/stylistic.mjs";
|
|
8
|
+
import { formatters } from "./configs/formatters.mjs";
|
|
9
|
+
import { ignores } from "./configs/ignores.mjs";
|
|
10
|
+
import { imports } from "./configs/imports.mjs";
|
|
11
|
+
import { javascript } from "./configs/javascript.mjs";
|
|
12
|
+
import { jsdoc } from "./configs/jsdoc.mjs";
|
|
13
|
+
import { jsonc } from "./configs/jsonc.mjs";
|
|
14
|
+
import { markdown } from "./configs/markdown.mjs";
|
|
15
|
+
import { node } from "./configs/node.mjs";
|
|
16
|
+
import { nuxt } from "./configs/nuxt.mjs";
|
|
17
|
+
import { perfectionist } from "./configs/perfectionist.mjs";
|
|
18
|
+
import { pnpm } from "./configs/pnpm.mjs";
|
|
19
|
+
import { regexp } from "./configs/regexp.mjs";
|
|
20
|
+
import { sortPackageJson, sortTsconfig } from "./configs/sort.mjs";
|
|
21
|
+
import { test } from "./configs/test.mjs";
|
|
22
|
+
import { toml } from "./configs/toml.mjs";
|
|
23
|
+
import { typescript } from "./configs/typescript.mjs";
|
|
24
|
+
import { unicorn } from "./configs/unicorn.mjs";
|
|
25
|
+
import { vue } from "./configs/vue.mjs";
|
|
26
|
+
import { yaml } from "./configs/yaml.mjs";
|
|
27
|
+
import "./configs/index.mjs";
|
|
28
28
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
29
29
|
import { isPackageExists } from "local-pkg";
|
|
30
30
|
|
|
@@ -50,7 +50,7 @@ const defaultPluginRenaming = {
|
|
|
50
50
|
"yml": "yaml"
|
|
51
51
|
};
|
|
52
52
|
function eienjs(options = {}) {
|
|
53
|
-
const { astro: enableAstro = false, componentExts = [], gitignore: enableGitignore = true, imports: enableImports = true, pnpm: enableCatalogs = false, regexp: enableRegexp = true, typescript: enableTypeScript = isPackageExists("typescript"), unicorn: enableUnicorn = true, vue: enableVue = VuePackages.some((i) => isPackageExists(i)), adonisjs: enableAdonisjs = false, nuxt: enableNuxt = false } = options;
|
|
53
|
+
const { astro: enableAstro = false, componentExts = [], gitignore: enableGitignore = true, ignores: userIgnores = [], imports: enableImports = true, pnpm: enableCatalogs = false, regexp: enableRegexp = true, typescript: enableTypeScript = isPackageExists("typescript"), unicorn: enableUnicorn = true, vue: enableVue = VuePackages.some((i) => isPackageExists(i)), adonisjs: enableAdonisjs = false, nuxt: enableNuxt = false } = options;
|
|
54
54
|
let { isInEditor } = options;
|
|
55
55
|
if (isInEditor == null) {
|
|
56
56
|
isInEditor = isInEditorEnv();
|
|
@@ -67,7 +67,7 @@ function eienjs(options = {}) {
|
|
|
67
67
|
...enableGitignore
|
|
68
68
|
})]));
|
|
69
69
|
const typescriptOptions = resolveSubOptions(options, "typescript");
|
|
70
|
-
configs.push(ignores(
|
|
70
|
+
configs.push(ignores(userIgnores), javascript({
|
|
71
71
|
isInEditor,
|
|
72
72
|
overrides: getOverrides(options, "javascript")
|
|
73
73
|
}), comments(), node(), jsdoc({ stylistic: stylisticOptions }), imports({ stylistic: stylisticOptions }), command(), perfectionist());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ConfigNames } from "./typegen.
|
|
2
|
-
import { Awaitable, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsErasableSyntaxOnly, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsTypescriptWithErasableSyntaxOnly, OptionsVue, Rules, StylisticConfig, TypedFlatConfigItem } from "./types.
|
|
3
|
-
import { ResolvedOptions, defaultPluginRenaming, eienjs, getOverrides, resolveSubOptions } from "./factory.
|
|
4
|
-
import { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_EXTS, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML } from "./globs.
|
|
5
|
-
import { combine, ensurePackages, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, toArray } from "./utils.
|
|
1
|
+
import { ConfigNames } from "./typegen.mjs";
|
|
2
|
+
import { Awaitable, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsErasableSyntaxOnly, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsTypescriptWithErasableSyntaxOnly, OptionsVue, Rules, StylisticConfig, TypedFlatConfigItem } from "./types.mjs";
|
|
3
|
+
import { ResolvedOptions, defaultPluginRenaming, eienjs, getOverrides, resolveSubOptions } from "./factory.mjs";
|
|
4
|
+
import { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_EXTS, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML } from "./globs.mjs";
|
|
5
|
+
import { combine, ensurePackages, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, toArray } from "./utils.mjs";
|
|
6
6
|
export { Awaitable, ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_EXTS, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsErasableSyntaxOnly, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsTypescriptWithErasableSyntaxOnly, OptionsVue, ResolvedOptions, Rules, StylisticConfig, TypedFlatConfigItem, combine, eienjs as default, defaultPluginRenaming, eienjs, ensurePackages, getOverrides, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, resolveSubOptions, toArray };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_EXTS, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML } from "./globs.
|
|
2
|
-
import { combine, ensurePackages, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, toArray } from "./utils.
|
|
3
|
-
import { defaultPluginRenaming, eienjs, getOverrides, resolveSubOptions } from "./factory.
|
|
1
|
+
import { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_EXTS, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML } from "./globs.mjs";
|
|
2
|
+
import { combine, ensurePackages, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, toArray } from "./utils.mjs";
|
|
3
|
+
import { defaultPluginRenaming, eienjs, getOverrides, resolveSubOptions } from "./factory.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/index.ts
|
|
6
6
|
var src_default = eienjs;
|