Skip to content

Commit 2789e34

Browse files
committed
linting and eslint setup
1 parent f68ec0c commit 2789e34

File tree

7 files changed

+544
-11
lines changed

7 files changed

+544
-11
lines changed

.eslintrc

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"env": {
3+
"es2021": true
4+
},
5+
"extends": [
6+
"eslint:recommended",
7+
"plugin:@typescript-eslint/recommended",
8+
"plugin:@typescript-eslint/recommended-requiring-type-checking"
9+
],
10+
"parser": "@typescript-eslint/parser",
11+
"parserOptions": {
12+
"ecmaVersion": 12
13+
},
14+
"plugins": ["@typescript-eslint"],
15+
"rules": {
16+
"prefer-const": "error",
17+
"@typescript-eslint/no-unsafe-member-access": "off",
18+
"@typescript-eslint/no-unsafe-call": "off",
19+
"@typescript-eslint/no-unsafe-assignment": "off"
20+
}
21+
}

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"yarn": "1.22.10"
1515
},
1616
"devDependencies": {
17+
"@typescript-eslint/eslint-plugin": "^4.14.0",
18+
"@typescript-eslint/parser": "^4.14.0",
19+
"eslint": "^7.18.0",
1720
"rimraf": "^3.0.2"
1821
}
1922
}

packages/types/.eslintrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../../.eslintrc",
3+
"parserOptions": {
4+
"project": "tsconfig.json"
5+
}
6+
}

packages/types/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"scripts": {
1111
"clean": "rimraf dist *.tsbuildinfo",
1212
"test": "jest",
13+
"lint": "eslint src --ext js,ts",
1314
"build": "tsc -b ."
1415
},
1516
"devDependencies": {

packages/utils/.eslintrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../../.eslintrc",
3+
"parserOptions": {
4+
"project": "tsconfig.json"
5+
}
6+
}

packages/utils/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"scripts": {
1010
"clean": "rimraf dist *.tsbuildinfo",
1111
"test": "jest",
12+
"lint": "eslint src --ext js,ts",
1213
"build": "tsc -b ."
1314
},
1415
"dependencies": {

0 commit comments

Comments
 (0)