@alextheman/eslint-plugin 5.8.2 → 5.9.1
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.cjs +45 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.js +46 -6
- package/dist/internal/index.cjs +4243 -0
- package/dist/internal/index.d.cts +174 -0
- package/dist/internal/index.d.ts +174 -0
- package/dist/internal/index.js +4231 -0
- package/dist/utility/index.d.cts +1 -1
- package/package.json +10 -3
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { Config } from "prettier";
|
|
2
|
+
import { TypeDocOptions } from "typedoc";
|
|
3
|
+
import { PluginOptions } from "typedoc-plugin-markdown";
|
|
4
|
+
import * as vite from "vite";
|
|
5
|
+
import { VitestEnvironment } from "vitest/node";
|
|
6
|
+
import { Linter } from "eslint";
|
|
7
|
+
|
|
8
|
+
//#region src/configs/external/prettierConfig.d.ts
|
|
9
|
+
declare const prettierConfig: Config;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/configs/external/typeDocConfig.d.ts
|
|
12
|
+
declare function typeDocConfig(entryPoints?: string[]): TypeDocOptions & PluginOptions;
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/configs/external/vitestConfig.d.ts
|
|
15
|
+
declare function vitestConfig(environment?: VitestEnvironment): vite.UserConfig;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/configs/helpers/reactLanguageOptions.d.ts
|
|
18
|
+
declare const reactLanguageOptions: Linter.LanguageOptions;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/configs/helpers/typeScriptLanguageOptions.d.ts
|
|
21
|
+
declare const typeScriptLanguageOptions: Linter.LanguageOptions;
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/configs/helpers/unusedVarsIgnorePatterns.d.ts
|
|
24
|
+
declare const unusedVarsIgnorePatterns: {
|
|
25
|
+
argsIgnorePattern: string;
|
|
26
|
+
caughtErrorsIgnorePattern: string;
|
|
27
|
+
varsIgnorePattern: string;
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/configs/helpers/sorting/sortClasses.d.ts
|
|
31
|
+
declare const sortClasses: {
|
|
32
|
+
customGroups: never[];
|
|
33
|
+
fallbackSort: {
|
|
34
|
+
type: string;
|
|
35
|
+
};
|
|
36
|
+
groups: (string | string[])[];
|
|
37
|
+
ignoreCase: boolean;
|
|
38
|
+
newlinesBetween: number;
|
|
39
|
+
order: string;
|
|
40
|
+
partitionByComment: boolean;
|
|
41
|
+
partitionByNewLine: boolean;
|
|
42
|
+
specialCharacters: string;
|
|
43
|
+
type: string;
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/configs/helpers/sorting/sortExports.d.ts
|
|
47
|
+
declare const sortExports: {
|
|
48
|
+
customGroups: never[];
|
|
49
|
+
fallbackSort: {
|
|
50
|
+
type: string;
|
|
51
|
+
};
|
|
52
|
+
groups: string[];
|
|
53
|
+
ignoreCase: boolean;
|
|
54
|
+
newlinesBetween: number;
|
|
55
|
+
order: string;
|
|
56
|
+
partitionByComment: boolean;
|
|
57
|
+
partitionByNewLine: boolean;
|
|
58
|
+
specialCharacters: string;
|
|
59
|
+
type: string;
|
|
60
|
+
};
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/configs/helpers/sorting/sortImports.d.ts
|
|
63
|
+
declare const sortImports: {
|
|
64
|
+
customGroups: ({
|
|
65
|
+
elementNamePattern: string[];
|
|
66
|
+
groupName: string;
|
|
67
|
+
selector?: undefined;
|
|
68
|
+
} | {
|
|
69
|
+
elementNamePattern: string[];
|
|
70
|
+
groupName: string;
|
|
71
|
+
selector: string;
|
|
72
|
+
})[];
|
|
73
|
+
groups: string[];
|
|
74
|
+
ignoreCase: boolean;
|
|
75
|
+
internalPattern: string[];
|
|
76
|
+
newlinesBetween: number;
|
|
77
|
+
order: string;
|
|
78
|
+
partitionByComment: boolean;
|
|
79
|
+
partitionByNewLine: boolean;
|
|
80
|
+
specialCharacters: string;
|
|
81
|
+
type: string;
|
|
82
|
+
};
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region src/configs/helpers/sorting/sortObjects.d.ts
|
|
85
|
+
declare const sortObjects: {
|
|
86
|
+
customGroups: never[];
|
|
87
|
+
fallbackSort: {
|
|
88
|
+
type: string;
|
|
89
|
+
};
|
|
90
|
+
groups: never[];
|
|
91
|
+
ignoreCase: boolean;
|
|
92
|
+
newlinesBetween: string;
|
|
93
|
+
order: string;
|
|
94
|
+
partitionByComment: boolean;
|
|
95
|
+
partitionByNewLine: boolean;
|
|
96
|
+
specialCharacters: string;
|
|
97
|
+
styledComponents: boolean;
|
|
98
|
+
type: string;
|
|
99
|
+
useConfigurationIf: {};
|
|
100
|
+
};
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/utility/public/NoRestrictedImportsOptions.d.ts
|
|
103
|
+
interface RestrictedPathImportBase {
|
|
104
|
+
message: string;
|
|
105
|
+
name: string;
|
|
106
|
+
allowTypeImports?: boolean;
|
|
107
|
+
}
|
|
108
|
+
interface RestrictedPathImportImportNames extends RestrictedPathImportBase {
|
|
109
|
+
importNames: string[];
|
|
110
|
+
allowImportNames?: never;
|
|
111
|
+
}
|
|
112
|
+
interface RestrictedPathImportAllowImportNames extends RestrictedPathImportBase {
|
|
113
|
+
allowImportNames: string[];
|
|
114
|
+
importNames?: never;
|
|
115
|
+
}
|
|
116
|
+
type RestrictedPathImport = RestrictedPathImportBase | RestrictedPathImportImportNames | RestrictedPathImportAllowImportNames;
|
|
117
|
+
interface RestrictedPatternImportBase {
|
|
118
|
+
caseSensitive?: boolean;
|
|
119
|
+
message: string;
|
|
120
|
+
allowTypeImports?: boolean;
|
|
121
|
+
}
|
|
122
|
+
interface RestrictedPatternImportGroup extends RestrictedPatternImportBase {
|
|
123
|
+
group: string[];
|
|
124
|
+
regex?: never;
|
|
125
|
+
}
|
|
126
|
+
interface RestrictedPatternImportRegex extends RestrictedPatternImportBase {
|
|
127
|
+
regex: string;
|
|
128
|
+
group?: never;
|
|
129
|
+
}
|
|
130
|
+
interface RestrictedPatternImportImportNames extends RestrictedPatternImportBase {
|
|
131
|
+
importNames: string[];
|
|
132
|
+
allowImportNames?: never;
|
|
133
|
+
importNamePattern?: never;
|
|
134
|
+
allowImportNamePattern?: never;
|
|
135
|
+
}
|
|
136
|
+
interface RestrictedPatternImportAllowImportNames extends RestrictedPatternImportBase {
|
|
137
|
+
importNames?: never;
|
|
138
|
+
allowImportNames: string[];
|
|
139
|
+
importNamePattern?: never;
|
|
140
|
+
allowImportNamePattern?: never;
|
|
141
|
+
}
|
|
142
|
+
interface RestrictedPatternImportImportNamePattern extends RestrictedPatternImportBase {
|
|
143
|
+
importNames?: never;
|
|
144
|
+
allowImportNames?: never;
|
|
145
|
+
importNamePattern: string;
|
|
146
|
+
allowImportNamePattern?: never;
|
|
147
|
+
}
|
|
148
|
+
interface RestrictedPatternImportAllowImportNamePattern extends RestrictedPatternImportBase {
|
|
149
|
+
importNames?: never;
|
|
150
|
+
allowImportNames?: never;
|
|
151
|
+
importNamePattern?: never;
|
|
152
|
+
allowImportNamePattern: string;
|
|
153
|
+
}
|
|
154
|
+
type RestrictedPatternImport = RestrictedPatternImportGroup | RestrictedPatternImportRegex | RestrictedPatternImportImportNames | RestrictedPatternImportAllowImportNames | RestrictedPatternImportImportNamePattern | RestrictedPatternImportAllowImportNamePattern;
|
|
155
|
+
interface NoRestrictedImportsOptionsPathsOnly {
|
|
156
|
+
paths: RestrictedPathImport[];
|
|
157
|
+
patterns?: never;
|
|
158
|
+
}
|
|
159
|
+
interface NoRestrictedImportsOptionsPatternsOnly {
|
|
160
|
+
paths?: never;
|
|
161
|
+
patterns: RestrictedPatternImport[];
|
|
162
|
+
}
|
|
163
|
+
interface NoRestrictedImportsOptionsPathsAndPatterns {
|
|
164
|
+
paths: RestrictedPathImport[];
|
|
165
|
+
patterns: RestrictedPatternImport[];
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Options for the built-in ESLint `no-restricted-imports` rule.
|
|
169
|
+
*
|
|
170
|
+
* @category Rule Options
|
|
171
|
+
*/
|
|
172
|
+
type NoRestrictedImportsOptions = NoRestrictedImportsOptionsPathsOnly | NoRestrictedImportsOptionsPatternsOnly | NoRestrictedImportsOptionsPathsAndPatterns;
|
|
173
|
+
//#endregion
|
|
174
|
+
export { type NoRestrictedImportsOptions, type RestrictedPathImport, type RestrictedPatternImport, prettierConfig, reactLanguageOptions, sortClasses, sortExports, sortImports, sortObjects, typeDocConfig, typeScriptLanguageOptions, unusedVarsIgnorePatterns, vitestConfig };
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { Config } from "prettier";
|
|
2
|
+
import { TypeDocOptions } from "typedoc";
|
|
3
|
+
import { PluginOptions } from "typedoc-plugin-markdown";
|
|
4
|
+
import * as vite from "vite";
|
|
5
|
+
import { VitestEnvironment } from "vitest/node";
|
|
6
|
+
import { Linter } from "eslint";
|
|
7
|
+
|
|
8
|
+
//#region src/configs/external/prettierConfig.d.ts
|
|
9
|
+
declare const prettierConfig: Config;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/configs/external/typeDocConfig.d.ts
|
|
12
|
+
declare function typeDocConfig(entryPoints?: string[]): TypeDocOptions & PluginOptions;
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/configs/external/vitestConfig.d.ts
|
|
15
|
+
declare function vitestConfig(environment?: VitestEnvironment): vite.UserConfig;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/configs/helpers/reactLanguageOptions.d.ts
|
|
18
|
+
declare const reactLanguageOptions: Linter.LanguageOptions;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/configs/helpers/typeScriptLanguageOptions.d.ts
|
|
21
|
+
declare const typeScriptLanguageOptions: Linter.LanguageOptions;
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/configs/helpers/unusedVarsIgnorePatterns.d.ts
|
|
24
|
+
declare const unusedVarsIgnorePatterns: {
|
|
25
|
+
argsIgnorePattern: string;
|
|
26
|
+
caughtErrorsIgnorePattern: string;
|
|
27
|
+
varsIgnorePattern: string;
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/configs/helpers/sorting/sortClasses.d.ts
|
|
31
|
+
declare const sortClasses: {
|
|
32
|
+
customGroups: never[];
|
|
33
|
+
fallbackSort: {
|
|
34
|
+
type: string;
|
|
35
|
+
};
|
|
36
|
+
groups: (string | string[])[];
|
|
37
|
+
ignoreCase: boolean;
|
|
38
|
+
newlinesBetween: number;
|
|
39
|
+
order: string;
|
|
40
|
+
partitionByComment: boolean;
|
|
41
|
+
partitionByNewLine: boolean;
|
|
42
|
+
specialCharacters: string;
|
|
43
|
+
type: string;
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/configs/helpers/sorting/sortExports.d.ts
|
|
47
|
+
declare const sortExports: {
|
|
48
|
+
customGroups: never[];
|
|
49
|
+
fallbackSort: {
|
|
50
|
+
type: string;
|
|
51
|
+
};
|
|
52
|
+
groups: string[];
|
|
53
|
+
ignoreCase: boolean;
|
|
54
|
+
newlinesBetween: number;
|
|
55
|
+
order: string;
|
|
56
|
+
partitionByComment: boolean;
|
|
57
|
+
partitionByNewLine: boolean;
|
|
58
|
+
specialCharacters: string;
|
|
59
|
+
type: string;
|
|
60
|
+
};
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/configs/helpers/sorting/sortImports.d.ts
|
|
63
|
+
declare const sortImports: {
|
|
64
|
+
customGroups: ({
|
|
65
|
+
elementNamePattern: string[];
|
|
66
|
+
groupName: string;
|
|
67
|
+
selector?: undefined;
|
|
68
|
+
} | {
|
|
69
|
+
elementNamePattern: string[];
|
|
70
|
+
groupName: string;
|
|
71
|
+
selector: string;
|
|
72
|
+
})[];
|
|
73
|
+
groups: string[];
|
|
74
|
+
ignoreCase: boolean;
|
|
75
|
+
internalPattern: string[];
|
|
76
|
+
newlinesBetween: number;
|
|
77
|
+
order: string;
|
|
78
|
+
partitionByComment: boolean;
|
|
79
|
+
partitionByNewLine: boolean;
|
|
80
|
+
specialCharacters: string;
|
|
81
|
+
type: string;
|
|
82
|
+
};
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region src/configs/helpers/sorting/sortObjects.d.ts
|
|
85
|
+
declare const sortObjects: {
|
|
86
|
+
customGroups: never[];
|
|
87
|
+
fallbackSort: {
|
|
88
|
+
type: string;
|
|
89
|
+
};
|
|
90
|
+
groups: never[];
|
|
91
|
+
ignoreCase: boolean;
|
|
92
|
+
newlinesBetween: string;
|
|
93
|
+
order: string;
|
|
94
|
+
partitionByComment: boolean;
|
|
95
|
+
partitionByNewLine: boolean;
|
|
96
|
+
specialCharacters: string;
|
|
97
|
+
styledComponents: boolean;
|
|
98
|
+
type: string;
|
|
99
|
+
useConfigurationIf: {};
|
|
100
|
+
};
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/utility/public/NoRestrictedImportsOptions.d.ts
|
|
103
|
+
interface RestrictedPathImportBase {
|
|
104
|
+
message: string;
|
|
105
|
+
name: string;
|
|
106
|
+
allowTypeImports?: boolean;
|
|
107
|
+
}
|
|
108
|
+
interface RestrictedPathImportImportNames extends RestrictedPathImportBase {
|
|
109
|
+
importNames: string[];
|
|
110
|
+
allowImportNames?: never;
|
|
111
|
+
}
|
|
112
|
+
interface RestrictedPathImportAllowImportNames extends RestrictedPathImportBase {
|
|
113
|
+
allowImportNames: string[];
|
|
114
|
+
importNames?: never;
|
|
115
|
+
}
|
|
116
|
+
type RestrictedPathImport = RestrictedPathImportBase | RestrictedPathImportImportNames | RestrictedPathImportAllowImportNames;
|
|
117
|
+
interface RestrictedPatternImportBase {
|
|
118
|
+
caseSensitive?: boolean;
|
|
119
|
+
message: string;
|
|
120
|
+
allowTypeImports?: boolean;
|
|
121
|
+
}
|
|
122
|
+
interface RestrictedPatternImportGroup extends RestrictedPatternImportBase {
|
|
123
|
+
group: string[];
|
|
124
|
+
regex?: never;
|
|
125
|
+
}
|
|
126
|
+
interface RestrictedPatternImportRegex extends RestrictedPatternImportBase {
|
|
127
|
+
regex: string;
|
|
128
|
+
group?: never;
|
|
129
|
+
}
|
|
130
|
+
interface RestrictedPatternImportImportNames extends RestrictedPatternImportBase {
|
|
131
|
+
importNames: string[];
|
|
132
|
+
allowImportNames?: never;
|
|
133
|
+
importNamePattern?: never;
|
|
134
|
+
allowImportNamePattern?: never;
|
|
135
|
+
}
|
|
136
|
+
interface RestrictedPatternImportAllowImportNames extends RestrictedPatternImportBase {
|
|
137
|
+
importNames?: never;
|
|
138
|
+
allowImportNames: string[];
|
|
139
|
+
importNamePattern?: never;
|
|
140
|
+
allowImportNamePattern?: never;
|
|
141
|
+
}
|
|
142
|
+
interface RestrictedPatternImportImportNamePattern extends RestrictedPatternImportBase {
|
|
143
|
+
importNames?: never;
|
|
144
|
+
allowImportNames?: never;
|
|
145
|
+
importNamePattern: string;
|
|
146
|
+
allowImportNamePattern?: never;
|
|
147
|
+
}
|
|
148
|
+
interface RestrictedPatternImportAllowImportNamePattern extends RestrictedPatternImportBase {
|
|
149
|
+
importNames?: never;
|
|
150
|
+
allowImportNames?: never;
|
|
151
|
+
importNamePattern?: never;
|
|
152
|
+
allowImportNamePattern: string;
|
|
153
|
+
}
|
|
154
|
+
type RestrictedPatternImport = RestrictedPatternImportGroup | RestrictedPatternImportRegex | RestrictedPatternImportImportNames | RestrictedPatternImportAllowImportNames | RestrictedPatternImportImportNamePattern | RestrictedPatternImportAllowImportNamePattern;
|
|
155
|
+
interface NoRestrictedImportsOptionsPathsOnly {
|
|
156
|
+
paths: RestrictedPathImport[];
|
|
157
|
+
patterns?: never;
|
|
158
|
+
}
|
|
159
|
+
interface NoRestrictedImportsOptionsPatternsOnly {
|
|
160
|
+
paths?: never;
|
|
161
|
+
patterns: RestrictedPatternImport[];
|
|
162
|
+
}
|
|
163
|
+
interface NoRestrictedImportsOptionsPathsAndPatterns {
|
|
164
|
+
paths: RestrictedPathImport[];
|
|
165
|
+
patterns: RestrictedPatternImport[];
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Options for the built-in ESLint `no-restricted-imports` rule.
|
|
169
|
+
*
|
|
170
|
+
* @category Rule Options
|
|
171
|
+
*/
|
|
172
|
+
type NoRestrictedImportsOptions = NoRestrictedImportsOptionsPathsOnly | NoRestrictedImportsOptionsPatternsOnly | NoRestrictedImportsOptionsPathsAndPatterns;
|
|
173
|
+
//#endregion
|
|
174
|
+
export { type NoRestrictedImportsOptions, type RestrictedPathImport, type RestrictedPatternImport, prettierConfig, reactLanguageOptions, sortClasses, sortExports, sortImports, sortObjects, typeDocConfig, typeScriptLanguageOptions, unusedVarsIgnorePatterns, vitestConfig };
|