@tsslint/config 0.0.13 → 1.0.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/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from './lib/types';
2
- import type { Config } from './lib/types';
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("./lib/types"), exports);
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 './types';
1
+ import type { Config } from '@tsslint/types';
2
2
  export declare function buildConfigFile(configFilePath: string, createHash?: (path: string) => string): Promise<Config>;
package/lib/build.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildConfigFile = void 0;
4
4
  const watch_1 = require("./watch");
5
- async function buildConfigFile(configFilePath, createHash) {
5
+ function buildConfigFile(configFilePath, createHash) {
6
6
  return new Promise((resolve, reject) => {
7
7
  (0, watch_1.watchConfigFile)(configFilePath, (config, result) => {
8
8
  if (config) {
package/lib/watch.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import esbuild = require('esbuild');
2
- import type { Config } from './types';
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": "0.0.13",
3
+ "version": "1.0.1",
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
- "esbuild": "^0.19.0"
15
+ "@tsslint/types": "1.0.1",
16
+ "esbuild": "^0.21.4"
16
17
  },
17
- "gitHead": "ebb2ecf9dadc0ebccd1859af973cb8fbbd07c83d"
18
+ "gitHead": "124aa300b4fb4d4c414f585cc0d4afddc4f343bf"
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
- }