Skip to content

Commit 31a4276

Browse files
authored
Merge pull request #36 from d4nyll/lint
Implemented Linting
2 parents 6ec00df + 00d094f commit 31a4276

File tree

6 files changed

+1586
-537
lines changed

6 files changed

+1586
-537
lines changed

.eslintrc.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"extends": "airbnb-base",
3+
"plugins": [
4+
"import"
5+
],
6+
"parserOptions": {
7+
"ecmaVersion": 5
8+
},
9+
"env": {
10+
"browser": true,
11+
"jquery": true
12+
},
13+
"globals": {
14+
"Lethargy": true,
15+
"EventEmitter": true
16+
},
17+
"rules": {
18+
"func-names": ["warn", "as-needed"],
19+
"comma-dangle": ["warn", "always-multiline"],
20+
"prefer-arrow-callback": 0,
21+
"no-var": 0,
22+
"vars-on-top": 0,
23+
"no-redeclare": 0,
24+
"no-plusplus": 0,
25+
"prefer-template": 0,
26+
"brace-style": ["warn", "1tbs"]
27+
}
28+
}

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"smartscroll.js",
55
"sass/smartscroll.scss"
66
],
7-
"version": "2.4.2",
7+
"version": "2.5.0",
88
"homepage": "https://github.com/d4nyll/smartscroll",
99
"repository": {
1010
"type": "git",

package.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
{
22
"name": "smartscroll",
3-
"version": "2.4.2",
3+
"version": "2.5.0",
44
"description": "Scrolljacking jQuery plugin",
55
"main": "smartscroll.js",
66
"directories": {
77
"example": "examples"
88
},
99
"scripts": {
10+
"build": "npm run format && npm run minify",
11+
"lint": "./node_modules/.bin/eslint smartscroll.js",
12+
"format": "./node_modules/.bin/eslint smartscroll.js --fix",
13+
"minify": "./node_modules/.bin/uglifyjs smartscroll.js --output smartscroll.min.js",
1014
"test": "echo \"Error: no test specified\" && exit 1"
1115
},
1216
"repository": {
@@ -26,5 +30,12 @@
2630
"bugs": {
2731
"url": "https://github.com/d4nyll/smartscroll/issues"
2832
},
29-
"homepage": "https://github.com/d4nyll/smartscroll#readme"
33+
"homepage": "https://github.com/d4nyll/smartscroll#readme",
34+
"devDependencies": {
35+
"eslint": "^3.19.0",
36+
"eslint-config-airbnb": "^14.1.0",
37+
"eslint-config-airbnb-base": "^11.1.3",
38+
"eslint-plugin-import": "^2.2.0",
39+
"uglify-js": "^2.8.23"
40+
}
3041
}

0 commit comments

Comments
 (0)