Commit 8c58c54
authored
fix(eslint-plugin): ignore underscore-prefixed params in unresolvedProviderDependencies rule (#281)
Parameters prefixed with `_` are a TypeScript convention for
intentionally unused parameters. The `unresolvedProviderDependencies`
ESLint rule was incorrectly flagging these as unresolved dependencies.
- Add `isDependencyPrefixedWithUnderscore` method to `Provider` DTO to
detect `_`-prefixed params
- Update `GraphHandler` to skip the unresolved dependency check for such
parameters
- Add fixture and test case for a graph with an underscore-prefixed
provider param1 parent ca971d3 commit 8c58c54
File tree
4 files changed
+21
-1
lines changed- packages
- eslint-plugin-obsidian
- src/rules/unresolvedProviderDependencies
- tests/unresolvedProviderDependencies
- fixtures
- ts-morph-extensions/src/dto
4 files changed
+21
-1
lines changedLines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
0 commit comments