Skip to content

Instantly share code, notes, and snippets.

@copperwalls
Last active July 20, 2017 07:50
Show Gist options
  • Save copperwalls/28620fdc850102134555afb7a015cc28 to your computer and use it in GitHub Desktop.
Save copperwalls/28620fdc850102134555afb7a015cc28 to your computer and use it in GitHub Desktop.
ESLint example configuration
env:
browser: true
es6: true
jest: true
jquery: true
node: true
worker: true
extends: 'eslint:recommended'
parserOptions:
sourceType: module
rules:
array-bracket-newline:
- error
- multiline: true
minItems: 2
array-bracket-spacing:
- error
- never
array-element-newline:
- error
- multiline: true
minItems: 3
block-spacing:
- error
brace-style:
- error
- 1tbs
- allowSingleLine: true
camelcase:
- error
capitalized-comments:
- error
comma-spacing:
- error
comma-style:
- error
- first
consistent-this:
- error
- that
curly:
- error
default-case:
- error
eol-last:
- error
eqeqeq:
- error
func-call-spacing:
- error
- never
func-name-matching:
- error
func-names:
- error
- as-needed
func-style:
- error
indent:
- error
- 2
linebreak-style:
- error
- unix
max-depth:
- error
max-len:
- error
- ignoreUrls: true
max-nested-callbacks:
- error
- 3
newline-per-chained-call:
- error
no-confusing-arrow:
- error
no-console:
- off
no-duplicate-imports:
- error
no-eq-null:
- error
no-eval:
- error
no-floating-decimal:
- error
no-mixed-operators:
- error
no-multi-assign:
- error
no-multi-spaces:
- error
no-multiple-empty-lines:
- error
no-negated-condition:
- error
no-nested-ternary:
- error
no-new:
- error
no-new-func:
- error
no-plusplus:
- error
- allowForLoopAfterthoughts: true
no-process-exit:
- error
no-self-compare:
- error
no-sync:
- error
no-tabs:
- error
no-trailing-spaces:
- error
no-undefined:
- error
no-unneeded-ternary:
- error
no-use-before-define:
- error
no-var:
- error
no-void:
- error
no-whitespace-before-property:
- error
no-with:
- error
object-property-newline:
- error
operator-linebreak:
- error
prefer-const:
- error
quotes:
- error
- double
radix:
- error
- always
require-await:
- error
require-jsdoc:
- error
semi:
- error
- always
semi-style:
- error
space-before-blocks:
- error
spaced-comment:
- error
strict:
- error
- global
switch-colon-spacing:
- error
template-tag-spacing:
- error
valid-jsdoc:
- error
yoda:
- error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment