ESLint configuration file for IWT Health node packages.
Include .eslintrc.json
in your project with the following:
{
"extends": "iwt"
}
Install grunt-eslint:
npm install --save-dev iwtsolutions/eslint-config-iwt
npm install --save-dev grunt-eslint
Update Gruntfile.js
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
eslint: {
options: {
configFile: '.eslintrc.json'
},
target: '.'
}
});
grunt.loadNpmTasks('grunt-eslint');
grunt.registerTask('default', [ 'eslint' ]);
grunt.registerTask('lint', 'eslint');
};
npm install -g eslint
From command line, run eslint .
or eslint filename.js
. See the command line interface guide for more options.