Skip to content

Commit

Permalink
Add eslint config, configure husky with lint-staged on precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszpmroz committed Apr 1, 2020
1 parent aac522b commit f23696f
Show file tree
Hide file tree
Showing 3 changed files with 1,343 additions and 218 deletions.
75 changes: 59 additions & 16 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,21 +1,64 @@
{
"parser": "babel-eslint",
"env": {
"jest": true,
"react-native/react-native": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript",
"prettier",
"prettier/react"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "2019",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": [
"react", "prettier"
"@typescript-eslint",
"react",
"react-native",
"react-hooks",
"import",
"prettier"
],
"extends": ["standard", "standard-react", "prettier"],
"rules": {
'prettier/prettier': [
'warn',
{
singleQuote: true,
printWidth: 140,
trailingComma: 'all'
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
]
},
"env":{
"es6": true
}
},
"globals": { "fetch": false }
}
"rules": {
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/member-delimiter-style": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"no-case-declarations": "off",
"no-prototype-builtins": "off",
"no-empty": ["error", { "allowEmptyCatch": true }],
"require-atomic-updates": "off",
"prettier/prettier": "error",
"react/display-name": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react-native/no-color-literals": "error",
"react-native/no-raw-text": "error",
"react-native/no-single-element-style-arrays": "warn",
"react-native/no-unused-styles": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
}
}

0 comments on commit f23696f

Please sign in to comment.