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

Commit a39d444

Browse files
David BradshawDavid Bradshaw
David Bradshaw
authored and
David Bradshaw
committed
swap jshint for eslint
1 parent 8da8e03 commit a39d444

File tree

7 files changed

+15
-36
lines changed

7 files changed

+15
-36
lines changed

.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"parserOptions": { "ecmaVersion": 2015 },
1010
"rules": {
1111
"func-names": 0,
12+
"global-require": 0,
1213
"no-param-reassign": 0,
1314
"no-plusplus": 0,
1415
"no-restricted-globals": 0,

gruntfile.js

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
/*global module:false*/
21
module.exports = function(grunt) {
32
// show elapsed time at the end
4-
require('time-grunt')(grunt)
3+
require('time-grunt')(grunt) // eslint-disable-line import/no-extraneous-dependencies
54

65
// load all grunt tasks
7-
//require('load-grunt-tasks')(grunt);
8-
require('jit-grunt')(grunt, {
6+
// require('load-grunt-tasks')(grunt);
7+
require('jit-grunt')(grunt, { // eslint-disable-line import/no-extraneous-dependencies
98
'bump-only': 'grunt-bump',
109
'bump-commit': 'grunt-bump',
1110
coveralls: 'grunt-karma-coveralls'
@@ -79,25 +78,6 @@ module.exports = function(grunt) {
7978
}
8079
},
8180

82-
jshint: {
83-
options: {
84-
asi: true,
85-
eqeqeq: true,
86-
laxbreak: true,
87-
globals: {
88-
jQuery: false,
89-
require: true,
90-
process: true
91-
}
92-
},
93-
gruntfile: {
94-
src: 'gruntfile.js'
95-
},
96-
code: {
97-
src: 'src/**/*.js'
98-
}
99-
},
100-
10181
uglify: {
10282
options: {
10383
sourceMap: true,
@@ -196,13 +176,13 @@ module.exports = function(grunt) {
196176
},
197177

198178
eslint: {
199-
target: ['src/**']
179+
target: ['src/**', '*.js']
200180
}
201181
})
202182

203183
grunt.registerTask('default', ['notest', 'karma:single'])
204184
grunt.registerTask('build', ['removeBlock', 'copy', 'uglify'])
205-
grunt.registerTask('notest', ['eslint', 'jsonlint', 'jshint', 'build'])
185+
grunt.registerTask('notest', ['eslint', 'jsonlint', 'build'])
206186
grunt.registerTask('test', ['clean', 'eslint', 'karma:single', 'qunit'])
207187
grunt.registerTask('test-watch', ['clean', 'karma:watch'])
208188
grunt.registerTask('travis', [

index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
'use strict'
2-
31
module.exports = require('./js')

karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ module.exports = function(config) {
7171

7272
// start these browsers
7373
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
74-
browsers: ['PhantomJS'], //'Chrome', 'Firefox', 'Safari', 'PhantomJS'
74+
browsers: ['PhantomJS'], // 'Chrome', 'Firefox', 'Safari', 'PhantomJS'
7575

7676
// Continuous Integration mode
7777
// if true, Karma captures browsers, runs the tests and exits

package-lock.json

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

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
],
1414
"scripts": {
1515
"build": "npm install && grunt",
16-
"eslint": "eslint src/* --color",
17-
"eslint:fix": "eslint src/* --color --fix",
16+
"eslint": "eslint *.js src/* --color",
17+
"eslint:fix": "npm run eslint -- --fix",
1818
"test-watch": "grunt test-watch",
1919
"test": "grunt travis"
2020
},
@@ -35,7 +35,7 @@
3535
"eslint": "^6.6.0",
3636
"eslint-config-adjunct": "3.0.0",
3737
"eslint-config-airbnb-base": "^14.0.0",
38-
"eslint-config-prettier": "^6.5.0",
38+
"eslint-config-prettier": "^6.6.0",
3939
"eslint-plugin-array-func": "^3.1.3",
4040
"eslint-plugin-eslint-comments": "^3.1.2",
4141
"eslint-plugin-html": "^6.0.0",

test-main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var allTestFiles = []
33
var TEST_REGEXP = /(spec|test)\.js$/i
44

55
// Get a list of all the test files to include
6-
Object.keys(window.__karma__.files).forEach(function(file) {
6+
Object.keys(window.__karma__.files).forEach(function(file) { // eslint-disable-line no-underscore-dangle
77
if (TEST_REGEXP.test(file)) {
88
// Normalize paths to RequireJS module names.
99
// If you require sub-dependencies of test files to be loaded as-is (requiring file extension)
@@ -29,5 +29,5 @@ require.config({
2929
deps: allTestFiles,
3030

3131
// we have to kickoff jasmine, as it is asynchronous
32-
callback: window.__karma__.start
32+
callback: window.__karma__.start // eslint-disable-line no-underscore-dangle
3333
})

0 commit comments

Comments
 (0)