Skip to content

Instantly share code, notes, and snippets.

@morcegon
Created July 20, 2020 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morcegon/f64cbd64df87b2774200a14a1384767b to your computer and use it in GitHub Desktop.
Save morcegon/f64cbd64df87b2774200a14a1384767b to your computer and use it in GitHub Desktop.
Bootstrap eslint
{
"env": {
"browser": true,
"es6": true
},
"plugins": [
"react",
"react-hooks",
"@typescript-eslint",
"prettier",
"eslint-plugin-import-helpers",
"jest"
],
"extends": [
"plugin:react/recommended",
"airbnb",
"eslint:recommended",
"airbnb/hooks",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
"plugin:jest/recommended",
"plugin:testing-library/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"react/prop-types": "off",
"no-shadow": "off",
"react/jsx-props-no-spreading": "off",
"prettier/prettier": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/no-unescaped-entities": "off",
"react/jsx-filename-extension": [1, {
"extensions": [".tsx"]
}],
"import/prefer-default-export": "off",
"react/jsx-one-expression-per-line": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-function-return-type": [
"off",
{
"allowExpressions": true
}
],
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never"
}
],
"import-helpers/order-imports": [
"warn", {
"newlinesBetween": "always",
"groups": [
"/react/",
"/^react-/",
"module",
"/^types/",
"/^components/",
"/^services/",
"/^layouts/",
"/^styled/",
"/^styles/",
"/^pages/",
"/^routes/",
"/^store/",
["parent", "sibling", "index"]
],
"alphabetize": {
"order": "asc",
"ignoreCase": true
}
}
]
},
"settings": {
"import/resolver": {
"typescript": {},
"node": {
"extensions": [
".js", ".jsx", ".ts", ".tsx"
],
"moduleDirectory": [
"node_modules", "./src/"
]
}
}
}
}
module.exports = {
singleQuote: true,
trailingComma: "all",
allowParens: "avoid",
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment