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

Proposal: Case Sensitive Dependencies #915

Open
kt3k opened this issue Jun 13, 2017 · 3 comments

Comments

@kt3k
Copy link

commented Jun 13, 2017

Digging more and more in ESLint rules, i found some good ones which enforces good style and more readable code. This issue is for dependencies/case-sensitive rule - not fixable.

Suggested configuration.

{
  "dependencies/case-sensitive": "error"
}

This rule verifies that require("…"), require.resolve(…), import "…" and export … from "…" ids match the case that is reported by a directory listing.

On mac and windows, require works in case-insensitive way, but in case-sensitive way on linux. The case mismatches in module ids cause platform-dependent bugs. This rule detects them and enforces platform independent style.

@Flet Flet added the enhancement label Nov 7, 2017

@Flet

This comment has been minimized.

Copy link
Member

commented Nov 7, 2017

This is a neat idea! I recall we had some performance issues with some rules that search the filesystem. I'll see if I can find the reference.

@ematipico

This comment has been minimized.

Copy link
Contributor

commented Nov 8, 2017

If your project has babel, it will warn you about naming problem. If you work on a UNIX machine, this will end up to be a problem during compilation (the OS is case sensitive on filenames). I think rule should be a must have.

@LinusU

This comment has been minimized.

Copy link
Member

commented Nov 9, 2017

I recall we had some performance issues with some rules that search the filesystem.

Could be nice with a rule that just enforced that it was all lower case. That way a part of standard would also be to name your javascript files in lower case which I think would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.