Skip to content

Instantly share code, notes, and snippets.

@arthur-mts
Created June 23, 2020 14:43
Show Gist options
  • Save arthur-mts/60f5e02a0f4e67e146e4e8ef59493f62 to your computer and use it in GitHub Desktop.
Save arthur-mts/60f5e02a0f4e67e146e4e8ef59493f62 to your computer and use it in GitHub Desktop.
.eslintec.json to react typescript
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"plugin:react/recommended",
"airbnb",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"react",
"react-hooks",
"@typescript-eslint",
"prettier"
],
"rules": {
"react/jsx-one-expression-per-line": "off",
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
"prettier/prettier": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/jsx-filename-extension": [1, {"extensions": [".tsx"]}],
"import/prefer-default-export": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never"
}
]
},
"settings":{
"import/resolver":{
"typescript": {}
}
}
}
// install eslint-import-resolver-typescript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment