@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 CHANGED
@@ -34,38 +34,42 @@ pnpm install @fast-china/eslint-config --save-dev
34
34
 
35
35
  ## Use
36
36
 
37
- ```typescript
38
- // < v9.x version. The following is an example of '.eslintrc.cjs'.
37
+ #### .eslintrc.cjs Example
39
38
 
40
- // Simple.
39
+ ```javascript
41
40
  module.exports = {
42
41
  root: true,
43
42
  extends: ["@fast-china"],
44
43
  };
44
+ ```
45
45
 
46
- // With TypeScript type hints.
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
- // >= v9.x version. The following is an example of 'eslint.config.mjs'.
55
+ #### eslint.config.mjs Example
55
56
 
56
- // Simple.
57
+ ```typescript
57
58
  import fastChinaFlat from "@fast-china/eslint-config/flat";
58
59
 
59
60
  export default [...fastChinaFlat];
61
+ ```
60
62
 
61
- // No third-party references.
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
- // With TypeScript type hints.
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
- ```typescript
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
- // 带 TypeScript 类型提示。
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
- // >= v9.x 版本。以下已 ‘eslint.config.mjs 未实例。
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
- // 带 TypeScript 类型提示。
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],
@@ -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, importUseLodashRules, importUseLodashUnifiedRules, javascriptConfigs, jsonConfigs, markdownConfigs, packageJsonSortConfigs, prettierConfigs, regexpConfigs, tsconfigJsonSortConfigs, typescriptConfigs, typescriptCoreConfigs, vueConfigs };
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 };