-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore: enable jsx-a11y, react, and react-hooks ESLint plugins internally #4197
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
Changes from all commits
2fb9dbd
f29398d
aa443c5
33959df
d9bf5ac
34a2aee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module.exports = { | ||
extends: [ | ||
'../../.eslintrc.js', | ||
'plugin:jsx-a11y/recommended', | ||
'plugin:react/recommended', | ||
'plugin:react-hooks/recommended', | ||
], | ||
plugins: ['jsx-a11y', 'react', 'react-hooks'], | ||
overrides: [ | ||
{ | ||
files: ['./src/pages/*.tsx'], | ||
rules: { | ||
'import/no-default-export': 'off', | ||
}, | ||
}, | ||
], | ||
rules: { | ||
'react/jsx-no-target-blank': 'off', | ||
'react/no-unescaped-entities': 'off', | ||
'react-hooks/exhaustive-deps': 'error', | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,8 +126,6 @@ function Sponsors(props: { | |
title: string; | ||
className?: string; | ||
}): JSX.Element { | ||
// TODO this seems like a ts-eslint problem: JSON types are not resolved | ||
/* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is... interesting. Didn't test it locally, but is that basically just because we used a local ESLint config instead of the global one? Is this actually a valid bug though that we can't resolve JSON types? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I haven't dug in too deep. It's better now 🤷 It would be nice to know but I don't quite have the time to poke too closely, heh. |
||
const tierSponsors = sponsors.filter(sponsor => sponsor.tier === props.tier); | ||
return ( | ||
<div className={props.className}> | ||
|
@@ -147,7 +145,6 @@ function Sponsors(props: { | |
</ul> | ||
</div> | ||
); | ||
/* eslint-enable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call */ | ||
} | ||
|
||
function Home(): JSX.Element { | ||
|
Uh oh!
There was an error while loading. Please reload this page.