Last active
August 18, 2019 04:38
-
-
Save stivncastillo/1beb3391ee841c6d711d2840a2110c47 to your computer and use it in GitHub Desktop.
Eslint file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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 }] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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