Skip to content

Commit a6a473c

Browse files
Merge pull request #427 from Gillespie59/development
1.5.1
2 parents b919034 + 83cb851 commit a6a473c

File tree

5 files changed

+22
-2
lines changed

5 files changed

+22
-2
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,12 @@ These rules help you to enforce the usage of angular wrappers.
179179
* [typecheck-string](docs/typecheck-string.md) - use `angular.isString` instead of `typeof` comparisons
180180
* [window-service](docs/window-service.md) - use `$window` instead of `window` ([y180](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y180))
181181
182+
### Misspelling
183+
184+
These rules help you avoiding misspellings.
185+
186+
* [on-destroy](docs/on-destroy.md) - Check for common misspelling $on('destroy', ...).
187+
182188
183189
----
184190

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-angular",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"description": "ESLint rules for AngularJS projects",
55
"main": "index.js",
66
"scripts": {

scripts/ruleCategories.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"angularWrapper",
99
"deprecatedRule",
1010
"removedRule",
11-
"uncategorizedRule"
11+
"uncategorizedRule",
12+
"misspelling"
1213
],
1314
"categories": {
1415
"possibleError": {
@@ -35,6 +36,10 @@
3536
"headline": "Angular Wrappers",
3637
"description": "These rules help you to enforce the usage of angular wrappers."
3738
},
39+
"misspelling": {
40+
"headline": "Misspelling",
41+
"description": "These rules help you avoiding misspellings."
42+
},
3843
"deprecatedRule": {
3944
"headline": "Deprecated rules",
4045
"description": "These rules will be removed in version 1.0.0"

test/di.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ angularObjectList.forEach(function(object) {
3232
}, {
3333
code: 'angular.module("myModule").' + object + '(["slMathPi", function(pi) {}]);',
3434
options: ['array', {matchNames: false}]
35+
}, {
36+
code: 'angular.module("myModule").' + object + '(["$log", function($l) {}]);',
37+
options: ['array', {matchNames: false}]
3538
}, {
3639
code: 'angular.module("myModule").' + object + '(myFunction);function MyFunction() {}',
3740
options: ['function']

test/function-type.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ var valid = [];
1414
var invalid = [];
1515

1616
valid.push({
17+
code: 'angular.module("mymodule.constants", []).constant("EMPTY", [])',
18+
options: ['anonymous']
19+
}, {
20+
code: 'angular.module("mymodule.constants", []).constant("EMPTY", [])',
21+
options: ['named']
22+
}, {
1723
code: 'angular.module("mymodule.constants", []).constant("URL_WHITELIST", ["self","https://someUrl/**"])',
1824
options: ['anonymous']
1925
}, {

0 commit comments

Comments
 (0)