Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few semver major changes #265

Merged
merged 5 commits into from
Feb 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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