1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-12-21 21:17:22 +00:00

chore: add build-time eslint support

This commit is contained in:
hacksalot 2018-02-12 03:34:55 -05:00
parent 033b29fd3a
commit 922c1968ca
No known key found for this signature in database
GPG Key ID: 2F343EC247CA4B06
3 changed files with 27 additions and 45 deletions

17
.eslintrc.yml Normal file
View File

@ -0,0 +1,17 @@
env:
es6: true
node: true
extends: 'eslint:recommended'
rules:
# indent:
# - error
# - 4
linebreak-style:
- error
- unix
quotes:
- error
- single
semi:
- error
- always

View File

@ -39,42 +39,13 @@ module.exports = function (grunt) {
all: { src: ['test/*.js'] }
},
// jsdoc : {
// dist : {
// src: ['src/**/*.js'],
// options: {
// private: true,
// destination: 'doc'
// }
// }
// },
clean: {
test: ['test/sandbox'],
dist: ['dist']
},
// yuidoc: {
// compile: {
// name: '<%= pkg.name %>',
// description: '<%= pkg.description %>',
// version: '<%= pkg.version %>',
// url: '<%= pkg.homepage %>',
// options: {
// paths: 'src/',
// outdir: 'docs/'
// }
// }
// },
jshint: {
options: {
laxcomma: true,
expr: true,
eqnull: true,
esversion: 6
},
all: ['Gruntfile.js', 'dist/cli/**/*.js', 'test/*.js']
eslint: {
target: ['Gruntfile.js', 'dist/cli/**/*.js', 'test/*.js']
}
};
@ -83,28 +54,22 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-simple-mocha');
//grunt.loadNpmTasks('grunt-contrib-yuidoc');
//grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-contrib-clean');
// Use 'grunt test' for local testing
grunt.registerTask('test', 'Test the HackMyResume application.',
function( config ) {
grunt.task.run(['clean:test','build',/*'jshint',*/'simplemocha:all']);
});
// Use 'grunt document' to build docs
// grunt.registerTask('document', 'Generate HackMyResume documentation.',
// function( config ) {
// grunt.task.run( ['jsdoc'] );
// });
grunt.task.run(['clean:test','build','eslint','simplemocha:all']);
}
);
// Use 'grunt build' to build HMR
grunt.registerTask('build', 'Build the HackMyResume application.',
function( config ) {
grunt.task.run( ['clean:dist','copy','coffee'] );
});
grunt.task.run( ['clean:dist','copy','coffee','eslint'] );
}
);
// Default task does everything
grunt.registerTask('default', [ 'test', 'document' ]);

View File

@ -97,7 +97,7 @@
"grunt-contrib-clean": "^1.1.0",
"grunt-contrib-coffee": "^2.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-jshint": "^1.1.0",
"grunt-eslint": "^20.1.0",
"grunt-simple-mocha": "*",
"jsonresume-theme-boilerplate": "^0.1.2",
"jsonresume-theme-classy": "^1.0.9",