Skip to content

Commit

Permalink
Merge pull request orta#19 from johansteffner/master
Browse files Browse the repository at this point in the history
Fix check for @types dependency
  • Loading branch information
orta authored Apr 8, 2019
2 parents 9c0d0e3 + 31ac522 commit b6fbfec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export const checkForTypesInDeps = packageDiff => {
const sentence = danger.utils.sentence

if (packageDiff.dependencies && packageDiff.dependencies.added) {
const typesDeps = packageDiff.dependencies.added.filter(d => d.startsWith("@types")).map(printDep)
const typesDeps = packageDiff.dependencies.added.filter(d => d.startsWith("@types/")).map(printDep)
if (typesDeps.length) {
const message = `@types dependencies were added to package.json, as a dependency for others.`
const idea = `You need to move ${sentence(typesDeps)} into "devDependencies"?`
Expand Down

0 comments on commit b6fbfec

Please sign in to comment.