-
Notifications
You must be signed in to change notification settings - Fork 8
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
migrate deprecated tslint to typescript-eslint #12
base: master
Are you sure you want to change the base?
Conversation
@@ -9,7 +9,8 @@ | |||
"type:declaration": "tsc --noEmit false --emitDeclarationOnly --declaration --declarationDir ./dist", | |||
"test": "cross-env TS_NODE_PROJECT=tsconfig.test.json mocha ./test/index.ts", | |||
"build": "$npm_execpath run build:babel && $npm_execpath run type:declaration", | |||
"build:babel": "cross-env NODE_ENV=production babel ./src --out-dir ./dist --extensions '.ts'" | |||
"build:babel": "cross-env NODE_ENV=production babel ./src --out-dir ./dist --extensions '.ts'", | |||
"linting": "eslint ./src/** --ext .ts" |
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.
Use lint
.
eslint ./src --ext .ts
@@ -246,10 +241,10 @@ class Bot extends EventEmitter { | |||
if (getLine(21).str.includes('密碼不對或無此帳號')) { | |||
this.emit('login.failed'); | |||
return false; | |||
} else if (getLine(23).str.includes('請稍後再試')) { | |||
} if (getLine(23).str.includes('請稍後再試')) { |
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.
Can we disable no-else-return
rule?
}, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "tsconfig.json", |
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.
./tsconfig.json
is preferred
npx tslint-to-eslint-config --tslint .tslint.json
to generate.eslintrc.js
automatically@typescript-eslint
package.json
to run eslint--fix
flag