Created
July 28, 2022 07:41
-
-
Save bryanltobing/1b5e13faa81f990f1ae1f08a8d6dcfec to your computer and use it in GitHub Desktop.
Eslint configuration to support javascript and typescript in nextjs apps using airbnb configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"root": true, | |
// Javascript eslint configuration | |
"extends": [ | |
"airbnb", | |
"airbnb/hooks", | |
"next", | |
"next/core-web-vitals", | |
"prettier" | |
], | |
"rules": { | |
"react/function-component-definition": [ | |
2, | |
{ | |
"namedComponents": "arrow-function" | |
} | |
], | |
"react/jsx-props-no-spreading": "off" | |
}, | |
// Typescript eslint configuration | |
"overrides": [ | |
{ | |
"files": ["*.ts", "*.tsx"], | |
"extends": [ | |
"airbnb", | |
"airbnb/hooks", | |
"airbnb-typescript", | |
"next", | |
"next/core-web-vitals", | |
"prettier" | |
], | |
"parserOptions": { | |
"project": "./tsconfig.json" | |
}, | |
"rules": { | |
"react/function-component-definition": [ | |
2, | |
{ | |
"namedComponents": "arrow-function" | |
} | |
], | |
"react/jsx-props-no-spreading": "off" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment