@cuiqg/eslint-config 2.2.1 → 2.2.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.
Files changed (2) hide show
  1. package/dist/index.js +9 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -35,6 +35,8 @@ const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
35
35
  const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
36
36
  const GLOB_JS = "**/*.?([cm])js";
37
37
  const GLOB_JSX = "**/*.?([cm])jsx";
38
+ const GLOB_TS = "**/*.?([cm])ts";
39
+ const GLOB_TSX = "**/*.?([cm])tsx";
38
40
  const GLOB_STYLE = "**/*.{c,le,sc}ss";
39
41
  const GLOB_CSS = "**/*.css";
40
42
  const GLOB_POSTCSS = "**/*.{p,post}css";
@@ -43,11 +45,13 @@ const GLOB_SCSS = "**/*.scss";
43
45
  const GLOB_JSON = "**/*.json";
44
46
  const GLOB_JSON5 = "**/*.json5";
45
47
  const GLOB_JSONC = "**/*.jsonc";
48
+ const GLOB_MARKDOWN = "**/*.md";
46
49
  const GLOB_VUE = "**/*.vue";
47
50
  const GLOB_YAML = "**/*.y?(a)ml";
51
+ const GLOB_TOML = "**/*.toml";
48
52
  const GLOB_XML = "**/*.xml";
53
+ const GLOB_SVG = "**/*.svg";
49
54
  const GLOB_HTML = "**/*.htm?(l)";
50
- const GLOB_TOML = "**/*.toml";
51
55
  const GLOB_EXCLUDE = [
52
56
  "**/node_modules",
53
57
  "**/dist",
@@ -169,7 +173,7 @@ function isInEditor() {
169
173
  return !!(process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM);
170
174
  }
171
175
  function isInGitHooksOrLintStaged() {
172
- return !!(process.env.HUSKY || process.env.GIT_PARAMS || process.env.VSCODE_GIT_COMMAND || process.env.npm_lifecycle_script?.startsWith("lint-staged"));
176
+ return !!(process.env.GIT_PARAMS || process.env.VSCODE_GIT_COMMAND || process.env.npm_lifecycle_script?.startsWith("lint-staged"));
173
177
  }
174
178
 
175
179
  //#endregion
@@ -1111,7 +1115,8 @@ const defaultPluginRenaming = {
1111
1115
  "@stylistic": "style",
1112
1116
  "import-x": "import",
1113
1117
  "n": "node",
1114
- "yml": "yaml"
1118
+ "yml": "yaml",
1119
+ "@typescript-eslint": "ts"
1115
1120
  };
1116
1121
  function cuiqg(options = {}, ...userConfigs) {
1117
1122
  const { prettier: enablePrettier = false, gitignore: enableGitignore = true, unocss: enableUnocss = hasUnocss, vue: enableVue = hasVue, stylistic: enableStylistic = true, jsdoc: enableJsdoc = false, pnpm: enablePnpm = false } = options;
@@ -1148,4 +1153,4 @@ function cuiqg(options = {}, ...userConfigs) {
1148
1153
  var src_default = cuiqg;
1149
1154
 
1150
1155
  //#endregion
1151
- export { GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TOML, GLOB_VUE, GLOB_XML, GLOB_YAML, comments, cuiqg, src_default as default, defaultPluginRenaming, disables, gitignore, hasTypescript, hasUnocss, hasVue, ignores, imports, interopDefault, isInEditor, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, macros, node, pnpm, prettier, sortJsconfig, sortPackageJson, stylistic, toml, unicorn, unocss, unplugin, vue, yaml };
1156
+ export { GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, comments, cuiqg, src_default as default, defaultPluginRenaming, disables, gitignore, hasTypescript, hasUnocss, hasVue, ignores, imports, interopDefault, isInEditor, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, macros, node, pnpm, prettier, sortJsconfig, sortPackageJson, stylistic, toml, unicorn, unocss, unplugin, vue, yaml };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuiqg/eslint-config",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "ESLint config preset for @cuiqg",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -23,7 +23,7 @@
23
23
  "scripts": {
24
24
  "build": "tsdown",
25
25
  "build:inspector": "npx @eslint/config-inspector build",
26
- "dev": "npx @eslint/config-inspector --open false",
26
+ "lint:inspector": "npx @eslint/config-inspector --open false",
27
27
  "lint": "eslint .",
28
28
  "lint:fix": "eslint . --fix",
29
29
  "prepublishOnly": "npm run build",