@lincy/eslint-config 3.4.0 → 3.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/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@lincy/eslint-config?color=444&label=)](https://npmjs.com/package/@lincy/eslint-config)
4
4
 
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
+
5
7
  - 单引号,无结尾分号
6
8
  - 自动格式化
7
9
  - 专为与 TypeScript、Vue(2/3) 一起使用而设计,开箱即用
@@ -67,7 +69,7 @@ For example:
67
69
 
68
70
  // 在 IDE 中静默样式规则,但仍会自动修复它们
69
71
  "eslint.rules.customizations": [
70
- { "rule": "@stylistic/*", "severity": "off" },
72
+ { "rule": "style/*", "severity": "off" },
71
73
  { "rule": "*-indent", "severity": "off" },
72
74
  { "rule": "*-spacing", "severity": "off" },
73
75
  { "rule": "*-spaces", "severity": "off" },
@@ -129,21 +131,21 @@ import lincy from '@lincy/eslint-config'
129
131
 
130
132
  export default lincy({
131
133
  // 是否启用 stylistic 格式化规则
132
- stylistic: true, // 默认值: true
134
+ stylistic: true, // 默认值: true, 可选: false | { indent: number | 'tab', quotes: 'single' | 'double', jsx: boolean}
133
135
  // 是否启用 typescript 规则
134
- typescript: true, // 默认值: 检测是否安装typescript依赖
136
+ typescript: true, // 默认值: 检测是否安装typescript依赖, 可选: false
135
137
  // 是否启用 vue 规则
136
- vue: true, // 默认值: 检测是否安装vue依赖
138
+ vue: true, // 默认值: 检测是否安装vue依赖, 可选: false
137
139
  // 是否启用 jsonc 规则
138
- jsonc: false, // 默认值: 检测是否安装typescript依赖
140
+ jsonc: false, // 默认值: true, 可选: false
139
141
  // 是否启用 yaml 规则
140
- yaml: false, // 默认值: true
142
+ yaml: false, // 默认值: true, 可选: false
141
143
  // 是否启用 .gitignore 文件
142
- gitignore: false, // 默认值: true
144
+ gitignore: false, // 默认值: true, 可选: false
143
145
  // 是否启用 test 规则
144
- test: false, // 默认值: true
146
+ test: false, // 默认值: true, 可选: false
145
147
  // 是否启用 markdown 规则
146
- markdown: false, // 默认值: true
148
+ markdown: false, // 默认值: true, 可选: false
147
149
  // 覆盖规则
148
150
  overrides: {},
149
151
 
@@ -245,9 +247,8 @@ export default [
245
247
 
246
248
  查看 [configs](https://github.com/lincenying/eslint-config/blob/main/src/configs) 和 [factory](https://github.com/lincenying/eslint-config/blob/main/src/factory.ts)了解更多详细信息。
247
249
 
248
- > 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.
249
250
 
250
- ## Plugins Renaming
251
+ ### 插件重命名
251
252
 
252
253
  由于扁平化配置支持显式提供了插件名称,因此我们重命名了一些插件以使它们更加一致并隐藏实现细节。
253
254
 
@@ -267,7 +268,7 @@ export default [
267
268
  type foo = { bar: 2 }
268
269
  ```
269
270
 
270
- ### Rules Overrides
271
+ ### 规则覆盖
271
272
 
272
273
  某些规则仅在特定文件中启用,例如,“ts/*”规则仅在“.ts”文件中启用,“vue/*”规则仅在“.vue”文件中启用。 如果要覆盖规则,则需要指定文件扩展名:
273
274
 
@@ -343,7 +344,7 @@ export default lincy({
343
344
  })
344
345
  ```
345
346
 
346
- ### Type Aware Rules
347
+ ### 类型感知规则
347
348
 
348
349
  您可以选择通过将选项对象传递给“typescript”配置来启用[类型感知规则](https://typescript-eslint.io/linting/typed-linting/):
349
350