EmmanuelDemey / EmmanuelDemey/eslint-plugin-angular

False positive for angular/di: [2, "array"] rule

Open
#362 5 comments 2 reactions 0 assignees View on GitHub
Bug
Dominant language
JavaScript
Stars
620
Forks
127
PR merge metrics
No merged PRs in 30d

Description

In version 1.0.0, the following does not pass linting:

```
'use strict';

/*eslint angular/di: [2,"array"]*/

angular.module('myApp.myService')

.factory('myService', ['myDep', myService]);

function myService(myDep) {
}
```

```
$ ./node_modules/.bin/eslint test.js

test.js
9:1 error You should use the array syntax for DI angular/di

✖ 1 problem (1 error, 0 warnings)
```

It was OK under 0.15.0. Also it passes under `/*eslint angular/di: [2,"function"]*/`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.