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

Commit fbc39d2

Browse files
committed
Added ESLint config draft
1 parent 4531602 commit fbc39d2

File tree

3 files changed

+34
-7
lines changed

3 files changed

+34
-7
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+
angulaer: 'writable',
20+
electron: 'writable',
21+
$appCtrl: 'writable',
22+
logStatus: 'writable',
23+
},
24+
};

AhMyth-Server/package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
22
"main": "./app/main.js",
33
"devDependencies": {
4-
"electron": "1.6.11"
4+
"electron": "1.6.11",
5+
"eslint": "^7.7.0",
6+
"eslint-config-airbnb-base": "^14.2.0",
7+
"eslint-plugin-import": "^2.22.0"
58
},
69
"license": "GNU GPLv3",
710
"build": {
@@ -13,7 +16,9 @@
1316
"asarUnpack": "**/app/Factory/**/*"
1417
},
1518
"scripts": {
16-
"start": "electron ./app",
19+
"start": "npx electron ./app",
20+
"lint": "npx eslint ./app",
21+
"lint:fix": "npx eslint ./app --fix --ignore-pattern *.min.*",
1722
"clean": "rm -rf ./dist",
1823
"pack": "npm run pack:linux32 && npm run pack:linux64 && npm run pack:win32 && npm run pack:win64",
1924
"pack:linux32": "electron-packager ./app $npm_package_name --out=dist/ --platform=linux --arch=ia32 --electron-version=1.6.11 --overwrite",
@@ -24,10 +29,7 @@
2429
"build:linux": "npm run build:linux32 && npm run build:linux64",
2530
"build:linux32": "build --linux deb --ia32",
2631
"build:linux64": "build --linux deb --x64",
27-
"build:win": "npm run build:win32 && npm run build:win64",
28-
"build:win32": "build --win --ia32",
29-
"build:win64": "build --win --x64"
30-
32+
"build:win": "npm run build:win32 && npm run build:win64"
3133
}
3234

33-
}
35+
}

0 commit comments

Comments
 (0)