Skip to content

Commit 55cc566

Browse files
author
Christopher J. Brody
committed
Migrate to eslint
.eslintrc files based on .eslintrc files in cordova-common & ios-sim
1 parent e0ef9d5 commit 55cc566

File tree

4 files changed

+49
-3
lines changed

4 files changed

+49
-3
lines changed

.eslintrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "standard"
3+
}

.eslintrc.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root: true
2+
3+
extends: semistandard
4+
5+
rules:
6+
indent:
7+
- error
8+
- 4
9+
10+
no-unused-vars:
11+
- error
12+
- args: after-used
13+
14+
# excpetions specified in:
15+
# - src/scripts/.eslintrc.yml

package.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@
1212
"url": "https://github.com/ios-control/ios-deploy"
1313
},
1414
"devDependencies": {
15-
"jshint": "2.5.8"
15+
"eslint": "~4.19.1",
16+
"eslint-config-semistandard": "^12.0.1",
17+
"eslint-config-standard": "^11.0.0",
18+
"eslint-plugin-import": "^2.12.0",
19+
"eslint-plugin-node": "^6.0.1",
20+
"eslint-plugin-promise": "^3.8.0",
21+
"eslint-plugin-standard": "^3.1.0"
1622
},
1723
"scripts": {
1824
"preinstall": "./src/scripts/check_reqs.js && xcodebuild",
1925
"build-test": "npm run pycompile && xcodebuild -target ios-deploy-lib && xcodebuild test -scheme ios-deploy-tests",
20-
"test": "npm run jshint && npm run build-test",
21-
"jshint": "node node_modules/jshint/bin/jshint src/scripts/*.js",
26+
"eslint": "eslint src/scripts/*.js",
27+
"test": "npm run eslint && npm run build-test",
2228
"pycompile": "python -m py_compile src/scripts/*.py"
2329
},
2430
"keywords": [

src/scripts/.eslintrc.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
rules:
2+
# common src exception:
3+
camelcase: off
4+
5+
# FUTURE TBD:
6+
no-unused-vars:
7+
- error
8+
- args: none
9+
10+
# TBD easy fix:
11+
padded-blocks: off
12+
13+
# TODO resolve:
14+
no-mixed-spaces-and-tabs: off
15+
no-trailing-spaces: off
16+
17+
# FUTURE TBD:
18+
handle-callback-err: off
19+
indent: off
20+
no-multiple-empty-lines: off
21+
no-tabs: off
22+
one-var: off

0 commit comments

Comments
 (0)