@fast-china/eslint-config 1.0.16 → 1.0.18
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 +13 -9
- package/README.zh.md +13 -9
- package/dist/flat/index.d.ts +24 -10
- package/dist/flat/index.js +589 -602
- package/dist/flat/index.js.map +1 -1
- package/dist/v8/index.cjs +876 -0
- package/dist/v8/index.cjs.map +1 -0
- package/package.json +26 -26
- package/dist/index.cjs +0 -672
package/README.md
CHANGED
|
@@ -34,38 +34,42 @@ pnpm install @fast-china/eslint-config --save-dev
|
|
|
34
34
|
|
|
35
35
|
## Use
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
// < v9.x version. The following is an example of '.eslintrc.cjs'.
|
|
37
|
+
#### .eslintrc.cjs Example
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
```javascript
|
|
41
40
|
module.exports = {
|
|
42
41
|
root: true,
|
|
43
42
|
extends: ["@fast-china"],
|
|
44
43
|
};
|
|
44
|
+
```
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
```javascript
|
|
47
47
|
const { defineConfig } = require("eslint-define-config");
|
|
48
48
|
|
|
49
49
|
module.exports = defineConfig({
|
|
50
50
|
root: true,
|
|
51
51
|
extends: ["@fast-china/eslint-config"],
|
|
52
52
|
});
|
|
53
|
+
```
|
|
53
54
|
|
|
54
|
-
|
|
55
|
+
#### eslint.config.mjs Example
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
```typescript
|
|
57
58
|
import fastChinaFlat from "@fast-china/eslint-config/flat";
|
|
58
59
|
|
|
59
60
|
export default [...fastChinaFlat];
|
|
61
|
+
```
|
|
60
62
|
|
|
61
|
-
|
|
63
|
+
```typescript
|
|
64
|
+
import fastChinaFlat from "@fast-china/eslint-config/flat";
|
|
62
65
|
import { defineConfig } from "eslint/config";
|
|
63
66
|
|
|
64
67
|
export default defineConfig([...fastChinaFlat]);
|
|
68
|
+
```
|
|
65
69
|
|
|
66
|
-
|
|
67
|
-
import tseslint from "typescript-eslint";
|
|
70
|
+
```typescript
|
|
68
71
|
import fastChinaFlat from "@fast-china/eslint-config/flat";
|
|
72
|
+
import tseslint from "typescript-eslint";
|
|
69
73
|
|
|
70
74
|
export default tseslint.config({
|
|
71
75
|
extends: [...fastChinaFlat],
|
package/README.zh.md
CHANGED
|
@@ -34,38 +34,42 @@ pnpm install @fast-china/eslint-config --save-dev
|
|
|
34
34
|
|
|
35
35
|
## 使用
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
// < v9.x 版本。以下已 ‘.eslintrc.cjs’ 为示例。
|
|
37
|
+
#### .eslintrc.cjs 示例
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
```javascript
|
|
41
40
|
module.exports = {
|
|
42
41
|
root: true,
|
|
43
42
|
extends: ["@fast-china"],
|
|
44
43
|
};
|
|
44
|
+
```
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
```javascript
|
|
47
47
|
const { defineConfig } = require("eslint-define-config");
|
|
48
48
|
|
|
49
49
|
module.exports = defineConfig({
|
|
50
50
|
root: true,
|
|
51
51
|
extends: ["@fast-china/eslint-config"],
|
|
52
52
|
});
|
|
53
|
+
```
|
|
53
54
|
|
|
54
|
-
|
|
55
|
+
#### eslint.config.mjs 示例
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
```typescript
|
|
57
58
|
import fastChinaFlat from "@fast-china/eslint-config/flat";
|
|
58
59
|
|
|
59
60
|
export default [...fastChinaFlat];
|
|
61
|
+
```
|
|
60
62
|
|
|
61
|
-
|
|
63
|
+
```typescript
|
|
64
|
+
import fastChinaFlat from "@fast-china/eslint-config/flat";
|
|
62
65
|
import { defineConfig } from "eslint/config";
|
|
63
66
|
|
|
64
67
|
export default defineConfig([...fastChinaFlat]);
|
|
68
|
+
```
|
|
65
69
|
|
|
66
|
-
|
|
67
|
-
import tseslint from "typescript-eslint";
|
|
70
|
+
```typescript
|
|
68
71
|
import fastChinaFlat from "@fast-china/eslint-config/flat";
|
|
72
|
+
import tseslint from "typescript-eslint";
|
|
69
73
|
|
|
70
74
|
export default tseslint.config({
|
|
71
75
|
extends: [...fastChinaFlat],
|
package/dist/flat/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as _typescript_eslint_utils_dist_ts_eslint from '@typescript-eslint/utils/dist/ts-eslint';
|
|
2
|
-
import { Linter } from 'eslint';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* 公共配置
|
|
@@ -12,14 +11,6 @@ declare const commonConfigs: _typescript_eslint_utils_dist_ts_eslint.FlatConfig.
|
|
|
12
11
|
*/
|
|
13
12
|
declare const ignoresConfigs: _typescript_eslint_utils_dist_ts_eslint.FlatConfig.ConfigArray;
|
|
14
13
|
|
|
15
|
-
/**
|
|
16
|
-
* 导入使用 lodash-unified 模块规则
|
|
17
|
-
*/
|
|
18
|
-
declare const importUseLodashUnifiedRules: Linter.RulesRecord;
|
|
19
|
-
/**
|
|
20
|
-
* 导入使用 lodash 模块规则
|
|
21
|
-
*/
|
|
22
|
-
declare const importUseLodashRules: Linter.RulesRecord;
|
|
23
14
|
/**
|
|
24
15
|
* import配置
|
|
25
16
|
*/
|
|
@@ -90,6 +81,10 @@ declare const CONST_TS = "**/*.?([cm])ts";
|
|
|
90
81
|
* TSX
|
|
91
82
|
*/
|
|
92
83
|
declare const CONST_TSX = "**/*.?([cm])tsx";
|
|
84
|
+
/**
|
|
85
|
+
* .d.ts
|
|
86
|
+
*/
|
|
87
|
+
declare const CONST_DTS = "**/*.d.ts";
|
|
93
88
|
/**
|
|
94
89
|
* JSON
|
|
95
90
|
*/
|
|
@@ -139,6 +134,25 @@ declare const CONST_PUBLIC = "**/public";
|
|
|
139
134
|
*/
|
|
140
135
|
declare const CONST_TSCONFIG: string[];
|
|
141
136
|
|
|
137
|
+
/**
|
|
138
|
+
* JavaScript 预置配置
|
|
139
|
+
*
|
|
140
|
+
* @description ignores,common,javascript,import,regexp
|
|
141
|
+
*/
|
|
142
|
+
declare const PresetJavascriptConfigs: _typescript_eslint_utils_dist_ts_eslint.FlatConfig.Config[];
|
|
143
|
+
/**
|
|
144
|
+
* JSON 预置配置
|
|
145
|
+
*/
|
|
146
|
+
declare const PresetJsonConfigs: _typescript_eslint_utils_dist_ts_eslint.FlatConfig.Config[];
|
|
147
|
+
/**
|
|
148
|
+
* 基础预置配置
|
|
149
|
+
*
|
|
150
|
+
* @description javascript,typescript,json
|
|
151
|
+
*/
|
|
152
|
+
declare const PresetBasicConfigs: _typescript_eslint_utils_dist_ts_eslint.FlatConfig.Config[];
|
|
153
|
+
/**
|
|
154
|
+
* 默认最全的配置
|
|
155
|
+
*/
|
|
142
156
|
declare const _default: _typescript_eslint_utils_dist_ts_eslint.FlatConfig.Config[];
|
|
143
157
|
|
|
144
|
-
export { CONST_DIST, CONST_JS, CONST_JSON, CONST_JSON5, CONST_JSON6, CONST_JSONC, CONST_JSX, CONST_LOCKFILE, CONST_MD, CONST_NODE_MODULES, CONST_PUBLIC, CONST_TS, CONST_TSCONFIG, CONST_TSX, CONST_VUE, CONST_YAML, commonConfigs, _default as default, ignoresConfigs, importConfigs,
|
|
158
|
+
export { CONST_DIST, CONST_DTS, CONST_JS, CONST_JSON, CONST_JSON5, CONST_JSON6, CONST_JSONC, CONST_JSX, CONST_LOCKFILE, CONST_MD, CONST_NODE_MODULES, CONST_PUBLIC, CONST_TS, CONST_TSCONFIG, CONST_TSX, CONST_VUE, CONST_YAML, PresetBasicConfigs, PresetJavascriptConfigs, PresetJsonConfigs, commonConfigs, _default as default, ignoresConfigs, importConfigs, javascriptConfigs, jsonConfigs, markdownConfigs, packageJsonSortConfigs, prettierConfigs, regexpConfigs, tsconfigJsonSortConfigs, typescriptConfigs, typescriptCoreConfigs, vueConfigs };
|