Created
April 3, 2019 23:41
-
-
Save yuritoledo/2fd629faae9c876cbc7e3710fde2daf1 to your computer and use it in GitHub Desktop.
eslint with typescript for react native
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": { | |
"es6": true, | |
"node": true | |
}, | |
"extends": [ | |
"eslint:recommended", | |
"plugin:@typescript-eslint/recommended", | |
"plugin:react/recommended" | |
], | |
"globals": { | |
"Atomics": "readonly", | |
"SharedArrayBuffer": "readonly" | |
}, | |
"parser": "@typescript-eslint/parser", | |
"parserOptions": { | |
"ecmaFeatures": { | |
"jsx": true | |
}, | |
"ecmaVersion": 2018, | |
"sourceType": "module" | |
}, | |
"plugins": [ | |
"react", | |
"react-app", | |
"@typescript-eslint", | |
"react-hooks" | |
], | |
"rules": { | |
"linebreak-style": [ | |
"warn", | |
"unix" | |
], | |
"quotes": [ | |
"warn", | |
"single" | |
], | |
"semi": [ | |
"warn", | |
"never" | |
], | |
"@typescript-eslint/indent": [ | |
"warn", | |
2 | |
], | |
"@typescript-eslint/explicit-function-return-type": "off", | |
"@typescript-eslint/explicit-member-accessibility": "off", | |
"@typescript-eslint/no-use-before-define": "off", | |
"@typescript-eslint/no-empty-interface": "off", | |
"react-hooks/rules-of-hooks": "error", | |
"react-hooks/exhaustive-deps": "warn", | |
"jsx-quotes": [ | |
"warn", | |
"prefer-single" | |
], | |
"react/self-closing-comp": [ | |
"warn", | |
{ | |
"component": true | |
} | |
], | |
"react/jsx-closing-bracket-location": [ | |
1, | |
"tag-aligned" | |
], | |
"react/jsx-max-props-per-line": [ | |
1, | |
{ | |
"when": "multiline" | |
} | |
], | |
"react/jsx-first-prop-new-line": [ | |
1, | |
"multiline" | |
], | |
"react/jsx-tag-spacing": [ | |
1, | |
{ | |
"closingSlash": "never", | |
"beforeSelfClosing": "always", | |
"afterOpening": "never", | |
"beforeClosing": "never" | |
} | |
], | |
"react/prop-types": "off", | |
"react/prefer-stateless-function": [ | |
1 | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment