@tsslint/config 1.0.0 → 1.0.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/index.d.ts +2 -2
- package/index.js +1 -1
- package/lib/build.d.ts +1 -1
- package/lib/watch.d.ts +1 -1
- package/package.json +3 -2
- package/lib/types.d.ts +0 -41
package/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
import type { Config } from '
|
|
1
|
+
export * from '@tsslint/types';
|
|
2
|
+
import type { Config } from '@tsslint/types';
|
|
3
3
|
export declare function defineConfig(config: Config): Config;
|
package/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.defineConfig = void 0;
|
|
18
|
-
__exportStar(require("
|
|
18
|
+
__exportStar(require("@tsslint/types"), exports);
|
|
19
19
|
function defineConfig(config) {
|
|
20
20
|
return config;
|
|
21
21
|
}
|
package/lib/build.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Config } from '
|
|
1
|
+
import type { Config } from '@tsslint/types';
|
|
2
2
|
export declare function buildConfigFile(configFilePath: string, createHash?: (path: string) => string): Promise<Config>;
|
package/lib/watch.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import esbuild = require('esbuild');
|
|
2
|
-
import type { Config } from '
|
|
2
|
+
import type { Config } from '@tsslint/types';
|
|
3
3
|
export declare function watchConfigFile(configFilePath: string, onBuild: (config: Config | undefined, result: esbuild.BuildResult) => void, watch?: boolean, createHash?: (path: string) => string): Promise<esbuild.BuildContext<{
|
|
4
4
|
entryPoints: string[];
|
|
5
5
|
bundle: true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsslint/config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"directory": "packages/config"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"@tsslint/types": "1.0.2",
|
|
15
16
|
"esbuild": "^0.21.4"
|
|
16
17
|
},
|
|
17
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "e9bbdd4eba295de6bcb663e02c305f2b48893d6f"
|
|
18
19
|
}
|
package/lib/types.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { CodeFixAction, DiagnosticWithLocation, FileTextChanges, LanguageService, LanguageServiceHost, SourceFile } from 'typescript';
|
|
2
|
-
export interface ProjectContext {
|
|
3
|
-
configFile: string;
|
|
4
|
-
typescript: typeof import('typescript');
|
|
5
|
-
languageServiceHost: LanguageServiceHost;
|
|
6
|
-
languageService: LanguageService;
|
|
7
|
-
tsconfig: string;
|
|
8
|
-
}
|
|
9
|
-
export interface Config {
|
|
10
|
-
debug?: boolean;
|
|
11
|
-
rules?: Rules;
|
|
12
|
-
plugins?: Plugin[];
|
|
13
|
-
}
|
|
14
|
-
export interface Plugin {
|
|
15
|
-
(projectContext: ProjectContext): PluginInstance;
|
|
16
|
-
}
|
|
17
|
-
export interface PluginInstance {
|
|
18
|
-
resolveRules?(rules: Rules): Rules;
|
|
19
|
-
resolveDiagnostics?(fileName: string, results: DiagnosticWithLocation[]): DiagnosticWithLocation[];
|
|
20
|
-
resolveCodeFixes?(fileName: string, results: CodeFixAction[]): CodeFixAction[];
|
|
21
|
-
}
|
|
22
|
-
export interface Rules {
|
|
23
|
-
[name: string]: Rule;
|
|
24
|
-
}
|
|
25
|
-
export interface Rule {
|
|
26
|
-
(context: RuleContext): void;
|
|
27
|
-
}
|
|
28
|
-
export interface RuleContext {
|
|
29
|
-
typescript: typeof import('typescript');
|
|
30
|
-
languageServiceHost: LanguageServiceHost;
|
|
31
|
-
languageService: LanguageService;
|
|
32
|
-
sourceFile: SourceFile;
|
|
33
|
-
reportError(message: string, start: number, end: number, trace?: boolean): Reporter;
|
|
34
|
-
reportWarning(message: string, start: number, end: number, trace?: boolean): Reporter;
|
|
35
|
-
reportSuggestion(message: string, start: number, end: number, trace?: boolean): Reporter;
|
|
36
|
-
}
|
|
37
|
-
export interface Reporter {
|
|
38
|
-
withDeprecated(): Reporter;
|
|
39
|
-
withUnnecessary(): Reporter;
|
|
40
|
-
withFix(title: string, getChanges: () => FileTextChanges[]): Reporter;
|
|
41
|
-
}
|