Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: run eslint as a part of grunt dev #1267

Merged
merged 2 commits into from
Dec 4, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-mocha');
grunt.loadNpmTasks('grunt-parallel');
grunt.loadNpmTasks('grunt-run');
grunt.loadTasks('build/tasks');

var langs;
Expand Down Expand Up @@ -248,7 +249,7 @@ module.exports = function(grunt) {
},
watch: {
files: ['lib/**/*', 'test/**/*.js', 'Gruntfile.js'],
tasks: ['build', 'testconfig', 'fixture']
tasks: ['run:npm_run_eslint', 'build', 'testconfig', 'fixture']
},
testconfig: {
test: {
Expand Down Expand Up @@ -337,6 +338,12 @@ module.exports = function(grunt) {
base: ['.']
}
}
},
run: {
npm_run_eslint: {
cmd: 'npm',
args: ['run', 'eslint']
}
}
});

Expand Down Expand Up @@ -389,6 +396,7 @@ module.exports = function(grunt) {
]);

grunt.registerTask('dev', [
'run:npm_run_eslint',
'build',
'testconfig',
'fixture',
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"scripts": {
"api-docs": "jsdoc --configure .jsdoc.json",
"build": "grunt",
"eslint": "eslint --format stylish '{lib,test,build,doc}/**/*.js' 'Gruntfile.js'",
"eslint": "eslint --color --format stylish '{lib,test,build,doc}/**/*.js' 'Gruntfile.js'",
"test": "npm run retire && tsc && grunt test",
"version": "echo \"use 'npm run release' to bump axe-core version\" && exit 1",
"prepublishOnly": "grunt build && grunt file-exists",
Expand Down Expand Up @@ -93,6 +93,7 @@
"grunt-contrib-watch": "^1.1.0",
"grunt-mocha": "1.1.0",
"grunt-parallel": "^0.5.1",
"grunt-run": "^0.8.1",
"html-entities": "^1.2.0",
"husky": "^1.1.1",
"jquery": "^3.0.0",
Expand Down