Skip to content

Instantly share code, notes, and snippets.

@yuritoledo
Created April 3, 2019 23:41
Show Gist options
  • Save yuritoledo/2fd629faae9c876cbc7e3710fde2daf1 to your computer and use it in GitHub Desktop.
Save yuritoledo/2fd629faae9c876cbc7e3710fde2daf1 to your computer and use it in GitHub Desktop.
eslint with typescript for react native
{
"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