Use eslint and stylelint, fix all errors (#282)
* Use eslint and stylelint, fix all errors * Remove jshint, jsbeautify * Use Object.keys directly since that is available in all major browsers * Fixes for eslint, stylelint errors * stylelint is not included in grunt test yet because jquery.uls.mobile.css has so many !important and need to figure out whether they are really needed
This commit is contained in:
committed by
Niklas Laxström
parent
ddadf086c5
commit
2a77df6c41
27
Gruntfile.js
27
Gruntfile.js
@@ -1,22 +1,35 @@
|
||||
/*jshint node:true */
|
||||
'use strict';
|
||||
|
||||
module.exports = function ( grunt ) {
|
||||
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
|
||||
grunt.loadNpmTasks( 'grunt-eslint' );
|
||||
grunt.loadNpmTasks( 'grunt-stylelint' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-qunit' );
|
||||
|
||||
grunt.initConfig( {
|
||||
jshint: {
|
||||
eslint: {
|
||||
all: [
|
||||
'**/*.js',
|
||||
'src/jquery.uls.data.js',
|
||||
'!examples/**',
|
||||
'!node_modules/**',
|
||||
'!vendor/**'
|
||||
]
|
||||
},
|
||||
stylelint: {
|
||||
options: {
|
||||
jshintrc: true
|
||||
syntax: 'css'
|
||||
},
|
||||
all: ['*.js', 'src/*.js']
|
||||
src: [
|
||||
'**/*.css',
|
||||
'!node_modules/**'
|
||||
]
|
||||
},
|
||||
qunit: {
|
||||
all: 'test/index.html'
|
||||
}
|
||||
} );
|
||||
|
||||
grunt.registerTask( 'lint', 'jshint' );
|
||||
grunt.registerTask( 'test', ['lint', 'qunit'] );
|
||||
grunt.registerTask( 'lint', [ 'eslint' ] );
|
||||
grunt.registerTask( 'test', [ 'lint', 'qunit' ] );
|
||||
grunt.registerTask( 'default', 'test' );
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user