@gsc-basic/eslint-config 1.2.1 → 1.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.
package/README.md CHANGED
@@ -8,9 +8,7 @@
8
8
 
9
9
  基于 [@antfu/eslint-config](https://github.com/antfu/eslint-config) 构建。使用更加简单,旨在独立使用,**无需 [Prettier](https://prettier.io/)**。
10
10
 
11
- 默认用于 `TypeScript`、`Vue`、`Jsx`、`Unocss`、`JSON`、`YAML`、`Toml`、`Markdown`等开箱即用。
12
-
13
- 可选 `React`、`Angular` 支持。
11
+ 用于 `TypeScript`、`Vue`、`Jsx`、`Unocss`、`JSON`、`YAML`、`Toml`、`Markdown`等开箱即用。
14
12
 
15
13
  **风格原则**:Minimal for reading, stable for diff, consistent。
16
14
 
@@ -49,7 +47,6 @@ export default gscEslint({
49
47
  unocss: true,
50
48
  jsx: true,
51
49
  vue: true,
52
- react: false,
53
50
  ignores: [], // 忽略的目录或文件
54
51
 
55
52
  // 还可以配置任意数量的任意自定义配置覆盖
@@ -93,19 +90,6 @@ export default gscEslint({
93
90
  });
94
91
  ```
95
92
 
96
- ### React支持
97
-
98
- 要启用 `React` 支持,您需要明确打开它:
99
-
100
- ```js
101
- // eslint.config.mjs
102
- import { gscEslint } from '@gsc-basic/eslint-config';
103
-
104
- export default gscEslint({
105
- react: true,
106
- });
107
- ```
108
-
109
93
  ### lint-staged支持
110
94
 
111
95
  `pnpm i lint-staged -D`
package/dist/index.cjs CHANGED
@@ -7,8 +7,8 @@ You shall not disclose such Confidential Information and shall use it only in
7
7
  accordance with the terms of the license agreement.
8
8
 
9
9
  --- Build Info ---
10
- Version: 1.2.0
11
- Build Time: 2026/2/26 13:53:46
12
- Build Commit: 146647e89e88d3fc8125f46aceb9a611688ea791
10
+ Version: 1.2.2
11
+ Build Time: 2026/3/30 18:11:28
12
+ Build Commit: 0e77bf611239cf191125d0cf6cd783dd9e9fff9b
13
13
  */
14
- "use strict";var l=Object.create;var t=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty;var m=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},i=(e,n,r,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of u(n))!p.call(e,o)&&o!==r&&t(e,o,{get:()=>n[o],enumerable:!(s=c(n,o))||s.enumerable});return e};var d=(e,n,r)=>(r=e!=null?l(f(e)):{},i(n||!e||!e.__esModule?t(r,"default",{value:e,enumerable:!0}):r,e)),g=e=>i(t({},"__esModule",{value:!0}),e);var y={};m(y,{gscEslint:()=>v});module.exports=g(y);var a=d(require("@antfu/eslint-config"),1),v=(e={})=>(0,a.default)({type:e.type??"app",unocss:e.unocss??!0,jsx:e.jsx??!0,vue:e.vue??!0,react:e.react??!1,ignores:e.ignores??[],formatters:!0,isInEditor:!0,lessOpinionated:!0,stylistic:{indent:2,quotes:"single",semi:!0},overrides:{vue:{"vue/html-self-closing":["error",{html:{void:"always",normal:"never",component:"always"},svg:"always",math:"always"}],"vue/attributes-order":2,"vue/order-in-components":2,"vue/v-on-event-hyphenation":["error","always",{autofix:!0,ignore:[]}],"vue/custom-event-name-casing":"off","vue/html-closing-bracket-spacing":"off","vue/multi-word-component-names":"off","vue/no-reserved-component-names":"off","vue/component-name-in-template-casing":"off","vue/max-attributes-per-line":["error",{singleline:{max:2},multiline:{max:1}}],"vue/block-order":["error",{order:[["template","script"],"style"]}]}},...e.antfu??{}},{rules:{"no-undef":2,"no-use-before-define":"off","no-console":2,"no-eval":2,curly:[2,"all"],eqeqeq:[2,"always",{null:"ignore"}],"prefer-promise-reject-errors":0,"sort-imports":0,"no-case-declarations":0,"import/order":0,"unicorn/prefer-dom-node-text-content":0,"style/indent-binary-ops":0,"style/no-tabs":0,"node/no-callback-literal":0,"node/prefer-global/process":0,"jsdoc/check-param-names":0,"jsdoc/require-param-name":0,"jsdoc/require-returns-description":0,"jsdoc/require-returns-check":0,"unicorn/consistent-function-scoping":0,"perfectionist/sort-imports":0,"perfectionist/sort-exports":0,"perfectionist/sort-named-imports":0}},...e.flatConfig??[]);0&&(module.exports={gscEslint});
14
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`@antfu/eslint-config`);c=s(c);const l=(e={})=>(0,c.default)({type:e.type??`app`,unocss:e.unocss??!0,jsx:e.jsx??!0,vue:e.vue??!0,react:!1,ignores:e.ignores??[],formatters:!0,isInEditor:!0,lessOpinionated:!0,stylistic:{indent:2,quotes:`single`,semi:!0},overrides:{vue:{"vue/html-self-closing":[`error`,{html:{void:`always`,normal:`never`,component:`always`},svg:`always`,math:`always`}],"vue/attributes-order":2,"vue/order-in-components":2,"vue/v-on-event-hyphenation":[`error`,`always`,{autofix:!0,ignore:[]}],"vue/custom-event-name-casing":`off`,"vue/html-closing-bracket-spacing":`off`,"vue/multi-word-component-names":`off`,"vue/no-reserved-component-names":`off`,"vue/component-name-in-template-casing":`off`,"vue/max-attributes-per-line":[`error`,{singleline:{max:2},multiline:{max:1}}],"vue/block-order":[`error`,{order:[[`template`,`script`],`style`]}]}},...e.antfu??{}},{rules:{"no-undef":2,"no-use-before-define":`off`,"no-console":2,"no-eval":2,curly:[2,`all`],eqeqeq:[2,`always`,{null:`ignore`}],"prefer-promise-reject-errors":0,"sort-imports":0,"no-case-declarations":0,"import/order":0,"unicorn/prefer-dom-node-text-content":0,"style/indent-binary-ops":0,"style/no-tabs":0,"node/no-callback-literal":0,"node/prefer-global/process":0,"jsdoc/check-param-names":0,"jsdoc/require-param-name":0,"jsdoc/require-returns-description":0,"jsdoc/require-returns-check":0,"unicorn/consistent-function-scoping":0,"perfectionist/sort-imports":0,"perfectionist/sort-exports":0,"perfectionist/sort-named-imports":0,"e18e/prefer-static-regex":0}},...e.flatConfig??[]);exports.gscEslint=l;
package/dist/index.d.cts CHANGED
@@ -1,19 +1,20 @@
1
- import * as eslint_flat_config_utils from 'eslint-flat-config-utils';
2
- import * as _antfu_eslint_config from '@antfu/eslint-config';
3
- import { OptionsProjectType, OptionsConfig, OptionsFiles } from '@antfu/eslint-config';
4
1
 
2
+ import * as _$_antfu_eslint_config0 from "@antfu/eslint-config";
3
+ import { OptionsConfig, OptionsFiles, OptionsProjectType } from "@antfu/eslint-config";
4
+ import * as _$eslint_flat_config_utils_index0 from "eslint-flat-config-utils/index";
5
+
6
+ //#region src/index.d.ts
5
7
  interface FlatConfig extends OptionsFiles {
6
- rules: Record<string, any>;
8
+ rules: Record<string, any>;
7
9
  }
8
10
  interface GscEslintOptions extends OptionsProjectType {
9
- unocss?: boolean;
10
- jsx?: boolean;
11
- vue?: boolean;
12
- react?: boolean;
13
- ignores?: string[];
14
- antfu?: OptionsConfig;
15
- flatConfig?: FlatConfig[];
11
+ unocss?: boolean;
12
+ jsx?: boolean;
13
+ vue?: boolean;
14
+ ignores?: string[];
15
+ antfu?: OptionsConfig;
16
+ flatConfig?: FlatConfig[];
16
17
  }
17
- declare const gscEslint: (options?: GscEslintOptions) => eslint_flat_config_utils.FlatConfigComposer<_antfu_eslint_config.TypedFlatConfigItem, _antfu_eslint_config.ConfigNames>;
18
-
19
- export { gscEslint };
18
+ declare const gscEslint: (options?: GscEslintOptions) => _$eslint_flat_config_utils_index0.FlatConfigComposer<_$_antfu_eslint_config0.TypedFlatConfigItem, _$_antfu_eslint_config0.ConfigNames>;
19
+ //#endregion
20
+ export { gscEslint };
package/dist/index.d.ts CHANGED
@@ -1,19 +1,20 @@
1
- import * as eslint_flat_config_utils from 'eslint-flat-config-utils';
2
- import * as _antfu_eslint_config from '@antfu/eslint-config';
3
- import { OptionsProjectType, OptionsConfig, OptionsFiles } from '@antfu/eslint-config';
4
1
 
2
+ import * as _$_antfu_eslint_config0 from "@antfu/eslint-config";
3
+ import { OptionsConfig, OptionsFiles, OptionsProjectType } from "@antfu/eslint-config";
4
+ import * as _$eslint_flat_config_utils_index0 from "eslint-flat-config-utils/index";
5
+
6
+ //#region src/index.d.ts
5
7
  interface FlatConfig extends OptionsFiles {
6
- rules: Record<string, any>;
8
+ rules: Record<string, any>;
7
9
  }
8
10
  interface GscEslintOptions extends OptionsProjectType {
9
- unocss?: boolean;
10
- jsx?: boolean;
11
- vue?: boolean;
12
- react?: boolean;
13
- ignores?: string[];
14
- antfu?: OptionsConfig;
15
- flatConfig?: FlatConfig[];
11
+ unocss?: boolean;
12
+ jsx?: boolean;
13
+ vue?: boolean;
14
+ ignores?: string[];
15
+ antfu?: OptionsConfig;
16
+ flatConfig?: FlatConfig[];
16
17
  }
17
- declare const gscEslint: (options?: GscEslintOptions) => eslint_flat_config_utils.FlatConfigComposer<_antfu_eslint_config.TypedFlatConfigItem, _antfu_eslint_config.ConfigNames>;
18
-
19
- export { gscEslint };
18
+ declare const gscEslint: (options?: GscEslintOptions) => _$eslint_flat_config_utils_index0.FlatConfigComposer<_$_antfu_eslint_config0.TypedFlatConfigItem, _$_antfu_eslint_config0.ConfigNames>;
19
+ //#endregion
20
+ export { gscEslint };
package/dist/index.js CHANGED
@@ -7,8 +7,8 @@ You shall not disclose such Confidential Information and shall use it only in
7
7
  accordance with the terms of the license agreement.
8
8
 
9
9
  --- Build Info ---
10
- Version: 1.2.0
11
- Build Time: 2026/2/26 13:53:46
12
- Build Commit: 146647e89e88d3fc8125f46aceb9a611688ea791
10
+ Version: 1.2.2
11
+ Build Time: 2026/3/30 18:11:28
12
+ Build Commit: 0e77bf611239cf191125d0cf6cd783dd9e9fff9b
13
13
  */
14
- import n from"@antfu/eslint-config";var s=(e={})=>n({type:e.type??"app",unocss:e.unocss??!0,jsx:e.jsx??!0,vue:e.vue??!0,react:e.react??!1,ignores:e.ignores??[],formatters:!0,isInEditor:!0,lessOpinionated:!0,stylistic:{indent:2,quotes:"single",semi:!0},overrides:{vue:{"vue/html-self-closing":["error",{html:{void:"always",normal:"never",component:"always"},svg:"always",math:"always"}],"vue/attributes-order":2,"vue/order-in-components":2,"vue/v-on-event-hyphenation":["error","always",{autofix:!0,ignore:[]}],"vue/custom-event-name-casing":"off","vue/html-closing-bracket-spacing":"off","vue/multi-word-component-names":"off","vue/no-reserved-component-names":"off","vue/component-name-in-template-casing":"off","vue/max-attributes-per-line":["error",{singleline:{max:2},multiline:{max:1}}],"vue/block-order":["error",{order:[["template","script"],"style"]}]}},...e.antfu??{}},{rules:{"no-undef":2,"no-use-before-define":"off","no-console":2,"no-eval":2,curly:[2,"all"],eqeqeq:[2,"always",{null:"ignore"}],"prefer-promise-reject-errors":0,"sort-imports":0,"no-case-declarations":0,"import/order":0,"unicorn/prefer-dom-node-text-content":0,"style/indent-binary-ops":0,"style/no-tabs":0,"node/no-callback-literal":0,"node/prefer-global/process":0,"jsdoc/check-param-names":0,"jsdoc/require-param-name":0,"jsdoc/require-returns-description":0,"jsdoc/require-returns-check":0,"unicorn/consistent-function-scoping":0,"perfectionist/sort-imports":0,"perfectionist/sort-exports":0,"perfectionist/sort-named-imports":0}},...e.flatConfig??[]);export{s as gscEslint};
14
+ import e from"@antfu/eslint-config";const t=(t={})=>e({type:t.type??`app`,unocss:t.unocss??!0,jsx:t.jsx??!0,vue:t.vue??!0,react:!1,ignores:t.ignores??[],formatters:!0,isInEditor:!0,lessOpinionated:!0,stylistic:{indent:2,quotes:`single`,semi:!0},overrides:{vue:{"vue/html-self-closing":[`error`,{html:{void:`always`,normal:`never`,component:`always`},svg:`always`,math:`always`}],"vue/attributes-order":2,"vue/order-in-components":2,"vue/v-on-event-hyphenation":[`error`,`always`,{autofix:!0,ignore:[]}],"vue/custom-event-name-casing":`off`,"vue/html-closing-bracket-spacing":`off`,"vue/multi-word-component-names":`off`,"vue/no-reserved-component-names":`off`,"vue/component-name-in-template-casing":`off`,"vue/max-attributes-per-line":[`error`,{singleline:{max:2},multiline:{max:1}}],"vue/block-order":[`error`,{order:[[`template`,`script`],`style`]}]}},...t.antfu??{}},{rules:{"no-undef":2,"no-use-before-define":`off`,"no-console":2,"no-eval":2,curly:[2,`all`],eqeqeq:[2,`always`,{null:`ignore`}],"prefer-promise-reject-errors":0,"sort-imports":0,"no-case-declarations":0,"import/order":0,"unicorn/prefer-dom-node-text-content":0,"style/indent-binary-ops":0,"style/no-tabs":0,"node/no-callback-literal":0,"node/prefer-global/process":0,"jsdoc/check-param-names":0,"jsdoc/require-param-name":0,"jsdoc/require-returns-description":0,"jsdoc/require-returns-check":0,"unicorn/consistent-function-scoping":0,"perfectionist/sort-imports":0,"perfectionist/sort-exports":0,"perfectionist/sort-named-imports":0,"e18e/prefer-static-regex":0}},...t.flatConfig??[]);export{t as gscEslint};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gsc-basic/eslint-config",
3
3
  "type": "module",
4
- "version": "1.2.1",
4
+ "version": "1.2.3",
5
5
  "description": "ESLint config for GSC Basic Team",
6
6
  "author": "Lenovo SSG BASD <-GSC_Scaffolding_Support@lenovo.com>",
7
7
  "license": "LicenseRef-Proprietary",
@@ -30,18 +30,15 @@
30
30
  "./dist"
31
31
  ],
32
32
  "peerDependencies": {
33
- "@eslint-react/eslint-plugin": "^2.7.4",
34
- "eslint": "^10.0.2",
35
- "eslint-plugin-react-hooks": "^7.0.1",
36
- "eslint-plugin-react-refresh": "^0.5.0"
33
+ "eslint": "^10.1.0"
37
34
  },
38
35
  "dependencies": {
39
- "@antfu/eslint-config": "^7.6.1",
40
- "@unocss/eslint-plugin": "^66.6.1",
36
+ "@antfu/eslint-config": "^7.7.3",
37
+ "@unocss/eslint-plugin": "^66.6.7",
41
38
  "eslint-plugin-format": "^2.0.1"
42
39
  },
43
40
  "scripts": {
44
- "build": "tsup",
41
+ "build": "tsdown",
45
42
  "outdated": "pnpm outdated",
46
43
  "clean": "rimraf ./dist"
47
44
  }