eslint-plugin-angular
Advanced tools
Comparing version 0.1.2 to 0.2.0
@@ -25,2 +25,3 @@ (function(){ | ||
'ng_module_setter': require('./rules/ng_module_setter'), | ||
'ng_no_angular_mock': require('./rules/ng_no_angular_mock'), | ||
'ng_no_digest': require('./rules/ng_no_digest'), | ||
@@ -63,2 +64,3 @@ 'ng_no_jquery_angularelement': require('./rules/ng_no_jquery_angularelement'), | ||
'ng_module_setter': 2, | ||
'ng_no_angular_mock': 0, | ||
'ng_no_digest': 2, | ||
@@ -65,0 +67,0 @@ 'ng_no_jquery_angularelement': 2, |
{ | ||
"name": "eslint-plugin-angular", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"description": "ESLint rules for AngularJS projects", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -54,2 +54,3 @@ [![Build Status](https://travis-ci.org/Gillespie59/eslint-plugin-angular.svg?branch=master)](https://travis-ci.org/Gillespie59/eslint-plugin-angular) | ||
| 'ng_controller_name': [2, /[A-Z].*Controller$/] | All your controllers should have a name starting with the parameter you can define in your config object. The second parameter can be a Regexp wrapped in quotes. ("ng_controller_name": [2, "ng"]) [Y123](https://github.com/johnpapa/angular-styleguide#style-y123), [Y124](https://github.com/johnpapa/angular-styleguide#style-y124)| | ||
| 'ng_deferred':0 | When you want to create a new promise, you should not use the $q.deferred anymore. Prefer the new syntax : $q(function(resolve, reject){}) | ||
| 'ng_definedundefined': 2 | You should use the angular.isUndefined or angular.isDefined methods instead of using the keyword undefined. We also check the use of !angular.isUndefined and !angular.isDefined (should prefer the reverse function)| | ||
@@ -68,2 +69,3 @@ | 'ng_di': [2, 'function'] | All your DI should use the same syntax : the Array or function syntaxes ("ng_di": [2, "function or array"])| | ||
| 'ng_module_setter':2 | Declare modules without a variable using the setter syntax.[Y021](https://github.com/johnpapa/angular-styleguide#style-y021) | | ||
| 'ng_no_angular_mock':0 | All methods defined in the angular.mock object are also available in the object window. So you can remove angular.mock from your code | ||
| 'ng_no_digest': 2 | The scope's $digest() method shouldn't be used. You should prefer the $apply method. | | ||
@@ -102,4 +104,4 @@ | 'ng_no_jquery_angularelement': 2 | You should not wrap angular.element object into jQuery(), because angular.element already return jQLite element| | ||
* Create a JavaScript file for the new rule in the rules directory | ||
* Create an unit test for this rule in the test directory | ||
* Create a JavaScript file for the new rule in the rules directory (the name of the file should be prefixed by 'ng' for Angular 1 rules, or 'ng2' for Angular 2 rules) | ||
* Create an unit test for this rule in the test directory (with the same name) | ||
* Update the main index.js file, in order to add the new rule in the 'rules' property, and set the default configuration in the rulesConfig property | ||
@@ -106,0 +108,0 @@ * Update the "Rules" part of the README.md file with a small description of the rule and its default configuration. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
146708
95
2633
129