Skip to content

Commit

Permalink
Migrate to eslint
Browse files Browse the repository at this point in the history
.eslintrc files based on .eslintrc files in cordova-common
  • Loading branch information
Christopher J. Brody committed Jun 12, 2018
1 parent e4c8a3a commit 297041c
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "standard"
}
16 changes: 16 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root: true

extends: semistandard

rules:
indent:
- error
- 4

no-unused-vars:
- error
- args: after-used

# excpetions specified in:
# - src/.eslintrc.yml
# - spec/.eslintrc.yml
17 changes: 10 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,19 @@
"simctl": "^1.1.1"
},
"devDependencies": {
"jasmine": "~2.6.0",
"jscs": "^2.11.0",
"jshint": "^2.9.1"
"eslint": "^4.19.1",
"eslint-config-semistandard": "^12.0.1",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.8.0",
"eslint-plugin-standard": "^3.1.0",
"jasmine": "~2.6.0"
},
"scripts": {
"eslint": "eslint *.js src spec",
"test": "npm run jasmine",
"posttest": "npm run jshint",
"jshint": "jshint src ./ios-sim.js",
"postjshint": "npm run jscs",
"jscs": "jscs src ./ios-sim.js",
"posttest": "npm run eslint",
"jasmine": "jasmine --config=spec/jasmine.json"
}
}
19 changes: 19 additions & 0 deletions spec/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
env:
jasmine: true

rules:
# TBD easy fix:
padded-blocks: off
spaced-comment: off

# TODO resolve:
eol-last: off
semi: off

# TBD easy resolve:
key-spacing: off

# FUTURE TBD:
indent: off
quotes: off
space-before-function-paren: off
21 changes: 21 additions & 0 deletions src/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
rules:
# common src exception:
camelcase: off

# TBD easy fix:
padded-blocks: off

# TODO resolve:
eqeqeq: off
no-unused-vars: off
node/no-deprecated-api: off

# TBD easy resolve:
comma-spacing: off
no-useless-escape: off

# FUTURE TBD:
no-multiple-empty-lines: off
one-var: off
spaced-comment: off
space-before-function-paren: off

0 comments on commit 297041c

Please sign in to comment.