Skip to content

Commit

Permalink
fea!: a few semver major changes (#265)
Browse files Browse the repository at this point in the history
* feat!: stop claiming to support TS 2.x
* feat!: drop support for node 6
* feat!: synchronize tslint.json with upstream
  • Loading branch information
ofrobots authored Feb 14, 2019
1 parent 5b5c342 commit 75fb461
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"license-check": "jsgl --local ."
},
"engines": {
"node": ">=6"
"node": ">=8"
},
"keywords": [],
"author": "Google Inc.",
Expand Down Expand Up @@ -77,7 +77,7 @@
"typescript": "~3.3.0"
},
"peerDependencies": {
"typescript": "^2.7.1 || ^3.0.0"
"typescript": "^3.0.0"
},
"ava": {
"require": [
Expand Down
9 changes: 3 additions & 6 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async function run(verb: string, files: string[]): Promise<boolean> {
// typescript module during init, since it might not exist.
// See: https://github.com/google/ts-style/issues/48
if (verb === 'init') {
return await init(options);
return init(options);
}

const lint: VerbFilesFunction = require('./lint').lint;
Expand All @@ -108,12 +108,9 @@ async function run(verb: string, files: string[]): Promise<boolean> {
const passFormat = await format(options, files);
return passLint && passFormat;
case 'fix':
return (
(await lint(options, files, true)) &&
(await format(options, files, true))
);
return (await lint(options, files, true)) && format(options, files, true);
case 'clean':
return await clean(options);
return clean(options);
default:
usage(`Unknown verb: ${verb}`);
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function getTSConfig(
): Promise<ConfigFile> {
customReadFilep = customReadFilep || readFilep;
const readArr = new Set();
return await getBase('tsconfig.json', customReadFilep, readArr, rootDir);
return getBase('tsconfig.json', customReadFilep, readArr, rootDir);
}

/**
Expand Down
13 changes: 12 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@
"array-type": [true, "array-simple"],
"arrow-return-shorthand": true,
"ban": [true,
{"name": ["it", "skip"]},
{"name": ["it", "only"]},
{"name": ["it", "async", "skip"]},
{"name": ["it", "async", "only"]},
{"name": ["describe", "skip"]},
{"name": ["describe", "only"]},
{"name": "parseInt", "message": "tsstyle#type-coercion"},
{"name": "parseFloat", "message": "tsstyle#type-coercion"},
{"name": "Array", "message": "tsstyle#array-constructor"}
{"name": "Array", "message": "tsstyle#array-constructor"},
{"name": ["*", "innerText"], "message": "Use .textContent instead. tsstyle#browser-oddities"}
],
"ban-ts-ignore": true,
"ban-types": [true,
["Object", "Use {} instead."],
["String", "Use 'string' instead."],
Expand All @@ -18,6 +26,7 @@
"deprecation": true,
"forin": true,
"interface-name": [true, "never-prefix"],
"interface-over-type-literal": true,
"jsdoc-format": true,
"label-position": true,
"member-access": [true, "no-public"],
Expand All @@ -34,6 +43,8 @@
"no-namespace": [true, "allow-declarations"],
"no-reference": true,
"no-string-throw": true,
"no-return-await": true,
"no-unsafe-finally": true,
"no-unused-expression": true,
"no-var-keyword": true,
"object-literal-shorthand": true,
Expand Down

0 comments on commit 75fb461

Please sign in to comment.