Skip to content

Instantly share code, notes, and snippets.

@lucasraziel
Created May 5, 2020 10:56
Show Gist options
  • Save lucasraziel/ea7455f5ea1a1ddc0851762bed1f127b to your computer and use it in GitHub Desktop.
Save lucasraziel/ea7455f5ea1a1ddc0851762bed1f127b to your computer and use it in GitHub Desktop.
React Code Style Configuration
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
/*.js
node_modules
build
{
"env": {
"es6": true
"browser": true //remove on mobile
},
"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": {
"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",
"react/jsx-props-no-spreading": "off",
"react/prop-types": "off",
"@typescript-eslint/camelcase": "off",
"react/jsx-one-expression-per-line": "off",
"@typescript-eslint/explicit-function-return-type":[
"error",
{
"allowExpressions": true
}
],
"jsx-a11y/anchor-is-valid":"off",
"react/no-unescaped-entities": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never"
}
]
},
"settings": {"import/resolver": {
"typescript": {}
}}
}
module.exports = {
singleQuote: true,
traillingComma: 'all',
arrowParen: 'avoid',
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment