Linting config for StubHub Unified
Based on StubHub Javascript Style Guide
- Install this package in your project directory
> npm install --save-dev eslint-config-stubhub gruntify-eslint eslint
- Create a
.eslintrc.json
in your root project directory with the following content
{
"extends": ["stubhub"]
}
- Add the eslint Grunt task in your Gruntfile
grunt.loadNpmTasks('gruntify-eslint');
eslint: {
src: ['./app/scripts/**/*.js']
}
grunt.registerTask('build', ['clean:dev', 'eslint', 'copy:imgDev', 'sass:dev', 'cssmin:dev', 'sh_precompile:dev', 'dustjs:dev', 'concat:dev', 'copy:dev', 'copy:devCommon', 'requirejs:dev']);