Skip to content

Commit 4d60ccc

Browse files
committed
Replace JSCS and JSHint with ESLint
1 parent c934e1f commit 4d60ccc

16 files changed

+5622
-8687
lines changed

.eslintrc.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
env:
2+
browser: true
3+
commonjs: true
4+
node: true
5+
extends: 'eslint:recommended'
6+
globals:
7+
afterEach: false
8+
beforeEach: false
9+
define: false
10+
describe: false
11+
expect: false
12+
it: false
13+
jasmine: false
14+
ES6Promise: false
15+
Promise: false
16+
SourceMap: false
17+
StackFrame: false
18+
StackTrace: false
19+
StackTraceGPS: false
20+
parserOptions:
21+
ecmaVersion: 5
22+
rules:
23+
indent:
24+
- error
25+
- 4
26+
linebreak-style:
27+
- error
28+
- unix
29+
quotes:
30+
- error
31+
- single
32+
semi:
33+
- error
34+
- always
35+
no-console:
36+
- error
37+
- allow:
38+
- error

.jscsrc

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

.jshintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.jshintrc

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

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ addons:
1414
services:
1515
- xvfb
1616
before_install:
17-
- export CHROME_BIN=chromium-browser
18-
- export DISPLAY=:99.0
17+
- export CHROME_BIN=chromium-browser
18+
- export DISPLAY=:99.0
1919
before_script:
20-
- npm install
20+
- npm install
2121
script:
22-
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then gulp ci; else gulp pr; fi
22+
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then npm run lint && npm run test-ci; else npm run test-pr; fi

dist/stacktrace-with-promises-and-json-polyfills.js

Lines changed: 24 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/stacktrace-with-promises-and-json-polyfills.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/stacktrace.js

Lines changed: 24 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/stacktrace.min.js

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

gulpfile.js

Lines changed: 2 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
var browserify = require('browserify');
22
var concat = require('gulp-concat');
3-
var coveralls = require('gulp-coveralls');
43
var del = require('del');
54
var gulp = require('gulp');
6-
var jshint = require('gulp-jshint');
7-
var karma = require('karma');
8-
var path = require('path');
95
var rename = require('gulp-rename');
106
var runSequence = require('run-sequence');
117
var sourcemaps = require('gulp-sourcemaps');
@@ -20,37 +16,6 @@ var polyfills = [
2016
];
2117
var sources = 'stacktrace.js';
2218

23-
gulp.task('lint', function() {
24-
return gulp.src(sources)
25-
.pipe(jshint())
26-
.pipe(jshint.reporter('default'))
27-
.pipe(jshint.reporter('fail'));
28-
});
29-
30-
gulp.task('test', function(done) {
31-
var server = new karma.Server({
32-
configFile: __dirname + '/karma.conf.js',
33-
singleRun: true
34-
}, done);
35-
server.start();
36-
});
37-
38-
gulp.task('test-pr', ['dist'], function(done) {
39-
new karma.Server({
40-
configFile: __dirname + '/karma.conf.js',
41-
browsers: ['Firefox', 'Chrome_Travis'],
42-
singleRun: true
43-
}, done).start();
44-
});
45-
46-
gulp.task('test-ci', ['dist'], function(done) {
47-
var server = new karma.Server({
48-
configFile: __dirname + '/karma.conf.ci.js',
49-
singleRun: true
50-
}, done);
51-
server.start();
52-
});
53-
5419
gulp.task('dist', function() {
5520
browserify({
5621
entries: sources,
@@ -82,18 +47,8 @@ gulp.task('dist', function() {
8247
.pipe(gulp.dest('dist'));
8348
});
8449

85-
gulp.task('clean', del.bind(null, ['build', 'coverage', 'dist']));
86-
87-
gulp.task('pr', ['lint', 'test-pr'], function() {
88-
gulp.src('./coverage/**/lcov.info')
89-
.pipe(coveralls());
90-
});
91-
92-
gulp.task('ci', ['lint', 'test-ci'], function() {
93-
gulp.src('./coverage/**/lcov.info')
94-
.pipe(coveralls());
95-
});
50+
gulp.task('clean', del.bind(null, ['build', 'dist']));
9651

9752
gulp.task('default', ['clean'], function(cb) {
98-
runSequence('lint', 'dist', 'test', cb);
53+
runSequence('dist', 'test', cb);
9954
});

0 commit comments

Comments
 (0)