@kingsword/lint-config 0.1.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/LICENSE +21 -0
- package/README.md +54 -0
- package/configs/oxlint/backend.json +3 -0
- package/configs/oxlint/base.json +42 -0
- package/configs/oxlint/frontend.json +34 -0
- package/configs/oxlint/fullstack.json +8 -0
- package/configs/oxlint/recommended.json +45 -0
- package/configs/oxlint/restricted-syntax-base.json +35 -0
- package/configs/oxlint/restricted-syntax-frontend.json +123 -0
- package/configs/oxlint/vitest-kingsword.json +10 -0
- package/configs/oxlint/vitest-strict.json +11 -0
- package/configs/oxlint/vitest.json +24 -0
- package/dist/chunk-CbDLau6x.cjs +34 -0
- package/dist/cli.cjs +106 -0
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +106 -0
- package/dist/config.cjs +220 -0
- package/dist/config.d.cts +20 -0
- package/dist/config.d.mts +20 -0
- package/dist/config.mjs +214 -0
- package/dist/index.cjs +2003 -0
- package/dist/index.d.cts +53 -0
- package/dist/index.d.mts +54 -0
- package/dist/index.mjs +2000 -0
- package/docs/rules.zh-CN.md +491 -0
- package/package.json +92 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
//#region src/types.d.ts
|
|
2
|
+
type AnyNode = any;
|
|
3
|
+
type RuleSourceCode = {
|
|
4
|
+
getText: (node?: AnyNode) => string;
|
|
5
|
+
getAncestors: (node: AnyNode) => AnyNode[];
|
|
6
|
+
};
|
|
7
|
+
type RuleContext = {
|
|
8
|
+
filename: string;
|
|
9
|
+
sourceCode: RuleSourceCode;
|
|
10
|
+
options?: unknown[];
|
|
11
|
+
report: (descriptor: Record<string, unknown>) => void;
|
|
12
|
+
};
|
|
13
|
+
type RuleModule = {
|
|
14
|
+
meta: Record<string, any>;
|
|
15
|
+
create: (context: RuleContext) => Record<string, any>;
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/index.d.ts
|
|
19
|
+
declare const plugin: {
|
|
20
|
+
meta: {
|
|
21
|
+
name: string;
|
|
22
|
+
version: string;
|
|
23
|
+
};
|
|
24
|
+
rules: {
|
|
25
|
+
"no-restricted-syntax": RuleModule;
|
|
26
|
+
"no-exported-function-expressions": RuleModule;
|
|
27
|
+
"no-exported-string-union-types": RuleModule;
|
|
28
|
+
"structured-logging": RuleModule;
|
|
29
|
+
"enum-file-organization": RuleModule;
|
|
30
|
+
"types-file-organization": RuleModule;
|
|
31
|
+
"constants-file-organization": RuleModule;
|
|
32
|
+
"errors-file-organization": RuleModule;
|
|
33
|
+
"test-utils-organization": RuleModule;
|
|
34
|
+
"test-file-location": RuleModule;
|
|
35
|
+
"require-test-files": RuleModule;
|
|
36
|
+
"require-tsx-test-stories-files": RuleModule;
|
|
37
|
+
"vitest-mock-absolute-paths": RuleModule;
|
|
38
|
+
"vitest-mock-require-actual": RuleModule;
|
|
39
|
+
"vitest-no-focused-tests": RuleModule;
|
|
40
|
+
"vitest-no-disabled-tests": RuleModule;
|
|
41
|
+
"vitest-no-test-prefixes": RuleModule;
|
|
42
|
+
"no-log-exception-with-throw": RuleModule;
|
|
43
|
+
"require-route-middleware": RuleModule;
|
|
44
|
+
"require-v0-route-handle-middleware": RuleModule;
|
|
45
|
+
"require-v0-strict-schemas": RuleModule;
|
|
46
|
+
"filename-match-export": RuleModule;
|
|
47
|
+
"restrict-tsx-components": RuleModule;
|
|
48
|
+
"no-dynamic-styled-components": RuleModule;
|
|
49
|
+
"no-plain-html-text-elements": RuleModule;
|
|
50
|
+
"no-use-effect-in-hooks": RuleModule;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export = plugin;
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
//#region src/types.d.ts
|
|
2
|
+
type AnyNode = any;
|
|
3
|
+
type RuleSourceCode = {
|
|
4
|
+
getText: (node?: AnyNode) => string;
|
|
5
|
+
getAncestors: (node: AnyNode) => AnyNode[];
|
|
6
|
+
};
|
|
7
|
+
type RuleContext = {
|
|
8
|
+
filename: string;
|
|
9
|
+
sourceCode: RuleSourceCode;
|
|
10
|
+
options?: unknown[];
|
|
11
|
+
report: (descriptor: Record<string, unknown>) => void;
|
|
12
|
+
};
|
|
13
|
+
type RuleModule = {
|
|
14
|
+
meta: Record<string, any>;
|
|
15
|
+
create: (context: RuleContext) => Record<string, any>;
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/index.d.ts
|
|
19
|
+
declare const plugin: {
|
|
20
|
+
meta: {
|
|
21
|
+
name: string;
|
|
22
|
+
version: string;
|
|
23
|
+
};
|
|
24
|
+
rules: {
|
|
25
|
+
"no-restricted-syntax": RuleModule;
|
|
26
|
+
"no-exported-function-expressions": RuleModule;
|
|
27
|
+
"no-exported-string-union-types": RuleModule;
|
|
28
|
+
"structured-logging": RuleModule;
|
|
29
|
+
"enum-file-organization": RuleModule;
|
|
30
|
+
"types-file-organization": RuleModule;
|
|
31
|
+
"constants-file-organization": RuleModule;
|
|
32
|
+
"errors-file-organization": RuleModule;
|
|
33
|
+
"test-utils-organization": RuleModule;
|
|
34
|
+
"test-file-location": RuleModule;
|
|
35
|
+
"require-test-files": RuleModule;
|
|
36
|
+
"require-tsx-test-stories-files": RuleModule;
|
|
37
|
+
"vitest-mock-absolute-paths": RuleModule;
|
|
38
|
+
"vitest-mock-require-actual": RuleModule;
|
|
39
|
+
"vitest-no-focused-tests": RuleModule;
|
|
40
|
+
"vitest-no-disabled-tests": RuleModule;
|
|
41
|
+
"vitest-no-test-prefixes": RuleModule;
|
|
42
|
+
"no-log-exception-with-throw": RuleModule;
|
|
43
|
+
"require-route-middleware": RuleModule;
|
|
44
|
+
"require-v0-route-handle-middleware": RuleModule;
|
|
45
|
+
"require-v0-strict-schemas": RuleModule;
|
|
46
|
+
"filename-match-export": RuleModule;
|
|
47
|
+
"restrict-tsx-components": RuleModule;
|
|
48
|
+
"no-dynamic-styled-components": RuleModule;
|
|
49
|
+
"no-plain-html-text-elements": RuleModule;
|
|
50
|
+
"no-use-effect-in-hooks": RuleModule;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { plugin as default };
|