Skip to content

Conversation

@jodarove
Copy link
Contributor

@jodarove jodarove commented Jan 6, 2021

Details

In this PR:

  1. Configures lwc/valid-api in the recommended preset, disallowing mixed use of upper case and underscore in API fields and methods.
  2. Adds lwc/prefer-custom-event to the recommended preset.
  3. Adds lwc/no-dupe-class-members to the recommended preset.

in the recommended preset to disallow mixed use of upper case and underscore in api fields/methods.
@jodarove jodarove force-pushed the jodarove/prevent-api-with-mixed-uppercase-and-underscore branch from c7d3b22 to 11984b4 Compare January 6, 2021 23:31
'@lwc/lwc/no-document-query': 'error',
'@lwc/lwc/no-inner-html': 'error',
'@lwc/lwc/no-leading-uppercase-api-name': 'error',
'@lwc/lwc/valid-api': [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@jodarove jodarove Jan 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just did it in 5d8d309

@jodarove jodarove requested a review from pmdartus January 8, 2021 00:15
@pmdartus
Copy link
Contributor

pmdartus commented Jan 8, 2021

Last inquiry for you @jodarove, what do you think about also adding @lwc/lwc/no-dupe-class-members rule?

I am surprised that we missed it. Because we already had 2 issues (salesforce/eslint-plugin-lwc#56 and salesforce/eslint-plugin-lwc#25), I think it's something that would be really useful to land sooner than later. =)

@jodarove jodarove changed the title chore: upgrade @lwc/eslint-plugin-lwc and configure lwc/valid-api chore: upgrade @lwc/eslint-plugin-lwc and add rules to recommended preset Jan 8, 2021
@jodarove jodarove merged commit 6fd7532 into master Jan 8, 2021
@jodarove jodarove deleted the jodarove/prevent-api-with-mixed-uppercase-and-underscore branch January 8, 2021 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants