Skip to content

Commit 5477b03

Browse files
committed
feat(template): migrate tslint to eslint using @typescript-eslint & @boringcodes/eslint-config-typescript
1 parent bed8225 commit 5477b03

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('@boringcodes/eslint-config-typescript');

generators/app/templates/.huskyrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"hooks": {
3-
"pre-commit": "pretty-quick --staged --pattern \"**/*.*(json|js|ts|yml|md)\" && yarn lint",
3+
"pre-commit": "yarn format:stage && yarn lint",
44
"pre-push": "yarn build"
55
}
66
}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
const config = require('@boringcodes/prettier-config');
2-
3-
module.exports = config;
1+
module.exports = require('@boringcodes/prettier-config');

generators/app/templates/package.json

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
"start": "NODE_ENV=production node build/index.js",
1818
"purge": "rm -rf node_modules",
1919
"clean": "rm -rf build",
20-
"format": "prettier --write \"**/*.*(json|js|ts|yml|md)\"",
21-
"format:check": "prettier --check \"**/*.*(json|js|ts|yml|md)\"",
22-
"lint": "tslint --project ./node_modules/@boringcodes/backpack/config/tsconfig.json --config tslint.json",
20+
"format": "prettier --write .",
21+
"format:check": "prettier --check .",
22+
"format:stage": "pretty-quick --staged",
23+
"lint": "eslint --quiet --ignore-path .gitignore **/*.ts",
2324
"release": "standard-version --no-verify",
2425
"release:major": "yarn release --release-as major",
2526
"release:minor": "yarn release --release-as minor",
@@ -35,17 +36,23 @@
3536
},
3637
"devDependencies": {
3738
"@boringcodes/backpack": "*",
39+
"@boringcodes/eslint-config-typescript": "*",
3840
"@boringcodes/prettier-config": "*",
3941
"@types/express": "^4.16.0",
4042
"@types/morgan": "^1.7.35",
4143
"@types/yup": "^0.26.3",
44+
"@typescript-eslint/eslint-plugin": "^2.25.0",
45+
"@typescript-eslint/parser": "^2.25.0",
46+
"eslint-config-prettier": "^6.10.1",
47+
"eslint-config-standard": "^14.1.1",
48+
"eslint-plugin-import": "^2.20.1",
49+
"eslint-plugin-node": "^11.0.0",
50+
"eslint-plugin-promise": "^4.2.1",
51+
"eslint-plugin-standard": "^4.0.1",
52+
"eslint": "^6.8.0",
4253
"husky": "^1.2.1",
4354
"prettier": "^2.0.2",
4455
"pretty-quick": "^2.0.1",
45-
"standard-version": "^4.4.0",
46-
"tslint-config-airbnb": "^5.11.1",
47-
"tslint-immutable": "^5.0.0",
48-
"tslint-sonarts": "^1.8.0",
49-
"tslint": "^5.11.0"
56+
"standard-version": "^4.4.0"
5057
}
5158
}

generators/app/templates/src/routes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Routes } from './components/types';
55
// TODO: import components for registering to router
66
// import things from './components/things';
77

8+
// eslint-disable-next-line
89
const routes = (props: Routes) => {
910
const router = Router();
1011

generators/app/templates/tslint.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)