@lincy/eslint-config 5.3.0 → 5.3.2

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
@@ -4,15 +4,15 @@
4
4
 
5
5
  > Thanks to [sxzz/eslint-config](https://github.com/sxzz/eslint-config) and [antfu/eslint-config](https://github.com/antfu/eslint-config) for the inspiration and reference.
6
6
 
7
- - 单引号,无结尾分号
8
- - 自动格式化
9
- - 专为与 TypeScript、Vue(2/3)、React 一起使用而设计,开箱即用
10
- - 也适用于 json、yaml、markdown
11
- - import导入排序, 对象字⾯量项尾逗号
12
- - 合理的默认值,最佳实践,只需一行配置
13
- - [ESLint Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new)
14
- - 使用 [ESLint Stylistic](https://github.com/eslint-stylistic/eslint-stylistic)
15
- - **风格原则**: 读取最小,差异稳定
7
+ - 单引号,无结尾分号
8
+ - 自动格式化
9
+ - 专为与 TypeScript、Vue(2/3)、React 一起使用而设计,开箱即用
10
+ - 也适用于 json、yaml、markdown
11
+ - import导入排序, 对象字⾯量项尾逗号
12
+ - 合理的默认值,最佳实践,只需一行配置
13
+ - [ESLint Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new)
14
+ - 使用 [ESLint Stylistic](https://github.com/eslint-stylistic/eslint-stylistic)
15
+ - **风格原则**: 读取最小,差异稳定
16
16
 
17
17
  ## Usage
18
18
 
@@ -44,7 +44,7 @@ export default lincy()
44
44
  }
45
45
  ```
46
46
 
47
- ## VS Code support (保存时自动修复)
47
+ ### VS Code support (保存时自动修复)
48
48
 
49
49
  安装 [VS Code ESLint扩展](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
50
50
 
@@ -101,6 +101,16 @@ export default lincy()
101
101
  }
102
102
  ```
103
103
 
104
+ ### 使用.ts文件作为配置文件
105
+
106
+ 1. 将`eslint`更新至最新版本
107
+ 2. 在`package.json`中的`eslint .`后面添加参数`--flag unstable_ts_config`, 包括`scripts`、`lint-staged`中
108
+ 3. 在`.vscode/settings.json`文件添加`"eslint.options": {
109
+ "flags": [
110
+ "unstable_ts_config"
111
+ ]
112
+ }`
113
+
104
114
  ## 定制化
105
115
 
106
116
  通常你只需要导入 `lincy` 预设:
package/dist/index.cjs CHANGED
@@ -101,7 +101,7 @@ __export(src_exports, {
101
101
  });
102
102
  module.exports = __toCommonJS(src_exports);
103
103
 
104
- // node_modules/.pnpm/tsup@8.3.5_jiti@2.3.3_postcss@8.4.47_tsx@4.19.2_typescript@5.6.3_yaml@2.6.0/node_modules/tsup/assets/cjs_shims.js
104
+ // node_modules/.pnpm/tsup@8.3.5_jiti@2.4.1_postcss@8.4.49_tsx@4.19.2_typescript@5.7.2_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js
105
105
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
106
106
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
107
107
 
@@ -1227,7 +1227,6 @@ async function react(options = {}) {
1227
1227
  interopDefault(import("@eslint-react/eslint-plugin")),
1228
1228
  // @ts-expect-error missing types
1229
1229
  interopDefault(import("eslint-plugin-react-hooks")),
1230
- // @ts-expect-error missing types
1231
1230
  interopDefault(import("eslint-plugin-react-refresh"))
1232
1231
  ]);
1233
1232
  const _isAllowConstantExport = ReactRefreshAllowConstantExportPackages.some(