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

Commit bec3ded

Browse files
authored
Merge pull request #21 from realityking/eslint
Set up linting using eslint
2 parents 22630e0 + 0552cab commit bec3ded

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

.eslintrc.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
module.exports = {
2+
extends: 'airbnb-base',
3+
env: {
4+
'browser': true,
5+
'mocha': true,
6+
'node': true
7+
},
8+
rules: {
9+
'class-methods-use-this': 'off',
10+
'comma-dangle': ['error', 'never'],
11+
'consistent-return': 'off',
12+
'func-names': 'off',
13+
'import/no-extraneous-dependencies': 'off',
14+
'import/no-unresolved': 'off',
15+
'max-len': 'off',
16+
'no-bitwise': 'off',
17+
'no-continue': 'off',
18+
'no-empty': 'off',
19+
'no-multi-assign': 'off',
20+
'no-new': 'off',
21+
'no-param-reassign': 'off',
22+
'no-plusplus': 'off',
23+
'no-restricted-syntax': 'off',
24+
'no-underscore-dangle': 'off',
25+
'no-use-before-define': 'off'
26+
}
27+
};

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ node_js:
33
- 6
44
- 8
55
- 'stable'
6+
7+
script:
8+
- npm run lint
9+
- npm run test
10+
611
notifications:
712
email:
813
recipients:

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"node": ">= 6"
88
},
99
"scripts": {
10+
"lint": "eslint src/ test/ bin/",
1011
"test": "scripts/test",
1112
"prepublish": "scripts/prepublish"
1213
},
@@ -20,6 +21,9 @@
2021
},
2122
"devDependencies": {
2223
"chai": "4.1.2",
24+
"eslint": "4.19.0",
25+
"eslint-config-airbnb-base": "12.1.0",
26+
"eslint-plugin-import": "2.9.0",
2327
"mocha": "6.0.0"
2428
},
2529
"keywords": [

0 commit comments

Comments
 (0)