Skip to content

Commit 65f24b3

Browse files
committed
chore: 🚨 lint files with eslint
1 parent ea88e40 commit 65f24b3

File tree

9 files changed

+748
-26
lines changed

9 files changed

+748
-26
lines changed

.eslintrc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
7+
"overrides": [],
8+
"parser": "@typescript-eslint/parser",
9+
"parserOptions": {
10+
"ecmaVersion": "latest",
11+
"sourceType": "module"
12+
},
13+
"plugins": ["@typescript-eslint"],
14+
"rules": {
15+
"linebreak-style": ["error", "unix"],
16+
"quotes": ["error", "single"],
17+
"semi": ["error", "never"],
18+
"@typescript-eslint/no-explicit-any": "off",
19+
"@typescript-eslint/no-unused-vars": "off"
20+
}
21+
}

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
"@types/mocha": "^8.0.3",
1414
"@types/node": "^11.15.3",
1515
"@types/ws": "^8.5.3",
16+
"@typescript-eslint/eslint-plugin": "^5.38.1",
17+
"@typescript-eslint/parser": "^5.38.1",
1618
"chai": "^4.2.0",
19+
"eslint": "^8.24.0",
1720
"mocha": "^8.2.0",
1821
"prettier": "^2.7.1",
1922
"ts-mocha": "^8.0.0",
@@ -23,7 +26,9 @@
2326
"scripts": {
2427
"build": "tsc",
2528
"test": "ts-mocha -p ./tsconfig.json ./sandbox/tests.ts ./sandbox/sandbox.ts --exit",
26-
"prettier": "prettier --check --write \"src/**/*.ts\" \"sandbox/**/*.ts\""
29+
"prettier": "prettier --check \"src/**/*.ts\" \"sandbox/**/*.ts\"",
30+
"eslint": "eslint --fix \"src/**/*.ts\" \"sandbox/**/*.ts\"",
31+
"lint": "pnpm run prettier && pnpm run eslint"
2732
},
2833
"repository": {
2934
"type": "git",

0 commit comments

Comments
 (0)