Last active
March 5, 2020 16:57
-
-
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
This file contains hidden or 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
| { | |
| "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