@vinicunca/eslint-config 1.10.1 → 2.0.0-beta.2
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/dist/index.d.ts +145 -0
- package/dist/index.js +1529 -0
- package/package.json +72 -17
- package/index.js +0 -5
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { FlatESLintConfigItem } from 'eslint-define-config';
|
|
2
|
+
|
|
3
|
+
interface OptionsConfig {
|
|
4
|
+
/**
|
|
5
|
+
* Enable TypeScript support.
|
|
6
|
+
*
|
|
7
|
+
* Passing an object to enable TypeScript Language Server support.
|
|
8
|
+
*
|
|
9
|
+
* @default auto-detect based on the dependencies
|
|
10
|
+
*/
|
|
11
|
+
typescript?: boolean | OptionsTypeScriptWithLanguageServer;
|
|
12
|
+
/**
|
|
13
|
+
* Enable test support.
|
|
14
|
+
*
|
|
15
|
+
* @default true
|
|
16
|
+
*/
|
|
17
|
+
test?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Enable Vue support.
|
|
20
|
+
*
|
|
21
|
+
* @default auto-detect based on the dependencies
|
|
22
|
+
*/
|
|
23
|
+
vue?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Enable JSONC support.
|
|
26
|
+
*
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
jsonc?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Enable YAML support.
|
|
32
|
+
*
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
yaml?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Enable Markdown support.
|
|
38
|
+
*
|
|
39
|
+
* @default true
|
|
40
|
+
*/
|
|
41
|
+
markdown?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Enable stylistic rules.
|
|
44
|
+
*
|
|
45
|
+
* @default true
|
|
46
|
+
*/
|
|
47
|
+
stylistic?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Enable sonarjs rules.
|
|
50
|
+
*
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
53
|
+
sonar?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Enable react support.
|
|
56
|
+
* In This plugin, react is not supported as a first class citizen. 😎
|
|
57
|
+
*
|
|
58
|
+
* @default false
|
|
59
|
+
*/
|
|
60
|
+
react?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Control to disable some rules in editors.
|
|
63
|
+
* @default auto-detect based on the process.env
|
|
64
|
+
*/
|
|
65
|
+
isInEditor?: boolean;
|
|
66
|
+
}
|
|
67
|
+
interface OptionsIsInEditor {
|
|
68
|
+
isInEditor?: boolean;
|
|
69
|
+
}
|
|
70
|
+
interface OptionsComponentExts {
|
|
71
|
+
/**
|
|
72
|
+
* Additional extensions for components.
|
|
73
|
+
*
|
|
74
|
+
* @example ['vue']
|
|
75
|
+
* @default []
|
|
76
|
+
*/
|
|
77
|
+
componentExts?: string[];
|
|
78
|
+
}
|
|
79
|
+
interface OptionsTypeScriptWithLanguageServer {
|
|
80
|
+
tsconfigPath: string;
|
|
81
|
+
tsconfigRootDir?: string;
|
|
82
|
+
}
|
|
83
|
+
interface OptionsHasTypeScript {
|
|
84
|
+
typescript?: boolean;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
declare function vinicuncaESLint({ options, userConfigs }: {
|
|
88
|
+
options?: OptionsConfig;
|
|
89
|
+
userConfigs: (FlatESLintConfigItem | FlatESLintConfigItem[])[];
|
|
90
|
+
}): FlatESLintConfigItem[];
|
|
91
|
+
|
|
92
|
+
declare const comments: FlatESLintConfigItem[];
|
|
93
|
+
|
|
94
|
+
declare const ignores: FlatESLintConfigItem[];
|
|
95
|
+
|
|
96
|
+
declare const imports: FlatESLintConfigItem[];
|
|
97
|
+
|
|
98
|
+
declare function javascript(options?: OptionsIsInEditor): FlatESLintConfigItem[];
|
|
99
|
+
|
|
100
|
+
declare const jsdoc: FlatESLintConfigItem[];
|
|
101
|
+
|
|
102
|
+
declare const jsonc: FlatESLintConfigItem[];
|
|
103
|
+
|
|
104
|
+
declare function markdown(options?: OptionsComponentExts): FlatESLintConfigItem[];
|
|
105
|
+
|
|
106
|
+
declare const node: FlatESLintConfigItem[];
|
|
107
|
+
|
|
108
|
+
declare const react: FlatESLintConfigItem[];
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Sort package.json
|
|
112
|
+
*
|
|
113
|
+
* Requires `jsonc` config
|
|
114
|
+
*/
|
|
115
|
+
declare const sortPackageJson: FlatESLintConfigItem[];
|
|
116
|
+
/**
|
|
117
|
+
* Sort tsconfig.json
|
|
118
|
+
*
|
|
119
|
+
* Requires `jsonc` config
|
|
120
|
+
*/
|
|
121
|
+
declare const sortTsconfig: FlatESLintConfigItem[];
|
|
122
|
+
|
|
123
|
+
declare const javascriptStylistic: FlatESLintConfigItem[];
|
|
124
|
+
declare const typescriptStylistic: FlatESLintConfigItem[];
|
|
125
|
+
|
|
126
|
+
declare function test(options?: OptionsIsInEditor): FlatESLintConfigItem[];
|
|
127
|
+
|
|
128
|
+
declare function typescript(options?: OptionsComponentExts): FlatESLintConfigItem[];
|
|
129
|
+
declare function typescriptWithLanguageServer(options: OptionsTypeScriptWithLanguageServer & OptionsComponentExts): FlatESLintConfigItem[];
|
|
130
|
+
|
|
131
|
+
declare const unicorn: FlatESLintConfigItem[];
|
|
132
|
+
|
|
133
|
+
declare function vue(options?: OptionsHasTypeScript): FlatESLintConfigItem[];
|
|
134
|
+
|
|
135
|
+
declare const yml: FlatESLintConfigItem[];
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Combine array and non-array configs into a single array.
|
|
139
|
+
*/
|
|
140
|
+
declare function combineConfigs(...configs: (FlatESLintConfigItem | FlatESLintConfigItem[])[]): FlatESLintConfigItem[];
|
|
141
|
+
declare function renameRules(rules: Record<string, any>, from: string, to: string): {
|
|
142
|
+
[k: string]: any;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export { OptionsComponentExts, OptionsConfig, OptionsHasTypeScript, OptionsIsInEditor, OptionsTypeScriptWithLanguageServer, combineConfigs, comments, vinicuncaESLint as default, ignores, imports, javascript, javascriptStylistic, jsdoc, jsonc, markdown, node, react, renameRules, sortPackageJson, sortTsconfig, test, typescript, typescriptStylistic, typescriptWithLanguageServer, unicorn, vinicuncaESLint, vue, yml };
|