Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No lockfiles rule #82

Open
SamVerschueren opened this issue Jun 25, 2017 · 8 comments
Open

No lockfiles rule #82

SamVerschueren opened this issue Jun 25, 2017 · 8 comments
Labels

Comments

@SamVerschueren
Copy link
Owner

I never use lockfiles for my modules, only for applications to make sure that the application that is built has the exact same dependencies as the one I tested everything with. Maybe we should add this as a warning instead of an error? What if the lockfile is added to .gitignore, should we still warn?

// @sindresorhus

@sindresorhus
Copy link

👍 Warning and not if it's in .gitignore.

@sindresorhus
Copy link

The rule should:

  • Warn if package-lock.json or yarn.lock is in the root.
  • Warn if there's no .npmrc with package-lock=false.
  • Warn if there's no yarn.lock in .gitignore.

@SamVerschueren
Copy link
Owner Author

Good suggestions!

@silverwind
Copy link

silverwind commented Jul 30, 2017

Just adding that yarn can also be configured to not emit lockfiles on install, I hate them with passion 😉.

@sindresorhus
Copy link

@silverwind Yup, but I don't use Yarn, so don't think it's worth introducing yet another meta file.

@SamVerschueren
Copy link
Owner Author

SamVerschueren commented Sep 23, 2017

Because those are just warnings, I guess they shouldn't/can't be auto-fixable?

Warn if package-lock.json or yarn.lock is in the root.

Remove lock file

Warn if there's no .npmrc with package-lock=false.

Create .npmrc with package-lock=false

Warn if there's no yarn.lock in .gitignore.

Add yarn.lock to the root

@sindresorhus
Copy link

I don't see why you couldn't auto-fix them. What you suggested above sounds fine.

@SamVerschueren
Copy link
Owner Author

You're right, I was assuming that warnings shouldn't be auto-fixable. But actually they can. Thanks for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants