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

Commit 300a66f

Browse files
committed
chore: add eslint
1 parent df26a4a commit 300a66f

File tree

5 files changed

+1380
-3
lines changed

5 files changed

+1380
-3
lines changed

.eslintrc.json

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"env": {
3+
"es2021": true,
4+
"node": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended"
9+
],
10+
"parser": "@typescript-eslint/parser",
11+
"parserOptions": {
12+
"ecmaVersion": "latest",
13+
"sourceType": "module"
14+
},
15+
"plugins": [
16+
"@typescript-eslint"
17+
],
18+
"rules": {
19+
"indent": [
20+
"error",
21+
4
22+
],
23+
"linebreak-style": [
24+
"error",
25+
"unix"
26+
],
27+
"quotes": [
28+
"error",
29+
"single"
30+
],
31+
"semi": [
32+
"error",
33+
"always"
34+
]
35+
}
36+
}

package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,18 @@
99
"main": "dist/index.js",
1010
"types": "dist/index.d.ts",
1111
"scripts": {
12-
"build": "tsc"
12+
"build": "tsc",
13+
"lint": "eslint src/**/*.ts --fix"
1314
},
1415
"dependencies": {
1516
"dbus-native": "^0.4.0"
1617
},
1718
"devDependencies": {
19+
"@typescript-eslint/eslint-plugin": "^5.22.0",
20+
"@typescript-eslint/parser": "^5.22.0",
21+
"eslint": "^7.32.0 || ^8.2.0",
22+
"eslint-config-airbnb-base": "^15.0.0",
23+
"eslint-plugin-import": "^2.25.2",
1824
"typescript": "^4.6.4"
1925
}
2026
}

src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const a: any = 1;

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
3-
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
4-
"module": "commonjs", /* Specify what module code is generated. */
3+
"target": "es2016",
4+
"module": "ES2022",
55
"esModuleInterop": true,
66
"forceConsistentCasingInFileNames": true,
77
"strict": true,

0 commit comments

Comments
 (0)