tslint: Enable no-null-keyword
I find this rule quite useful so that we use undefined all the time. The rationale on the rule's documentation page is quite clear: https://palantir.github.io/tslint/rules/no-null-keyword/
This commit is contained in:
parent
1244e4133c
commit
d0dc094f4e
3 changed files with 4 additions and 3 deletions
|
|
@ -544,7 +544,7 @@ export class MI2 extends EventEmitter implements IBackend {
|
||||||
this.breakpoints.set(newBrk, bkptNum);
|
this.breakpoints.set(newBrk, bkptNum);
|
||||||
resolve([true, newBrk]);
|
resolve([true, newBrk]);
|
||||||
} else {
|
} else {
|
||||||
resolve([false, null]);
|
resolve([false, undefined]);
|
||||||
}
|
}
|
||||||
}, reject);
|
}, reject);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -294,7 +294,7 @@ export class MI2DebugSession extends DebugSession {
|
||||||
this.miDebugger.getStack(args.levels, args.threadId).then(stack => {
|
this.miDebugger.getStack(args.levels, args.threadId).then(stack => {
|
||||||
const ret: StackFrame[] = [];
|
const ret: StackFrame[] = [];
|
||||||
stack.forEach(element => {
|
stack.forEach(element => {
|
||||||
let source = null;
|
let source = undefined;
|
||||||
let file = element.file;
|
let file = element.file;
|
||||||
if (file) {
|
if (file) {
|
||||||
if (this.isSSH) {
|
if (this.isSSH) {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
"defaultSeverity": "error",
|
"defaultSeverity": "error",
|
||||||
"rules": {
|
"rules": {
|
||||||
"no-var-keyword": true,
|
"no-var-keyword": true,
|
||||||
"prefer-const": true
|
"prefer-const": true,
|
||||||
|
"no-null-keyword": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue