-
Notifications
You must be signed in to change notification settings - Fork 887
Add "tslint:all" configuration, and use it to lint tslint itself #2241
Conversation
Test failures fixed by #2239. |
2a6b31a
to
8d9e84c
Compare
Further test failures fixed by #2234. |
should probably write a test to verify that all rules are in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, this is too much to merge as a single PR. there should be separate PRs to enable tests, add this configuration, and change the overall project's linting config.
], | ||
}; | ||
|
||
// Exclude typescript-only rules from jsRules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should be able to infer this from rule metadata. if the metadata is wrong, let's fix that
@@ -26,7 +26,7 @@ import { | |||
import { IOptions } from "./../src/language/rule/rule"; | |||
import { createTempFile } from "./utils"; | |||
|
|||
describe.only("Configuration", () => { | |||
describe("Configuration", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awkward. we should ban describe.only
and it.only
in this project's tslint config
@@ -47,7 +48,9 @@ describe("TAP Formatter", () => { | |||
getFailureString(3, "last-name", "error", TEST_FILE, 0, 12, "last failure"); | |||
|
|||
const actualResult = formatter.format(failures); | |||
assert.equal(actualResult, `TAP version 13\n1..${failures.length}\n` + expectedResult); | |||
if (!true) { // TODO: #2329 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use it.skip
instead of this syntax
let testFailed = false; | ||
for (const { added, removed, value } of diffResults) { | ||
if (added) { | ||
console.warn(`Rule in 'tslint:all' does not exist: ${value}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of warning, let's report this message in the assertion on L153
"prefer-const": true, | ||
"newline-before-return": false, | ||
"no-any": false, | ||
"no-inferrable-types": false, // TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is TODO supposed to indicate here?
Started with #2406. |
PR checklist
Overview of change:
Created
tslint:all
by using all rules listed at https://palantir.github.io/tslint/rules/ on the strictest settings.Contributors will have to update it manually when they add a new rule.
CHANGELOG.md entry:
[api]
tslint:all
configuration