Implement tslint for core files (#5952)
Fixes #5845 Implement tslint for core files **What is this?** Implements tslint for both next and next-server, but keeps standardjs/eslint for the .js files that are still there, we're gradually migrating to Typescript. **How does it work?** Before every commit (pre-commit) we execute the following `tslint` command: `tslint -c tslint.json 'packages/**/*.ts` **TSLint Rules** In order to avoid as much changes as possible I marked some rules as false. This way we can improve the linter but making sure this step will not break things. (see tslint.json) **Note** After merging this PR, you'll need to update your dependencies since it adds tslint to package.json
Showing
... | ... | @@ -33,7 +33,7 @@ |
"git add" | ||
], | ||
"*.ts": [ | ||
"standard --parser typescript-eslint-parser --plugin typescript --fix", | ||
"tslint -c tslint.json 'packages/**/*.ts'", | ||
"git add" | ||
], | ||
"packages/**/bin/*": [ | ||
... | ... | @@ -44,7 +44,7 @@ |
"standard": { | ||
"parser": "babel-eslint", | ||
"ignore": [ | ||
"packages/next-server/server/next-server.ts", | ||
"packages/**/*.ts", | ||
"**/*.d.ts", | ||
"**/node_modules/**", | ||
"examples/with-ioc/**", | ||
... | ... | @@ -89,6 +89,8 @@ |
"rimraf": "2.6.2", | ||
"standard": "11.0.1", | ||
"taskr": "1.1.0", | ||
"tslint": "5.12.0", | ||
"typescript": "3.1.1", | ||
"typescript-eslint-parser": "21.0.1", | ||
"wait-port": "0.2.2", | ||
"wd": "1.10.3", | ||
... | ... |
tslint.json
0 → 100644
想要评论请 注册 或 登录