Skip to content

Commit

Permalink
no-implicit-dependencies should include peer dependencies even with "…
Browse files Browse the repository at this point in the history
…dev" option set (palantir#3875)
  • Loading branch information
saberduck authored and giladgray committed Jun 26, 2018
1 parent 1c31dc0 commit 6989dd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/rules/noImplicitDependenciesRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class Rule extends Lint.Rules.AbstractRule {
`,
optionsDescription: Lint.Utils.dedent`
By default the rule looks at \`"dependencies"\` and \`"peerDependencies"\`.
By adding the \`"${OPTION_DEV}"\` option the rule looks at \`"devDependencies"\` instead of \`"peerDependencies"\`.
By adding the \`"${OPTION_DEV}"\` option the rule also looks at \`"devDependencies"\`.
By adding the \`"${OPTION_OPTIONAL}"\` option the rule also looks at \`"optionalDependencies"\`.
`,
options: {
Expand Down Expand Up @@ -121,7 +121,7 @@ function getDependencies(fileName: string, options: Options): Set<string> {
if (content.dependencies !== undefined) {
addDependencies(result, content.dependencies);
}
if (!options.dev && content.peerDependencies !== undefined) {
if (content.peerDependencies !== undefined) {
addDependencies(result, content.peerDependencies);
}
if (options.dev && content.devDependencies !== undefined) {
Expand Down
1 change: 0 additions & 1 deletion test/rules/no-implicit-dependencies/dev/test.ts.lint
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as ts from 'typescript';
~~~~~~~~~~~~ [err % ('typescript')]

import {assert} from 'chai';

Expand Down

0 comments on commit 6989dd7

Please sign in to comment.