Skip to content
This repository was archived by the owner on May 17, 2020. It is now read-only.

Commit 7ecde96

Browse files
committed
chore: add eslint and prettier
1 parent c1320b4 commit 7ecde96

File tree

4 files changed

+875
-24
lines changed

4 files changed

+875
-24
lines changed

.eslintrc.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
plugins: [
4+
'typescript',
5+
'import',
6+
],
7+
extends: [
8+
'@strv/node/v10',
9+
'@strv/node/style',
10+
'@strv/node/optional',
11+
'@strv/typescript',
12+
'@strv/typescript/style',
13+
'prettier',
14+
],
15+
settings: {
16+
'import/resolver': {
17+
'typescript': {},
18+
},
19+
},
20+
rules: {
21+
'import/group-exports': 0,
22+
'node/no-unsupported-features/es-syntax': 0,
23+
'@typescript-eslint/explicit-member-accessibility': 0,
24+
'new-cap': 0,
25+
},
26+
}

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"trailingComma": "es5",
3+
"singleQuote": true,
4+
"semi": false
5+
}

package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"build": "npm run build:types && npm run build:js",
1010
"build:types": "tsc --emitDeclarationOnly",
1111
"build:js": "babel src --out-dir lib --extensions '.ts' --source-maps inline",
12-
"watch": "nodemon"
12+
"watch": "nodemon",
13+
"lint:ts": "eslint 'src/**/*.ts'"
1314
},
1415
"devDependencies": {
1516
"@babel/cli": "^7.5.5",
@@ -20,13 +21,21 @@
2021
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
2122
"@babel/preset-env": "^7.5.5",
2223
"@babel/preset-typescript": "^7.3.3",
24+
"@strv/eslint-config-node": "^2.0.0",
25+
"@strv/eslint-config-typescript": "^2.0.0",
2326
"@types/bcryptjs": "^2.4.2",
2427
"@types/body-parser": "^1.17.0",
2528
"@types/express": "^4.17.0",
2629
"@types/graphql": "^14.2.3",
30+
"@typescript-eslint/parser": "^1.13.0",
2731
"babel-plugin-module-resolver": "^3.2.0",
2832
"babel-plugin-transform-typescript-metadata": "^0.2.2",
33+
"eslint": "^6.1.0",
34+
"eslint-config-prettier": "^6.0.0",
35+
"eslint-import-resolver-typescript": "^1.1.1",
36+
"eslint-plugin-typescript": "^0.14.0",
2937
"nodemon": "^1.19.1",
38+
"prettier": "^1.18.2",
3039
"type-graphql": "^0.17.4",
3140
"typescript": "^3.5.3"
3241
},

0 commit comments

Comments
 (0)