Skip to content

Instantly share code, notes, and snippets.

@adamreisnz
Last active December 1, 2017 07:15
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamreisnz/1fa24bcfc5d17b8d26e4c39ffca7560e to your computer and use it in GitHub Desktop.
Save adamreisnz/1fa24bcfc5d17b8d26e4c39ffca7560e to your computer and use it in GitHub Desktop.
ESLint configuration
root: true
extends: eslint:recommended
parserOptions:
ecmaVersion: 2017
ecmaFeatures:
impliedStrict: true
sourceType: module
env:
es6: true
browser: true
node: true
mocha: true
jasmine: true
globals:
angular: false
Raven: false
rules:
linebreak-style:
- error
- unix
max-len:
- warn
- code: 80
tabWidth: 2
ignoreComments: true
ignoreUrls: true
ignoreTemplateLiterals: true
ignoreRegExpLiterals: true
indent:
- error
- 2
- SwitchCase: 1
VariableDeclarator:
let: 2
const: 3
MemberExpression: off
semi:
- error
- always
consistent-this:
- error
- self
- $ctrl
quotes:
- error
- single
- allowTemplateLiterals: true
quote-props:
- error
- as-needed
curly:
- error
- all
comma-dangle:
- error
- always-multiline
new-cap:
- error
- newIsCap: true
capIsNew: true
properties: false
camelcase:
- error
- properties: never
array-bracket-spacing:
- error
- never
arrow-spacing:
- error
- before: true
after: true
block-spacing:
- error
- always
comma-spacing:
- error
- before: false
after: true
computed-property-spacing:
- error
- never
generator-star-spacing:
- error
- before: true
after: false
key-spacing:
- error
- beforeColon: false
afterColon: true
mode: minimum
keyword-spacing:
- error
- before: true
semi-spacing:
- error
- before: false
after: true
space-in-parens:
- error
- never
space-unary-ops:
- error
- words: true
nonwords: false
space-before-function-paren:
- error
- never
space-before-blocks:
- error
- always
yoda:
- error
- never
wrap-iife:
- error
- outside
eqeqeq:
- error
- always
newline-per-chained-call:
- error
- ignoreChainWithDepth: 3
one-var-declaration-per-line:
- error
- initializations
brace-style:
- error
- stroustrup
no-implicit-coercion:
- error
- boolean: false
no-multiple-empty-lines:
- error
- max: 1
no-unused-vars:
- error
- vars: all
args: all
eol-last: error
dot-notation: error
space-infix-ops: error
no-with: error
no-unreachable: error
no-redeclare: error
no-unexpected-multiline: error
no-multi-spaces: error
no-multi-str: error
no-trailing-spaces: error
no-mixed-spaces-and-tabs: error
no-spaced-func: error
no-whitespace-before-property: error
no-lonely-if: error
no-var: error
no-console: warn
root: true
extends: eslint:recommended
parserOptions:
ecmaVersion: 2017
ecmaFeatures:
impliedStrict: true
sourceType: module
env:
es6: true
node: true
mocha: true
jasmine: true
rules:
linebreak-style:
- error
- unix
max-len:
- warn
- code: 80
tabWidth: 2
ignoreComments: true
ignoreUrls: true
ignoreTemplateLiterals: true
ignoreRegExpLiterals: true
indent:
- error
- 2
- SwitchCase: 1
VariableDeclarator:
let: 2
const: 3
MemberExpression: off
semi:
- error
- always
consistent-this:
- error
- self
- $ctrl
quotes:
- error
- single
- allowTemplateLiterals: true
quote-props:
- error
- as-needed
curly:
- error
- all
comma-dangle:
- error
- always-multiline
new-cap:
- error
- newIsCap: true
capIsNew: true
properties: false
camelcase:
- error
- properties: never
array-bracket-spacing:
- error
- never
arrow-spacing:
- error
- before: true
after: true
block-spacing:
- error
- always
comma-spacing:
- error
- before: false
after: true
computed-property-spacing:
- error
- never
generator-star-spacing:
- error
- before: true
after: false
key-spacing:
- error
- beforeColon: false
afterColon: true
mode: minimum
keyword-spacing:
- error
- before: true
semi-spacing:
- error
- before: false
after: true
space-in-parens:
- error
- never
space-unary-ops:
- error
- words: true
nonwords: false
space-before-function-paren:
- error
- never
space-before-blocks:
- error
- always
yoda:
- error
- never
wrap-iife:
- error
- outside
eqeqeq:
- error
- always
newline-per-chained-call:
- error
- ignoreChainWithDepth: 3
one-var-declaration-per-line:
- error
- initializations
brace-style:
- error
- stroustrup
no-implicit-coercion:
- error
- boolean: false
no-multiple-empty-lines:
- error
- max: 1
no-global-assign:
- error
- exceptions:
- Promise
eol-last: error
dot-notation: error
space-infix-ops: error
no-with: error
no-unreachable: error
no-redeclare: error
no-unexpected-multiline: error
no-multi-spaces: error
no-multi-str: error
no-trailing-spaces: error
no-mixed-spaces-and-tabs: error
no-spaced-func: error
no-whitespace-before-property: error
no-unsafe-negation: error
no-lonely-if: error
no-var: error
no-console: off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment