A static linting tool for angular ng directives
This plugin requires Grunt.
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-ng-attr-hint --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-ng-attr-hint');
In your project's Gruntfile, add a section named ng-attr-hint
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
'ng-attr-hint': {
'your_target': {
options: {
// Optional field
// Task-specific options go here.
},
files: {
// Target-specific file lists and/or options go here.
}
}
});
In this example, the default options are used to do something with whatever. Options field are not necessary (optional field), just to pass files argument with required fileNames in it.
grunt.initConfig({
'ng-attr-hint': {
'your_target': {
files:{
'test/ng-attr-hint-result.txt': ['*.html']
}
}
}
});
In this example, options:skip
rule got added. This rule will help to skip specified attributes in the list. files:[]
- mandatory field to run rules.
grunt.initConfig({
'ng-attr-hint': {
'your_target': {
options: {
skip: ['ngInit']
},
files: {
'test/ng-attr-hint-result.txt': ['*.html']
}
}
});
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
0.0.1 - Released on 09-AUGUST-2015
Copyright (c) 2015 Senthil Porunan. Licensed under the MIT license.