Skip to content
This repository was archived by the owner on Mar 25, 2021. It is now read-only.

Commit 92c9f36

Browse files
authored
Prepare v5.17.0 (#4751)
1 parent b986082 commit 92c9f36

File tree

6 files changed

+61
-18
lines changed

6 files changed

+61
-18
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# Change Log
22

3+
## v5.17.0
4+
5+
- [bugfix] [`quotemark`](https://palantir.github.io/tslint/rules/quotemark/) backtic option now ignores enum members, use strict declarations, lookup types, and strings containing octal escape sequences. (#4693)
6+
- [bugfix] [`no-redundant-jsdoc`](https://palantir.github.io/tslint/rules/no-redundant-jsdoc/) no longer errors on `JSDocThisTag` (#4690)
7+
- [chore] Update devDependency mocha from v3.2.0 to v6.1.4 (#4669) (#4674)
8+
- [chore] Update devDependency js-yaml from ^3.13.0 to ^3.13.1 (#4663)
9+
- [chore] Update deprecated devDependency github to @octokit/rest (#4673)
10+
- [chore] Update devDependency nyc from v13.3.0 to v14.1.1 (#4699)
11+
- [deprecation] [`no-use-before-declare`](https://palantir.github.io/tslint/rules/no-use-before-declare/) rule for typescript >= 2.9.0 (#4695)
12+
- [documentation] Minor fix for [`variable-name`](https://palantir.github.io/tslint/rules/variable-name/) rule metadata (#4731)
13+
- [documentation] Fixed [`no-unused-variable`](https://palantir.github.io/tslint/rules/no-unused-variable/) argument count (#4683)
14+
- [enhancement] Allow const assertions in [`no-object-literal-type-assertion`](https://palantir.github.io/tslint/rules/no-object-literal-type-assertion/) (#4681)
15+
- [new-fixer] [`unnecessary-constructor`](https://palantir.github.io/tslint/rules/unnecessary-constructor/) (#4694)
16+
17+
Thanks to our contributors!
18+
19+
- Bjorn Stromberg
20+
- Vitaliy Agoshkov
21+
- knafteN
22+
- Bowen Ni
23+
- Waseem Ahmad
24+
- Åsmund Grammeltvedt
25+
- Eric Ferreira
26+
- Zhen Tian
27+
- Tom Lakesman
28+
- zachkirsch
29+
30+
331
## v5.16.0
432

533
- [bugfix] Excuse more [`quotemark`](https://palantir.github.io/tslint/rules/quotemark/) backtick edge cases and fix behavior for TS < 2.7.1 (#4642)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tslint",
3-
"version": "5.16.0",
3+
"version": "5.17.0",
44
"description": "An extensible static analysis linter for the TypeScript language",
55
"bin": {
66
"tslint": "./bin/tslint"

scripts/generate-changelog.ts

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,28 @@
2525

2626
import * as Octokit from "@octokit/rest";
2727
import * as fs from "fs";
28+
import * as os from "os";
29+
import * as path from "path";
2830

2931
import { camelize } from "../lib/utils";
3032

33+
// ignores TLS certificate error
34+
// process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
35+
36+
const tokenFile = path.join(os.homedir(), "github_token.txt");
37+
const authToken = fs
38+
.readFileSync(tokenFile, "utf8")
39+
.toString()
40+
.trim();
41+
console.log(`Using OAuth token ${authToken}\n`);
42+
3143
const octokit = new Octokit({
44+
auth: authToken,
3245
host: "api.github.com",
3346
protocol: "https",
3447
request: {
35-
timeout: 5000
36-
}
48+
timeout: 5000,
49+
},
3750
});
3851

3952
const repoInfo = {
@@ -45,7 +58,7 @@ const commitList: ICommit[] = [];
4558
octokit.repos
4659
.getLatestRelease(repoInfo)
4760
.then(({ data: { tag_name } }) => {
48-
console.log("Getting commits " + tag_name + "..master");
61+
console.log(`Getting commits ${tag_name}..master`);
4962
// get the commits between the most recent release and the head of master
5063
return octokit.repos.compareCommits({
5164
base: tag_name,
@@ -61,7 +74,7 @@ octokit.repos
6174
fields: [],
6275
sha: commitInfo.sha,
6376
submitter:
64-
commitInfo.commit.author.name != null
77+
commitInfo.commit.author.name !== null
6578
? commitInfo.commit.author.name
6679
: commitInfo.author.login,
6780
title: commitInfo.commit.message,
@@ -88,7 +101,7 @@ octokit.repos
88101
if (fieldMatch) {
89102
commit.fields.push({
90103
tag: fieldMatch[1],
91-
text: addLinks(line) + " (#" + commit.pushRequestNum + ")",
104+
text: `${addLinks(line)} (#${commit.pushRequestNum})`,
92105
});
93106
}
94107
}
@@ -114,28 +127,26 @@ octokit.repos
114127
}
115128
contributors.add(commit.submitter);
116129
}
117-
entries.sort((a, b) => {
118-
return a.tag.localeCompare(b.tag);
119-
});
130+
entries.sort((a, b) => a.tag.localeCompare(b.tag));
120131

121132
console.log("\n---- formatted changelog entries: ----");
122133
for (const entry of entries) {
123-
console.log("- " + entry.text);
134+
console.log(`- ${entry.text}`);
124135
}
125136

126137
console.log("\n---- PRs with missing changelog entries: ----");
127138
for (const missing of noFields) {
128-
console.log("- " + missing.replace(/[\r\n]+/, "\r\n "));
139+
console.log(`- ${missing.replace(/[\r\n]+/, "\r\n ")}`);
129140
}
130141

131142
console.log("\n---- thanks ----");
132143
console.log("Thanks to our contributors!");
133144
contributors.forEach(contributor => {
134-
console.log("- " + contributor);
145+
console.log(`- ${contributor}`);
135146
});
136147
})
137148
.catch(error => {
138-
console.log("Error:" + error);
149+
console.log(`Error: ${error}`);
139150
});
140151

141152
const cache = new Map<string, boolean>();
@@ -158,9 +169,9 @@ function addLinks(text: string): string {
158169
let match = regex.exec(text);
159170
while (match !== null) {
160171
if (isRule(match[1])) {
161-
result +=
162-
text.slice(lastIndex, match.index) +
163-
`[${match[0]}](https://palantir.github.io/tslint/rules/${match[1]}/)`;
172+
result += `${text.slice(lastIndex, match.index)}[${
173+
match[0]
174+
}](https://palantir.github.io/tslint/rules/${match[1]}/)`;
164175
lastIndex = regex.lastIndex;
165176
}
166177
match = regex.exec(text);

src/linter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import { arrayify, dedent, flatMap, mapDefined } from "./utils";
4242
* Linter that can lint multiple files in consecutive runs.
4343
*/
4444
export class Linter {
45-
public static VERSION = "5.16.0";
45+
public static VERSION = "5.17.0";
4646

4747
public static findConfiguration = findConfiguration;
4848
public static findConfigurationPath = findConfigurationPath;

test/rules/no-inferred-empty-object-type/test.ts.lint

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
[typescript]: <=3.4.x
1+
[typescript]: <=3.4.5
2+
23
let s: string;
34
let n: number;
45
let o: Object;

tslint-vscode.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
"no-boolean-literal-compare": false,
99
"no-floating-promises": false,
1010
"no-for-in-array": false,
11+
"no-implicit-dependencies": {
12+
"options": ["dev"]
13+
},
1114
"no-inferred-empty-object-type": false,
1215
"no-restricted-globals": false,
1316
"no-unnecessary-type-assertion": false,

0 commit comments

Comments
 (0)