Skip to content

Commit 445048a

Browse files
committed
feat(eslint): added babel-eslint to support ES6 code linting
1 parent 1794e5f commit 445048a

6 files changed

Lines changed: 48 additions & 9 deletions

File tree

.eslintrc

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,42 @@
3131
"twttr":true,
3232
"fetchJsonp":true,
3333
"videojs":true,
34-
"build":true,
35-
"marked":true
34+
"marked":true,
35+
"EMOJI" : true,
36+
"LINK" : true,
37+
"TWITTER" : true,
38+
"SMILEY" : true,
39+
"HIGHLIGHTCODE" : true,
40+
41+
"MARKDOWN" : true,
42+
43+
"MAP" : true,
44+
45+
"YOUTUBE" : true,
46+
"VIMEO" : true,
47+
"TED" : true,
48+
"DAILYMOTION" : true,
49+
"USTREAM" : true,
50+
"LIVELEAK" : true,
51+
"VINE" : true,
52+
"YOUTUBE" : true,
53+
"BASICVIDEO" : true,
54+
55+
56+
"SPOTIFY" : true,
57+
"SOUNDCLOUD" : true,
58+
"BASICAUDIO" : true,
59+
60+
"CODEPEN" : true,
61+
"IDEONE" : true,
62+
"JSBIN" : true,
63+
"JSFIDDLE" : true,
64+
"PLUNKER" : true,
65+
"GIST" : true,
66+
67+
"FLICKR" : true,
68+
"BASICIMAGE" : true,
69+
"INSTAGRAM" : true,
70+
"ejs":true
3671
}
3772
}

Gruntfile.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ rollup: {
162162
src: 'src/js/embed.es6',
163163
dest: 'src/embed.js'
164164
}
165+
},
166+
167+
eslint:{
168+
target:['src/js/**/*.es6']
165169
}
166170
});
167171

@@ -174,8 +178,9 @@ rollup: {
174178
grunt.loadNpmTasks("grunt-contrib-uglify");
175179
grunt.loadNpmTasks("grunt-contrib-connect");
176180
grunt.loadNpmTasks("grunt-rollup")
181+
grunt.loadNpmTasks("grunt-eslint")
177182

178-
grunt.registerTask("default", ["rollup", "sass", "connect", "watch"]);
179-
grunt.registerTask("build", ["clean", "build-emoji", "rollup", "uglify", "postcss"]);
183+
grunt.registerTask("default", ["eslint","rollup", "sass", "connect", "watch"]);
184+
grunt.registerTask("build", ["clean", "build-emoji","eslint", "rollup", "uglify", "postcss"]);
180185
grunt.registerTask("build-emoji", ["retinafy", "sprite", "sass"]);
181186
};

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"autoprefixer-core": "^6.0.1",
3838
"babel": "^6.1.18",
3939
"babel-core": "^6.2.1",
40-
"babel-eslint": "^4.1.6",
40+
"babel-eslint": "^5.0.0-beta1",
4141
"babel-plugin-transform-regenerator": "^6.2.0",
4242
"babel-preset-es2015-rollup": "^1.0.0",
4343
"babel-preset-stage-2": "^6.1.18",
@@ -46,7 +46,7 @@
4646
"cssnano": "^3.3.2",
4747
"cz-conventional-changelog": "^1.1.0",
4848
"es6-promise": "^3.0.2",
49-
"eslint": "^1.6.0",
49+
"eslint": "^1.10.1",
5050
"ghooks": "^1.0.1",
5151
"grunt": "~0.4.5",
5252
"grunt-cli": "~0.1.13",
@@ -56,6 +56,7 @@
5656
"grunt-contrib-sass": "^0.9.2",
5757
"grunt-contrib-uglify": "^0.11.0",
5858
"grunt-contrib-watch": "^0.6.1",
59+
"grunt-eslint": "^17.3.1",
5960
"grunt-postcss": "^0.7.1",
6061
"grunt-retinafy": "^0.1.5",
6162
"grunt-rollup": "^0.5.0",

src/embed.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/modules/video/vimeo.es6

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import utils from '../utils.es6'
2-
import Base from '../base.es6'
32
import helper from './helper.es6'
43
import '../../vendor/fetch.js'
54

src/js/modules/video/youtube.es6

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import utils from '../utils.es6'
2-
import Base from '../base.es6'
32
import helper from './helper.es6'
43
import '../../vendor/fetch.js'
54

0 commit comments

Comments
 (0)