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

chore(rules)!: adds new rules missed in v31 #205

Merged
merged 2 commits into from Feb 2, 2023
Merged

Conversation

geotrev
Copy link
Contributor

@geotrev geotrev commented Feb 1, 2023

  • BREAKING CHANGE?

Description

Forgot a handful of rules from the last renovate update.

Detail

  • @typescript-eslint/key-spacing
  • react/no-object-type-as-default-prop
  • react/sort-default-props
  • jsx-a11y/prefer-tag-over-role
  • jsx-a11y/no-aria-hidden-on-focusable
  • jsx-a11y/anchor-ambiguous-text

@geotrev geotrev self-assigned this Feb 1, 2023
@geotrev geotrev requested a review from a team as a code owner February 1, 2023 18:12
@@ -18,11 +18,17 @@ module.exports = {
'no-return-await': 0,
'no-throw-literal': 0,
'require-await': 0,
'key-spacing': 0,
Copy link
Member

Choose a reason for hiding this comment

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

[nit] please keep this alphabetically sorted

plugins/react.js Outdated
@@ -19,6 +19,13 @@ module.exports = {
}
},
rules: {
// enforces using semantic DOM elements over the ARIA role property.
'jsx-a11y/prefer-tag-over-role': 0,
Copy link
Member

Choose a reason for hiding this comment

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

This rule is important to Garden and should be set to 2 error due to the first rule of ARIA

plugins/react.js Outdated
@@ -118,7 +125,7 @@ module.exports = {
// prevent JSX prop spreading
'react/jsx-props-no-spreading': 0,
// enforce default props alphabetical sorting
'react/jsx-sort-default-props': 0,
'react/sort-default-props': 0,
Copy link
Member

Choose a reason for hiding this comment

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

[nit] please cut/past to retain alphabetical sorting

Comment on lines 28 to 31
'@typescript-eslint/key-spacing': [2, {
beforeColon: false,
afterColon: true
}],
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'@typescript-eslint/key-spacing': [2, {
beforeColon: false,
afterColon: true
}],
'@typescript-eslint/key-spacing': stylisticIssues['key-spacing'],

with stylisticIssues require'd at top of file.

@geotrev geotrev requested a review from jzempel February 1, 2023 19:22
@geotrev
Copy link
Contributor Author

geotrev commented Feb 1, 2023

Fixed all the things: 27a2f72

I removed the other jsx-a11y rules from my previous commit since we're getting those for free in the plugin.

@jzempel jzempel changed the title chore(rules): adds new rules missed in v31 chore(rules)!: adds new rules missed in v31 Feb 1, 2023
@geotrev
Copy link
Contributor Author

geotrev commented Feb 2, 2023

Thanks for updating the title.

I also opened a bug against jsx-a11y about some HTML patterns that are likely false-errors (prefer-tag-over-role): jsx-eslint/eslint-plugin-jsx-a11y#920

@geotrev geotrev merged commit 02bba24 into main Feb 2, 2023
@geotrev geotrev deleted the george/new-rules branch February 2, 2023 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants