Skip to content

Instantly share code, notes, and snippets.

@philcms1
Last active January 3, 2018 16:34
Show Gist options
  • Save philcms1/25632a23d0c7c80c24d214bab3801169 to your computer and use it in GitHub Desktop.
Save philcms1/25632a23d0c7c80c24d214bab3801169 to your computer and use it in GitHub Desktop.
ESLint configuration with Airbnb JavaScript Style Guide
{
"extends": "airbnb",
"parser": "babel-eslint",
"env": {
"node": true,
"es6": true,
"mocha": true
},
"rules": {
// indentation
"indent": [ 2, 4 ],
// spacing
// "space-in-parens": [ 2, "always" ],
"template-curly-spacing": [ 2, "always" ],
"array-bracket-spacing": [ 2, "always" ],
"object-curly-spacing": [ 2, "always" ],
// "computed-property-spacing": [ 2, "always" ],
"no-multiple-empty-lines": [ 2, { "max": 1, "maxEOF": 0, "maxBOF": 0 } ],
"no-trailing-spaces": 0,
"import/no-extraneous-dependencies": 0,
"comma-dangle": [2, "never"],
"no-console": 0,
"valid-jsdoc": ["error", {
"requireReturn": true,
"requireReturnType": true,
"requireParamDescription": true,
"requireReturnDescription": true
}],
"require-jsdoc": ["error", {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true
}
}]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment