@tsslint/config 0.0.9 → 0.0.11
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 +3 -0
- package/index.js +9 -0
- package/lib/types.d.ts +3 -3
- package/lib/watch.js +2 -2
- package/package.json +2 -2
package/index.d.ts
CHANGED
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
|
|
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
|
|
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
|
|
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, '..', '..', '.
|
|
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: '
|
|
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.
|
|
3
|
+
"version": "0.0.11",
|
|
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": "
|
|
17
|
+
"gitHead": "eff0ae58f04c38f684915d759ef4cc6ab65912ed"
|
|
18
18
|
}
|