Skip to content
This repository was archived by the owner on Sep 3, 2021. It is now read-only.

Commit 697fdc6

Browse files
committed
Added ESLint config draft
1 parent 83183a8 commit 697fdc6

File tree

3 files changed

+34
-3
lines changed

3 files changed

+34
-3
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.min.js

AhMyth-Server/.eslintrc.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
commonjs: true,
5+
es2020: true,
6+
node: true,
7+
},
8+
extends: [
9+
'airbnb-base',
10+
],
11+
parserOptions: {
12+
ecmaVersion: 11,
13+
},
14+
rules: {
15+
"indent": ["error", 4],
16+
"quotes":["error","single"],
17+
},
18+
globals: {
19+
"angular": "writable",
20+
"electron": "writable",
21+
"$appCtrl":"writable",
22+
"logStatus":"writable"
23+
}
24+
};

AhMyth-Server/package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
22
"main": "./app/main.js",
33
"devDependencies": {
4-
"electron": "^9.2.0",
5-
"electron-builder": "^22.8.0"
4+
"electron-builder": "^22.8.0",
5+
"eslint": "^7.7.0",
6+
"eslint-config-airbnb-base": "^14.2.0",
7+
"eslint-plugin-import": "^2.22.0"
68
},
79
"license": "GNU GPLv3",
810
"build": {
@@ -15,6 +17,8 @@
1517
},
1618
"scripts": {
1719
"start": "npx electron ./app",
20+
"lint": "npx eslint ./app",
21+
"lint:fix": "npx eslint ./app --fix --ignore-pattern *.min.*",
1822
"clean": "rm -rf ./dist",
1923
"build": "npm run build:linux && npm run build:win",
2024
"build:linux": "npm run build:linux32 && npm run build:linux64",
@@ -24,5 +28,7 @@
2428
"build:win32": "npx electron-builder --win --ia32",
2529
"build:win64": "npx electron-builder --win --x64"
2630
},
27-
"dependencies": {}
31+
"dependencies": {
32+
"electron": "^9.2.0"
33+
}
2834
}

0 commit comments

Comments
 (0)