@tsslint/config 0.0.10 → 0.0.12

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,6 @@
1
1
  export * from './lib/build';
2
2
  export * from './lib/watch';
3
3
  export * from './lib/types';
4
+ import type { Config, Rule } from './lib/types';
5
+ export declare function defineConfig(config: Config): Config;
6
+ export declare function defineRule(rule: Rule): Rule;
package/index.js CHANGED
@@ -14,7 +14,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.defineRule = exports.defineConfig = void 0;
17
18
  __exportStar(require("./lib/build"), exports);
18
19
  __exportStar(require("./lib/watch"), exports);
19
20
  __exportStar(require("./lib/types"), exports);
21
+ function defineConfig(config) {
22
+ return config;
23
+ }
24
+ exports.defineConfig = defineConfig;
25
+ function defineRule(rule) {
26
+ return rule;
27
+ }
28
+ exports.defineRule = defineRule;
20
29
  //# sourceMappingURL=index.js.map
package/lib/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import type { CodeFixAction, DiagnosticWithLocation, FileTextChanges, LanguageService, LanguageServiceHost, SourceFile } from 'typescript/lib/tsserverlibrary';
1
+ import type { CodeFixAction, DiagnosticWithLocation, FileTextChanges, LanguageService, LanguageServiceHost, SourceFile } from 'typescript';
2
2
  export interface ProjectContext {
3
3
  configFile: string;
4
- typescript: typeof import('typescript/lib/tsserverlibrary.js');
4
+ typescript: typeof import('typescript');
5
5
  languageServiceHost: LanguageServiceHost;
6
6
  languageService: LanguageService;
7
7
  tsconfig: string;
@@ -26,7 +26,7 @@ export interface Rule {
26
26
  (context: RuleContext): void;
27
27
  }
28
28
  export interface RuleContext {
29
- typescript: typeof import('typescript/lib/tsserverlibrary.js');
29
+ typescript: typeof import('typescript');
30
30
  languageServiceHost: LanguageServiceHost;
31
31
  languageService: LanguageService;
32
32
  sourceFile: SourceFile;
package/lib/watch.js CHANGED
@@ -4,7 +4,7 @@ exports.watchConfigFile = void 0;
4
4
  const esbuild = require("esbuild");
5
5
  const path = require("path");
6
6
  async function watchConfigFile(configFilePath, onBuild, watch = true, createHash = btoa) {
7
- const outDir = path.resolve(__dirname, '..', '..', '.tsl');
7
+ const outDir = path.resolve(__dirname, '..', '..', '.tsslint');
8
8
  const outFileName = createHash(path.relative(outDir, configFilePath)) + '.cjs';
9
9
  const outFile = path.join(outDir, outFileName);
10
10
  const resultHandler = (result) => {
@@ -28,7 +28,7 @@ async function watchConfigFile(configFilePath, onBuild, watch = true, createHash
28
28
  format: 'cjs',
29
29
  platform: 'node',
30
30
  plugins: [{
31
- name: 'tsl',
31
+ name: 'tsslint',
32
32
  setup(build) {
33
33
  build.onResolve({ filter: /.*/ }, args => {
34
34
  if (!args.path.endsWith('.ts')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsslint/config",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",
@@ -14,5 +14,5 @@
14
14
  "dependencies": {
15
15
  "esbuild": "^0.19.0"
16
16
  },
17
- "gitHead": "79b03c8ead69ee6e2e6fbb469012d378a7cf1d31"
17
+ "gitHead": "f6737f340ad02a90054dbdc0514b5c253bb695e7"
18
18
  }