Skip to content

Commit

Permalink
Extend jsx-a11y to also look for Next.js Images
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenSandwich committed Mar 13, 2024
1 parent e87bdd6 commit f50b853
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/cli/config/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ module.exports = {
],

rules: {
// Extend jsx-a11y/alt-text to also look for Next.js Images
"jsx-a11y/alt-text": [2, {
"elements": ["img", "object", "area", "input[type=\"image\"]"],
"img": ["img", "Image", "NextImage"],
"object": ["Object"],
"area": ["Area"],
"input[type=\"image\"]": ["InputImage"]
}],
// TypeScript's `noFallthroughCasesInSwitch` option is more robust (#6906)
'default-case': 'off',
// 'tsc' already handles this (https://github.com/typescript-eslint/typescript-eslint/issues/291)
Expand Down

0 comments on commit f50b853

Please sign in to comment.