Skip to content

Commit 50aa447

Browse files
committed
added eslint
1 parent 7632618 commit 50aa447

File tree

3 files changed

+437
-15
lines changed

3 files changed

+437
-15
lines changed

.eslintrc.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"env": {
3+
"node": true,
4+
"es2021": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended"
9+
],
10+
"parser": "@typescript-eslint/parser",
11+
"parserOptions": {
12+
"ecmaVersion": "latest"
13+
},
14+
"plugins": [
15+
"@typescript-eslint"
16+
],
17+
"rules": {
18+
"@typescript-eslint/no-explicit-any": "off"
19+
},
20+
"overrides": [
21+
{
22+
"files": [
23+
"*.spec.ts"
24+
],
25+
"env": {
26+
"jest": true
27+
},
28+
"rules": {
29+
"no-unused-vars": "off",
30+
"@typescript-eslint/no-unused-vars": "off",
31+
"import/no-extraneous-dependencies": "off"
32+
}
33+
}
34+
],
35+
"ignorePatterns": [
36+
"dist",
37+
"node_modules",
38+
"gen"
39+
]
40+
}

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"build": "run-p build:*",
2424
"build:main": "tsc -p tsconfig.main.json",
2525
"build:module": "tsc -p tsconfig.module.json",
26+
"lint": "eslint --ext .ts .",
2627
"generate": "run-p build:* && graphql-codegen",
2728
"prepublish": "run-p build:*"
2829
},
@@ -47,6 +48,9 @@
4748
"@graphql-codegen/typescript": "^2.4.2",
4849
"@tsconfig/recommended": "^1.0.1",
4950
"@types/jest": "^27.4.0",
51+
"@typescript-eslint/eslint-plugin": "^5.10.0",
52+
"@typescript-eslint/parser": "^5.10.0",
53+
"eslint": "^8.7.0",
5054
"jest": "^27.4.7",
5155
"npm-run-all": "^4.1.5",
5256
"ts-jest": "^27.1.3",

0 commit comments

Comments
 (0)