@th1o/frontend-lint 0.0.2 → 0.0.3
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.mjs +2 -2
- package/dist/index.d.mts +5 -1
- package/dist/index.mjs +22 -3
- package/package.json +2 -3
- package/dist/stylelint.d.mts +0 -6
- package/dist/stylelint.mjs +0 -18
- /package/dist/{lib-CJY3aRgd.mjs → lib-DteMLVEl.mjs} +0 -0
- /package/dist/{namespace-43eDtFYM.mjs → namespace-Dr1zqW02.mjs} +0 -0
package/dist/cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as PACKAGE_NAMESPACE } from "./namespace-
|
|
1
|
+
import { n as PACKAGE_NAMESPACE } from "./namespace-Dr1zqW02.mjs";
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import fs$1 from "node:fs";
|
|
@@ -10,7 +10,7 @@ import parse from "parse-gitignore";
|
|
|
10
10
|
import { execSync } from "node:child_process";
|
|
11
11
|
|
|
12
12
|
//#region package.json
|
|
13
|
-
var version = "0.0.
|
|
13
|
+
var version = "0.0.3";
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region src/cli/constants.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -4,6 +4,7 @@ import { StylisticCustomizeOptions } from "@stylistic/eslint-plugin";
|
|
|
4
4
|
import { ParserOptions } from "@typescript-eslint/parser";
|
|
5
5
|
import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
|
|
6
6
|
import { Options } from "eslint-processor-vue-blocks";
|
|
7
|
+
import { Config } from "stylelint";
|
|
7
8
|
|
|
8
9
|
//#region src/typegen.d.ts
|
|
9
10
|
interface RuleOptions {
|
|
@@ -19839,6 +19840,9 @@ declare const GLOB_TESTS: string[];
|
|
|
19839
19840
|
declare const GLOB_ALL_SRC: string[];
|
|
19840
19841
|
declare const GLOB_EXCLUDE: string[];
|
|
19841
19842
|
//#endregion
|
|
19843
|
+
//#region src/stylelint.d.ts
|
|
19844
|
+
declare function createStylelintConfig(overrides?: Config['rules']): Config;
|
|
19845
|
+
//#endregion
|
|
19842
19846
|
//#region src/utils.d.ts
|
|
19843
19847
|
declare const parserPlain: {
|
|
19844
19848
|
meta: {
|
|
@@ -19912,4 +19916,4 @@ declare function ensurePackages(packages: (string | undefined)[]): Promise<void>
|
|
|
19912
19916
|
declare function isInEditorEnv(): boolean;
|
|
19913
19917
|
declare function isInGitHooksOrLintStaged(): boolean;
|
|
19914
19918
|
//#endregion
|
|
19915
|
-
export { Awaitable, CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, 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_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSX, OptionsJSXA11y, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStylistic, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, StylisticOptions, TypedFlatConfigItem, astro, combine, command, comments, createESLintConfig, createESLintConfig as default, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, stylistic, svelte, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|
|
19919
|
+
export { Awaitable, CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, 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_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSX, OptionsJSXA11y, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStylistic, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, StylisticOptions, TypedFlatConfigItem, astro, combine, command, comments, createESLintConfig, createESLintConfig as default, createStylelintConfig, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, stylistic, svelte, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as PACKAGE_NAMESPACE, t as LINT_NAMESPACE } from "./namespace-
|
|
1
|
+
import { n as PACKAGE_NAMESPACE, t as LINT_NAMESPACE } from "./namespace-Dr1zqW02.mjs";
|
|
2
2
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import fs from "node:fs/promises";
|
|
@@ -2084,7 +2084,7 @@ async function typescript(options = {}) {
|
|
|
2084
2084
|
}] : [],
|
|
2085
2085
|
...erasableOnly ? [{
|
|
2086
2086
|
name: `${LINT_NAMESPACE}/typescript/erasable-syntax-only`,
|
|
2087
|
-
plugins: { "erasable-syntax-only": await interopDefault(import("./lib-
|
|
2087
|
+
plugins: { "erasable-syntax-only": await interopDefault(import("./lib-DteMLVEl.mjs")) },
|
|
2088
2088
|
rules: {
|
|
2089
2089
|
"erasable-syntax-only/enums": "error",
|
|
2090
2090
|
"erasable-syntax-only/import-aliases": "error",
|
|
@@ -2657,9 +2657,28 @@ const CONFIG_PRESET_FULL_OFF = {
|
|
|
2657
2657
|
yaml: false
|
|
2658
2658
|
};
|
|
2659
2659
|
|
|
2660
|
+
//#endregion
|
|
2661
|
+
//#region src/stylelint.ts
|
|
2662
|
+
function createStylelintConfig(overrides) {
|
|
2663
|
+
return {
|
|
2664
|
+
extends: [
|
|
2665
|
+
"stylelint-config-standard",
|
|
2666
|
+
"stylelint-config-recess-order",
|
|
2667
|
+
"stylelint-config-recommended-vue"
|
|
2668
|
+
],
|
|
2669
|
+
rules: {
|
|
2670
|
+
"declaration-no-important": true,
|
|
2671
|
+
"function-url-quotes": "never",
|
|
2672
|
+
"import-notation": "string",
|
|
2673
|
+
"selector-max-id": [0, { ignoreContextFunctionalPseudoClasses: [":not", "/^:(h|H)as$/"] }],
|
|
2674
|
+
...overrides
|
|
2675
|
+
}
|
|
2676
|
+
};
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2660
2679
|
//#endregion
|
|
2661
2680
|
//#region src/index.ts
|
|
2662
2681
|
var src_default = createESLintConfig;
|
|
2663
2682
|
|
|
2664
2683
|
//#endregion
|
|
2665
|
-
export { CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, 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_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, StylisticConfigDefaults, astro, combine, command, comments, createESLintConfig, src_default as default, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, stylistic, svelte, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|
|
2684
|
+
export { CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, 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_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, StylisticConfigDefaults, astro, combine, command, comments, createESLintConfig, createStylelintConfig, src_default as default, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, stylistic, svelte, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@th1o/frontend-lint",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"description": "ESLint config",
|
|
6
6
|
"author": "张天昊 <theozhang.tech@outlook.com>",
|
|
7
7
|
"keywords": [
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"exports": {
|
|
11
11
|
".": "./dist/index.mjs",
|
|
12
12
|
"./cli": "./dist/cli.mjs",
|
|
13
|
-
"./stylelint": "./dist/stylelint.mjs",
|
|
14
13
|
"./package.json": "./package.json"
|
|
15
14
|
},
|
|
16
15
|
"main": "./dist/index.mjs",
|
|
@@ -175,7 +174,7 @@
|
|
|
175
174
|
"typescript": "^5.9.3",
|
|
176
175
|
"vitest": "^4.0.18",
|
|
177
176
|
"vue": "^3.5.27",
|
|
178
|
-
"@th1o/frontend-lint": "0.0.
|
|
177
|
+
"@th1o/frontend-lint": "0.0.3"
|
|
179
178
|
},
|
|
180
179
|
"resolutions": {
|
|
181
180
|
"@eslint-community/eslint-utils": "catalog:peer",
|
package/dist/stylelint.d.mts
DELETED
package/dist/stylelint.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
//#region src/stylelint.ts
|
|
2
|
-
function createStylelintConfig() {
|
|
3
|
-
return {
|
|
4
|
-
extends: [
|
|
5
|
-
"stylelint-config-standard",
|
|
6
|
-
"stylelint-config-recess-order",
|
|
7
|
-
"stylelint-config-recommended-vue"
|
|
8
|
-
],
|
|
9
|
-
rules: {
|
|
10
|
-
"declaration-no-important": true,
|
|
11
|
-
"function-url-quotes": "never",
|
|
12
|
-
"selector-max-id": [0, { ignoreContextFunctionalPseudoClasses: [":not", "/^:(h|H)as$/"] }]
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
|
-
export { createStylelintConfig };
|
|
File without changes
|
|
File without changes
|