@lincy/eslint-config 5.2.7 → 5.3.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 +77 -10
- package/dist/index.cjs +123 -97
- package/dist/index.d.cts +718 -600
- package/dist/index.d.ts +718 -600
- package/dist/index.js +121 -97
- package/package.json +25 -23
package/README.md
CHANGED
|
@@ -140,19 +140,41 @@ export default lincy({
|
|
|
140
140
|
/**
|
|
141
141
|
* 是否启用 stylistic 格式化规则
|
|
142
142
|
* @default 默认值: true
|
|
143
|
-
* @example 可选: false |
|
|
143
|
+
* @example 可选: false |
|
|
144
|
+
* {
|
|
145
|
+
* indent?: number | 'tab';
|
|
146
|
+
* quotes?: 'single' | 'double';
|
|
147
|
+
* jsx?: boolean;
|
|
148
|
+
* semi?: boolean;
|
|
149
|
+
* lessOpinionated?: boolean;
|
|
150
|
+
* }
|
|
144
151
|
*/
|
|
145
152
|
stylistic: true,
|
|
146
153
|
/**
|
|
147
154
|
* 是否启用 typescript 规则
|
|
148
155
|
* @default 默认值: 检测是否安装typescript依赖,
|
|
149
|
-
* @example 可选: false | true |
|
|
156
|
+
* @example 可选: false | true |
|
|
157
|
+
* {
|
|
158
|
+
* files?: string[], // 自定义 glob 覆盖 “files” 选项
|
|
159
|
+
* componentExts: string[], // 组件的附加扩展
|
|
160
|
+
* parserOptions: {};
|
|
161
|
+
* filesTypeAware: string[],
|
|
162
|
+
* ignoresTypeAware?: string[],
|
|
163
|
+
* tsconfigPath?: string,
|
|
164
|
+
* type: 'app' | 'lib'
|
|
165
|
+
* }
|
|
150
166
|
*/
|
|
151
167
|
typescript: true,
|
|
152
168
|
/**
|
|
153
169
|
* 是否启用 vue 规则
|
|
154
170
|
* @default 默认值: 检测是否安装vue依赖,
|
|
155
|
-
* @example 可选: false | true |
|
|
171
|
+
* @example 可选: false | true |
|
|
172
|
+
* {
|
|
173
|
+
* files?: string[]; // 自定义 glob 覆盖 “files” 选项
|
|
174
|
+
* stylistic: boolean; // 是否开启 stylistic
|
|
175
|
+
* sfcBlocks: boolean; // 为 Vue SFC 创建虚拟文件以启用 linting
|
|
176
|
+
* typescript: boolean; // 是否开启 typescript
|
|
177
|
+
* }
|
|
156
178
|
*/
|
|
157
179
|
vue: true,
|
|
158
180
|
/**
|
|
@@ -164,31 +186,53 @@ export default lincy({
|
|
|
164
186
|
/**
|
|
165
187
|
* 是否启用 react 规则
|
|
166
188
|
* @default 默认值: 检测是否安装react依赖,
|
|
167
|
-
* @example 可选: false | true |
|
|
189
|
+
* @example 可选: false | true |
|
|
190
|
+
* {
|
|
191
|
+
* files?: string[], // 自定义 glob 覆盖 “files” 选项
|
|
192
|
+
* filesTypeAware?: string[], // 应该识别类型的文件的全局模式.
|
|
193
|
+
* ignoresTypeAware?: string[], // 不应具有类型感知的文件的 Glob 模式
|
|
194
|
+
* tsconfigPath?: string, // 提供此选项后,将启用类型感知规则
|
|
195
|
+
* }
|
|
168
196
|
*/
|
|
169
197
|
react: true,
|
|
170
198
|
/**
|
|
171
199
|
* 是否启用 unocss 规则
|
|
172
200
|
* @default 默认值: false,
|
|
173
|
-
* @example 可选: true |
|
|
201
|
+
* @example 可选: true |
|
|
202
|
+
* {
|
|
203
|
+
* attributify?: boolean; // 启用 attributify 支持.
|
|
204
|
+
* strict?: boolean; // 启用严格模式,抛出有关阻止列表类的错误
|
|
205
|
+
* }
|
|
174
206
|
*/
|
|
175
207
|
unocss: true,
|
|
176
208
|
/**
|
|
177
209
|
* 是否启用 jsonc 规则
|
|
178
210
|
* @default 默认值: true,
|
|
179
|
-
* @example 可选: false |
|
|
211
|
+
* @example 可选: false |
|
|
212
|
+
* {
|
|
213
|
+
* files?: string[]; // 自定义 glob 覆盖 “files” 选项
|
|
214
|
+
* stylistic: boolean; // 是否开启 stylistic
|
|
215
|
+
* }
|
|
180
216
|
*/
|
|
181
217
|
jsonc: false,
|
|
182
218
|
/**
|
|
183
219
|
* 是否启用 yaml 规则
|
|
184
220
|
* @default 默认值: true,
|
|
185
|
-
* @example 可选: false |
|
|
221
|
+
* @example 可选: false |
|
|
222
|
+
* {
|
|
223
|
+
* files?: string[]; // 自定义 glob 覆盖 “files” 选项
|
|
224
|
+
* stylistic: boolean; // 是否开启 stylistic
|
|
225
|
+
* }
|
|
186
226
|
*/
|
|
187
227
|
yaml: false,
|
|
188
228
|
/**
|
|
189
229
|
* 是否启用 toml 规则
|
|
190
230
|
* @default 默认值: false,
|
|
191
|
-
* @example 可选: true
|
|
231
|
+
* @example 可选: true |
|
|
232
|
+
* {
|
|
233
|
+
* files?: string[]; // 自定义 glob 覆盖 “files” 选项
|
|
234
|
+
* stylistic: boolean; // 是否开启 stylistic
|
|
235
|
+
* }
|
|
192
236
|
*/
|
|
193
237
|
toml: false,
|
|
194
238
|
/**
|
|
@@ -218,7 +262,13 @@ export default lincy({
|
|
|
218
262
|
/**
|
|
219
263
|
* 是否启用 formatters 规则
|
|
220
264
|
* @default 默认值: false,
|
|
221
|
-
* @example 可选: true |
|
|
265
|
+
* @example 可选: true |
|
|
266
|
+
* {
|
|
267
|
+
* css?: 'prettier' | boolean;
|
|
268
|
+
* html?: 'prettier' | boolean;
|
|
269
|
+
* graphql?: 'prettier' | boolean;
|
|
270
|
+
* markdown?: 'prettier' | 'dprint' | boolean
|
|
271
|
+
* }
|
|
222
272
|
*/
|
|
223
273
|
formatters: false,
|
|
224
274
|
/**
|
|
@@ -524,6 +574,11 @@ export default lincy({
|
|
|
524
574
|
* 默认使用 Prettier
|
|
525
575
|
*/
|
|
526
576
|
css: true,
|
|
577
|
+
/**
|
|
578
|
+
* 格式化 graphql 文件
|
|
579
|
+
* 默认使用 Prettier
|
|
580
|
+
*/
|
|
581
|
+
graphql: true,
|
|
527
582
|
/**
|
|
528
583
|
* 格式化 HTML 文件
|
|
529
584
|
* 默认使用 Prettier
|
|
@@ -534,7 +589,19 @@ export default lincy({
|
|
|
534
589
|
* 支持 Prettier 和 dprint
|
|
535
590
|
* 默认使用 Prettier
|
|
536
591
|
*/
|
|
537
|
-
markdown: 'prettier'
|
|
592
|
+
markdown: 'prettier',
|
|
593
|
+
/**
|
|
594
|
+
* 格式化 svg 文件
|
|
595
|
+
* 需要安装 @prettier/plugin-xml 插件
|
|
596
|
+
* 默认使用 Prettier
|
|
597
|
+
*/
|
|
598
|
+
svg: 'prettier',
|
|
599
|
+
/**
|
|
600
|
+
* 格式化 xml 文件
|
|
601
|
+
* 需要安装 @prettier/plugin-xml 插件
|
|
602
|
+
* 默认使用 Prettier
|
|
603
|
+
*/
|
|
604
|
+
xml: 'prettier'
|
|
538
605
|
}
|
|
539
606
|
})
|
|
540
607
|
```
|