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

id-match requires separate config for property name #11797

Closed
tinymins opened this issue Jun 3, 2019 · 4 comments
Closed

id-match requires separate config for property name #11797

tinymins opened this issue Jun 3, 2019 · 4 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion auto closed The bot closed this issue enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion rule Relates to ESLint's core rules

Comments

@tinymins
Copy link
Contributor

tinymins commented Jun 3, 2019

What rule do you want to change?
id-match

Does this change cause the rule to produce more or fewer warnings?
Yes

How will the change be implemented? (New option, new default behavior, etc.)?
New option

Please provide some example code that this change will affect:

/* eslint id-match: [2, "^[^_][a-zA-Z]*$", { 
  "propertiesPattern": "^[a-z_][a-zA-Z]*$",
  "errorMessage": "Identifier '{{name}}' is not in camelcase.",
  "propertiesErrorMessage": "Properties identifier '{{name}}' is not in lower camelcase."
}] */
// bad
const _A = { a: 1 };
const _A = { _a: 1 };
const A = { a_b: 1 };
const A = { B: 1 };

// good
const A = { a: 1 };
const A = { _a: 1 };
const A = { aB: 1 };
const A = { b: 1 };

What does the rule currently do for this code?
Cannot separate var name with prop name, sometimes we want to allow underscore in prop names but not in normal var names.

What will the rule do after it's changed?
Additional config added, no affect for prev version.

Are you willing to submit a pull request to implement this change?
Yes

@tinymins tinymins added enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules triage An ESLint team member will look at this issue soon labels Jun 3, 2019
@tinymins
Copy link
Contributor Author

tinymins commented Jun 3, 2019

#10477

@g-plane
Copy link
Member

g-plane commented Jun 3, 2019

Hey @tinymins , thanks for the issue.

Alternatively, you can consider camelcase and set "properties" false.

@tinymins
Copy link
Contributor Author

tinymins commented Jun 3, 2019

Hey @tinymins , thanks for the issue.

Alternatively, you can consider camelcase and set "properties" false.

Hi, @g-plane #10473

@aladdin-add aladdin-add added evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Jun 4, 2019
@eslint-deprecated eslint-deprecated bot added the auto closed The bot closed this issue label Jul 5, 2019
@eslint-deprecated
Copy link

Unfortunately, it looks like there wasn't enough interest from the team
or community to implement this change. While we wish we'd be able to
accommodate everyone's requests, we do need to prioritize. We've found
that issues failing to reach accepted status after 21 days tend to
never be accepted, and as such, we close those issues.
This doesn't mean the idea isn't interesting or useful, just that it's
not something the team can commit to.

Thanks for contributing to ESLint and we appreciate your understanding.

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Jan 2, 2020
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jan 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion auto closed The bot closed this issue enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion rule Relates to ESLint's core rules
Projects
None yet
Development

No branches or pull requests

3 participants