Skip to content

Commit

Permalink
chore(eslint): update eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
Teemu Taskula committed Oct 4, 2017
1 parent a53df2c commit 546c873
Showing 1 changed file with 7 additions and 30 deletions.
37 changes: 7 additions & 30 deletions src/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,41 +28,21 @@ rules:
no-underscore-dangle: 0
# Commas always at the end of line
comma-style: [2, "last"]
comma-dangle: ["error", {
"arrays": "only-multiline",
"objects": "only-multiline",
"imports": "only-multiline",
"exports": "only-multiline",
"functions": "ignore",
}]
# 80 char line length
max-len: [2, 80, 1]
# console is fine
no-console: 0

# Pointless, sorting by purpose > sorting alphabetically
# react/jsx-sort-props: 1
# react/jsx-sort-prop-types: 1

# Does not detect 'export default Component;' properly
# react/display-name: 1

# For highlighters, generally not needed
# react/jsx-no-literals: 1

# <div id='foo' className='bar'>
# vs.
# <div
# id='foo'
# className='bar'
# >
#
# react/jsx-max-props-per-line: 1

# object is specific enough, no need for shape({ key: value })
# react/forbid-prop-types: 1

# Local component state can be good sometimes
# react/no-set-state: 1

# returning JSON from arrow functions without a return statement breaks the
# parser, and having a single return statement is not allowed by this rule...
arrow-body-style: 0

# AuthenticatedView is a function, causes error
new-cap: 0

react/jsx-closing-bracket-location: 1
Expand All @@ -71,20 +51,17 @@ rules:
react/jsx-no-duplicate-props: 2
react/no-danger: 2
react/no-direct-mutation-state: 1
# import/extensions: 2
react/jsx-filename-extension:
- 1
- extensions:
- ".js"
- ".jsx"

no-useless-constructor: 0
quote-props: 0
generator-star-spacing: 0
babel/generator-star-spacing: 0
func-name-matching: 0
no-confusing-arrow: 0
react/forbid-prop-types: 0
react/no-unused-prop-types: 0

# import/no-unresolved: 0 # deps are only installed in the docker container

0 comments on commit 546c873

Please sign in to comment.