Skip to content

Instantly share code, notes, and snippets.

@mattbanks mattbanks/.eslintrc
Created Mar 12, 2018

Embed
What would you like to do?
base eslintrc
{
"extends": [
"airbnb-base",
"prettier"
],
"parserOptions": {
"ecmaVersion": 8,
"ecmaFeatures": {
"classes": true
}
},
"env": {
"jest": true,
"node": true
},
"rules": {
"arrow-body-style": [
"error",
"as-needed"
],
"comma-dangle": "off",
"import/extensions": [
"error",
{
"js": "never",
"json": "never"
}
],
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "warn",
"jest/prefer-to-be-null": "warn",
"jest/prefer-to-be-undefined": "warn",
"jest/valid-expect": "error",
"max-len": "off",
"max-nested-callbacks": [
"warn",
5
],
"max-params": [
"warn",
{
"max": 4
}
],
"no-console": "off",
"no-param-reassign": [
"error",
{
"props": false
}
],
"no-plusplus": [
"error",
{
"allowForLoopAfterthoughts": true
}
],
"no-shadow": [
"error",
{
"hoist": "all",
"allow": [
"resolve",
"reject",
"done",
"next",
"err",
"error"
]
}
],
"no-unused-vars": "error",
"no-warning-comments": [
"warn",
{
"terms": [
"todo",
"fixme",
"hack"
],
"location": "anywhere"
}
],
"prettier/prettier": [
"error",
{
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 120
}
],
"quotes": [
"error",
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"require-jsdoc": [
"error",
{
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true,
"ArrowFunctionExpression": true,
"FunctionExpression": true
}
}
],
"space-before-function-paren": "off",
"valid-jsdoc": [
"error",
{
"requireReturn": false,
"requireParamDescription": true,
"requireReturnDescription": true
}
]
},
"plugins": [
"jest",
"prettier"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.