Skip to content

Instantly share code, notes, and snippets.

@stivncastillo
Last active August 18, 2019 04:38
Show Gist options
  • Save stivncastillo/1beb3391ee841c6d711d2840a2110c47 to your computer and use it in GitHub Desktop.
Save stivncastillo/1beb3391ee841c6d711d2840a2110c47 to your computer and use it in GitHub Desktop.
Eslint file
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"airbnb"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
"react/jsx-filename-extension": ["warn", { "extensions": [".js", ".jsx"] }],
"import/no-named-as-default": "off",
"import/no-named-as-default-member": "off",
"indent": ["error", 2, {
"SwitchCase": 1,
"MemberExpression": 1,
"FunctionExpression": {"body": 1, "parameters": 2},
"ObjectExpression": 1,
"ImportDeclaration": 1
}],
"no-constant-condition": ["error"],
"block-scoped-var": "warn",
"default-case": "error",
"eqeqeq": ["error", "always"],
"no-alert": "error",
"max-len": ["error", { "code": 120 }]
}
}
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"**/*.js": [
"eslint --fix",
"prettier-eslint --write",
"git add"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment