Skip to content

Instantly share code, notes, and snippets.

@rtorcato
Last active March 5, 2020 16:57
Show Gist options
  • Select an option

  • Save rtorcato/afc06aa8978fbef4a7de61bbf0fe109c to your computer and use it in GitHub Desktop.

Select an option

Save rtorcato/afc06aa8978fbef4a7de61bbf0fe109c to your computer and use it in GitHub Desktop.
eslintrc.json for React projects that use airbnb rules with eslint , prettier and typescript
{
"env": {
"browser": true,
"es6": true,
"jest": true,
"node": true
},
"extends": [
"airbnb",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript",
"plugin:jest/recommended",
"plugin:react/recommended",
"plugin:prettier/recommended",
"prettier",
"prettier/@typescript-eslint",
"prettier/react"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"jsx": true,
"sourceType": "module",
"useJSXTextNode": true
},
"plugins": ["@typescript-eslint", "import", "jest", "react", "prettier"],
"rules": {
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true,
"allowTypedFunctionExpressions": true
}
],
"@typescript-eslint/explicit-member-accessibility": "off",
"import/no-extraneous-dependencies": 0,
"react/jsx-filename-extension": ["error", { extensions: [".jsx", ".tsx"] }],
"react/prop-types": [0]
},
"settings": {
"react": {
"version": "detect"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment