Skip to content

Commit 378e268

Browse files
committed
fix(lint): switch to eslint - remove jshint + jscs - fixes #745
1 parent 1264ec8 commit 378e268

6 files changed

Lines changed: 14 additions & 132 deletions

File tree

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
lib/public/socket.io.js
2+
lib/templates/**/*
3+
lib/server/certs/**
4+
lib/cli/cli-template.js

.eslintrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
env:
2+
node: true
3+
rules:
4+
"quotes": [2, "double"]
5+
"brace-style": [2, "1tbs", { "allowSingleLine": true }]
6+
"no-multiple-empty-lines": [2, {"max": 1}]
7+
"comma-style": [2]
8+
"indent": [2, 4, {"SwitchCase": 1}]

.jscs.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

.jshintrc

Lines changed: 0 additions & 26 deletions
This file was deleted.

gulpfile.js

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,15 @@
11
"use strict";
22

33
var gulp = require("gulp");
4-
var jshint = require("gulp-jshint");
5-
var jscs = require("gulp-jscs");
64
var contribs = require("gulp-contribs");
7-
var rubySass = require("gulp-ruby-sass");
8-
var filter = require("gulp-filter");
9-
var browserSync = require("./");
105
var conventionalChangelog = require("gulp-conventional-changelog");
116

12-
gulp.task("lint", function () {
13-
gulp.src([
14-
"{,{bin,lib,examples,test/{protractor,specs}}/**/}*.js",
15-
"!example.*.js",
16-
"!lib/{cli/cli-template,public/socket.io}.js"
17-
])
18-
.pipe(jscs(".jscs.json"))
19-
.pipe(jshint())
20-
.pipe(jshint.reporter("default"))
21-
.pipe(jshint.reporter("fail"));
22-
});
23-
247
gulp.task("contribs", function () {
258
gulp.src("README.md")
269
.pipe(contribs())
2710
.pipe(gulp.dest(""));
2811
});
2912

30-
gulp.task("default", ["lint"]);
31-
32-
var paths = {
33-
scss: "test/fixtures/scss/*.scss",
34-
css: "test/fixtures/css",
35-
cssGlob: "test/fixtures/assets/*.css",
36-
html: "test/fixtures/*.html"
37-
};
38-
39-
gulp.task("sass", function () {
40-
browserSync.notify("Compiling SCSS files... Please Wait");
41-
return gulp.src(paths.scss)
42-
.pipe(rubySass({sourcemap: true}))
43-
.pipe(gulp.dest(paths.css))
44-
.pipe(filter("**/*.css"))
45-
.pipe(browserSync.reload({stream: true}));
46-
});
47-
48-
/**
49-
* Start BrowserSync
50-
*/
51-
gulp.task("browser-sync", function () {
52-
53-
browserSync({
54-
server: "test/fixtures",
55-
startPath: "sass.html"
56-
});
57-
});
58-
59-
/**
60-
* Start BrowserSync
61-
*/
62-
gulp.task("browser-sync-css", function () {
63-
browserSync({
64-
server: {
65-
baseDir: "test/fixtures"
66-
}
67-
});
68-
});
69-
70-
/**
71-
* Watch stuff
72-
*/
73-
gulp.task("watch", ["browser-sync"], function () {
74-
gulp.watch(paths.scss, ["sass"]);
75-
gulp.watch(paths.html, browserSync.reload);
76-
});
77-
78-
/**
79-
* Watch stuff
80-
*/
81-
gulp.task("watch-css", ["browser-sync-css"], function () {
82-
gulp.watch(paths.cssGlob, function (file) {
83-
browserSync.reload(file.path);
84-
});
85-
gulp.watch(paths.html, browserSync.reload);
86-
});
87-
88-
gulp.task("docs", function () {
89-
90-
var yuidoc = require("gulp-yuidoc");
91-
92-
gulp.src(["./index.js", "./lib/default-config.js"])
93-
.pipe(yuidoc.parser({spaces: 4}))
94-
.pipe(gulp.dest("./doc"));
95-
});
96-
9713
gulp.task("changelog", function () {
9814
return gulp.src("CHANGELOG.md", {
9915
buffer: false

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"scripts": {
2121
"env": "node ./test/env.js",
2222
"test": "npm run lint && npm run env && npm run unit",
23-
"lint": "gulp lint",
23+
"lint": "eslint index.js lib bin examples test/specs gulpfile.js",
2424
"pro": "protractor test/protractor/config.single.js",
2525
"pro-local": "node test/protractor/setup.js",
2626
"unit": "mocha --recursive test/specs --timeout 10000",
@@ -62,15 +62,12 @@
6262
"bs-snippet-injector": "^2.0.1",
6363
"chai": "^3.2.0",
6464
"chalk": "^1.1.0",
65+
"eslint": "^1.1.0",
6566
"graceful-fs": "^3.0.8",
6667
"gulp": "^3.9.0",
6768
"gulp-contribs": "0.0.3",
6869
"gulp-conventional-changelog": "^0.4.0",
6970
"gulp-filter": "^2.0.2",
70-
"gulp-jscs": "^1.6.0",
71-
"gulp-jshint": "^1.11.2",
72-
"gulp-ruby-sass": "^1.0.5",
73-
"gulp-yuidoc": "^0.1.2",
7471
"istanbul": "^0.3.17",
7572
"istanbul-coveralls": "^1.0.3",
7673
"mocha": "^2.2.5",

0 commit comments

Comments
 (0)