You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
$ npm test
...
Running "ts:core" (ts) task
Compiling...
Cleared fast compile cache for target: core
Fast compile will not work when --out is specified. Ignoring fast compilation
WARNING: TypeScript does not allow external modules to be concatenated with --out. Any exported code may be truncated. See TypeScript issue #1544 for more details.
Using tsc v1.6.0-beta
path/to/tslint/src/language/languageServiceHost.ts(19,15): error TS2322: Type '{ getCompilationSettings: () => CompilerOptions; getCurrentDirectory: () => string; getDefaultLib...' is not assignable to type 'LanguageServiceHost'.
Object literal may only specify known properties, and 'getScriptIsOpen' does not exist in type 'LanguageServiceHost'.
>> 1 non-emit-preventing type warning
>> Error: tsc return code: 2
Warning: Task "ts:core" failed. Use --force to continue.
Aborted due to warnings.
npm ERR! Test failed. See above for more details.
I surveyed who using the getScriptIsOpen, but not found from tslint and typescript.
So, I tried to remove the getScriptIsOpen:
I know not why, TypeScript modules are not included in compiled sources (I confirmed bin/tslint-cli.js and build/tslint-tests.js) since TypeScript 1.6.0 Beta.
So, the variable ts became to be not found, and we got the following ReferenceError:
$ npm test
...
Running "ts:test" (ts) task
Compiling...
Cleared fast compile cache for target: test
Fast compile will not work when --out is specified. Ignoring fast compilation
Using tsc v1.6.0-beta
TypeScript compilation complete: 1.78s for 69 typescript files
Running "tslint:test" (tslint) task
>> 63 files lint free.
Running "concat:test" (concat) task
File build/tslint-tests.js created.
Running "mochaTest:test" (mochaTest) task
External Formatter
✓ formats failures
✓ returns undefined for unresolvable module
...
✓ enforces whitespace around the => token
✓ enforces whitespace around typecasts
177 passing (599ms)
Running "run:test" (run) task
Checking tslint binary
path/to/tslint/bin/tslint-cli.js:1430
global.ts = ts;
^
ReferenceError: ts is not defined
at Object.<anonymous> (path/to/tslint/bin/tslint-cli.js:1430:13)
at Module._compile (module.js:430:26)
at Object.Module._extensions..js (module.js:448:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (path/to/tslint/bin/tslint:3:1)
at Module._compile (module.js:430:26)
at Object.Module._extensions..js (module.js:448:10)
path/to/tslint/bin/tslint-cli.js:1430
global.ts = ts;
^
ReferenceError: ts is not defined
at Object.<anonymous> (path/to/tslint/bin/tslint-cli.js:1430:13)
at Module._compile (module.js:430:26)
at Object.Module._extensions..js (module.js:448:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (path/to/tslint/bin/tslint:3:1)
at Module._compile (module.js:430:26)
at Object.Module._extensions..js (module.js:448:10)
tslint with a good file did not exit correctly: expected 0 got 1
path/to/tslint/bin/tslint-cli.js:1430
global.ts = ts;
^
ReferenceError: ts is not defined
at Object.<anonymous> (path/to/tslint/bin/tslint-cli.js:1430:13)
at Module._compile (module.js:430:26)
at Object.Module._extensions..js (module.js:448:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (path/to/tslint/bin/tslint:3:1)
at Module._compile (module.js:430:26)
at Object.Module._extensions..js (module.js:448:10)
tslint with valid arguments did not exit correctly: expected 0 got 1
path/to/tslint/bin/tslint-cli.js:1430
global.ts = ts;
^
ReferenceError: ts is not defined
at Object.<anonymous> (path/to/tslint/bin/tslint-cli.js:1430:13)
at Module._compile (module.js:430:26)
at Object.Module._extensions..js (module.js:448:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (path/to/tslint/bin/tslint:3:1)
at Module._compile (module.js:430:26)
at Object.Module._extensions..js (module.js:448:10)
Failed 2 tests
Warning: non-zero exit code 1 Use --force to continue.
Aborted due to warnings.
npm ERR! Test failed. See above for more details.
So I try to the following code:
diff --git a/src/tslint.ts b/src/tslint.ts
index ab8f61e..03653a5 100644
--- a/src/tslint.ts+++ b/src/tslint.ts@@ -106,7 +106,7 @@ module Lint {
// add the Lint and TypeScript modules to global for pluggable formatters/rules
global.Lint = Lint;
-global.ts = ts;+global.ts = require("typescript");
// export Lint.Linter as the API interface for this module
module.exports = Lint.Linter;
Then, compiled successfully done, but I got 103 tests failing.
I'll be releasing tslint 2.5.0-beta today which will support TS 1.6.0-beta. We've started work on this upgrade already on the 'next' branch of this repo, feel free to check out the changes there.
CI started to fail since TypeScript 1.6 Beta was released.
I found 2 problems, and now I'm stuck.
Problem1: Strict object literal assignment checking
Since TypeScript 1.6 Beta, extra fields are prohibited.
And tslint have the extra field
getIsScriptOpen
on src/language/languageServiceHost.ts.I surveyed who using the
getScriptIsOpen
, but not found from tslint and typescript.So, I tried to remove the
getScriptIsOpen
:And got the next problem.
Problem 2: Missing TypeScript modules
I know not why, TypeScript modules are not included in compiled sources (I confirmed
bin/tslint-cli.js
andbuild/tslint-tests.js
) since TypeScript 1.6.0 Beta.So, the variable
ts
became to be not found, and we got the following ReferenceError:So I try to the following code:
Then, compiled successfully done, but I got 103 tests failing.
Related #611
The text was updated successfully, but these errors were encountered: