Navigation Menu

Skip to content

Commit

Permalink
build: Switch to eslint
Browse files Browse the repository at this point in the history
Closes #42.
  • Loading branch information
edg2s authored and Krinkle committed Jan 3, 2017
1 parent 5c5c564 commit 53584da
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 36 deletions.
6 changes: 6 additions & 0 deletions .eslintrc.json
@@ -0,0 +1,6 @@
{
"extends": "wikimedia",
"env": {
"node": true
}
}
3 changes: 0 additions & 3 deletions .jscsrc

This file was deleted.

1 change: 0 additions & 1 deletion .jshintignore

This file was deleted.

14 changes: 0 additions & 14 deletions .jshintrc

This file was deleted.

17 changes: 5 additions & 12 deletions Gruntfile.js
@@ -1,33 +1,26 @@
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadTasks( 'build/tasks' );

grunt.initConfig( {
jshint: {
options: {
jshintrc: true
},
eslint: {
all: [ '*.js', '{build,src,test}/**/*.js' ]
},
jscs: {
all: '<%= jshint.all %>'
},
jsonlint: {
all: 'test/data.json'
},
watch: {
files: [
'.{jscsrc,jshintignore,jshintrc}',
'<%= jshint.all %>',
'.eslintrc.json',
'<%= eslint.all %>',
'test/data.json'
],
tasks: [ 'test' ]
}
} );

grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'unit' ] );
grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'unit' ] );
grunt.registerTask( 'default', 'test' );
};
2 changes: 2 additions & 0 deletions build/tasks/unit.js
@@ -1,3 +1,5 @@
/* eslint-disable no-console */

module.exports = function ( grunt ) {
grunt.registerTask( 'unit', function () {
var assert = require( 'assert' ),
Expand Down
11 changes: 5 additions & 6 deletions package.json
Expand Up @@ -21,11 +21,10 @@
},
"dependencies": {},
"devDependencies": {
"grunt": "0.4.5",
"grunt-cli": "0.1.13",
"grunt-contrib-jshint": "1.0.0",
"grunt-contrib-watch": "0.6.1",
"grunt-jscs": "2.7.0",
"grunt-jsonlint": "1.0.4"
"eslint-config-wikimedia": "0.3.0",
"grunt": "1.0.1",
"grunt-contrib-watch": "1.0.0",
"grunt-eslint": "18.0.0",
"grunt-jsonlint": "1.0.8"
}
}
6 changes: 6 additions & 0 deletions src/cssjanus.js
Expand Up @@ -259,6 +259,8 @@ function CSSJanus() {
/**
* @private
* @param {string} match
* @param {string} property
* @param {string} offset
* @return {string}
*/
function calculateNewShadow( match, property, offset ) {
Expand All @@ -268,6 +270,10 @@ function CSSJanus() {
/**
* @private
* @param {string} match
* @param {string} property
* @param {string} color
* @param {string} space
* @param {string} offset
* @return {string}
*/
function calculateNewFourTextShadow( match, property, color, space, offset ) {
Expand Down

0 comments on commit 53584da

Please sign in to comment.