Skip to content

Instantly share code, notes, and snippets.

@gabrielsaints
Created March 11, 2020 15:44
Show Gist options
  • Save gabrielsaints/3665a719c8c62cb71a1066547e4091a8 to your computer and use it in GitHub Desktop.
Save gabrielsaints/3665a719c8c62cb71a1066547e4091a8 to your computer and use it in GitHub Desktop.
eslint for react - typescript
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "react", "prettier", "babel"],
"extends": [
"airbnb/hooks",
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"jest": true
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_" }
],
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"@typescript-eslint/interface-name-prefix": [
"error",
{ "prefixWithI": "always" }
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment