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

Configure eslint to lint ts files #42

Merged
merged 3 commits into from
Dec 1, 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
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"extends": "google",
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
Expand Down Expand Up @@ -36,4 +38,3 @@
"jasmine": true
}
}

117 changes: 117 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"postinstall": "tsc",
"build": "tsc",
"lint": "eslint .",
"lint": "eslint src/**/*.{js,ts}",
"test": "tsc && jasmine --config=jasmine.json"
},
"main": "dist/index.js",
Expand Down Expand Up @@ -39,6 +39,8 @@
"valid-url": "^1.0.9"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^2.9.0",
"@typescript-eslint/parser": "^2.9.0",
"eslint": "^6.6.0",
"eslint-config-google": "^0.14.0",
"jasmine": "^3.5.0"
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = () => {
const args = process.argv.slice(2);
// TODO(peconn): Tighten up the `any` below once CLI is typed.
cli.run(args)
.catch((err: any) => {
.catch((err: any) => {
console.error(err.message);
process.exit(1);
});
Expand Down
7 changes: 3 additions & 4 deletions src/spec/lib/ConfigSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ describe('config', () => {
describe('#constructor', () => {
it('Assigns values correctly', () => {
const config: Config = new Config('/jdk', '/androidSdk');
expect(config.jdkPath).toBe('/jdk');
expect(config.androidSdkPath).toBe('/androidSdk');
expect(config.jdkPath).toBe('/jdk');
expect(config.androidSdkPath).toBe('/androidSdk');
});
})
});
});