Skip to content

Commit

Permalink
add javascript linter
Browse files Browse the repository at this point in the history
  • Loading branch information
elbywan committed Aug 20, 2017
1 parent 7c0d2d8 commit c6ec241
Show file tree
Hide file tree
Showing 5 changed files with 1,321 additions and 30 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/build
/coverage
*.min.js
139 changes: 139 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
extends:
- eslint:recommended
rules:
no-console:
- warn
no-extra-parens:
- warn
- all
no-mixed-operators:
- off
array-bracket-spacing:
- warn
- always
- singleValue: false
objectsInArrays: false
arraysInArrays: false
block-spacing:
- warn
- always
brace-style:
- warn
- 1tbs
- allowSingleLine: true
camelcase:
- error
- properties: always
comma-dangle:
- error
- never
comma-spacing:
- error
comma-style:
- error
computed-property-spacing:
- error
consistent-this:
- error
no-trailing-spaces:
- error
no-multiple-empty-lines:
- error
func-call-spacing:
- error
indent:
- error
- 4
- SwitchCase: 1
jsx-quotes:
- error
- prefer-double
key-spacing:
- error
- mode: minimum
keyword-spacing:
- error
- overrides:
if:
after: false
for:
after: false
while:
after: false
catch:
after: false
linebreak-style:
- error
new-cap:
- warn
new-parens:
- error
newline-per-chained-call:
- error
- ignoreChainWithDepth: 3
no-lonely-if:
- error
no-mixed-spaces-and-tabs:
- warn
- smart-tabs
no-unneeded-ternary:
- error
no-whitespace-before-property:
- error
object-curly-spacing:
- warn
- always
- objectsInObjects: false
arraysInObjects: false
operator-linebreak:
- warn
- after
quote-props:
- error
- as-needed
- keywords: true
quotes:
- error
- double
- avoidEscape: true
no-unexpected-multiline:
- warn
semi:
- error
- never
space-before-blocks:
- error
space-before-function-paren:
- error
- never
space-in-parens:
- error
space-infix-ops:
- error
- int32Hint: false
spaced-comment:
- error
- always
space-unary-ops:
- error
- words: true
nonwords: false
unicode-bom:
- error
- never
arrow-body-style:
- error
- as-needed
arrow-parens:
- error
- as-needed
arrow-spacing:
- error
prefer-const:
- error
prefer-rest-params:
- warn
react/no-direct-mutation-state:
- off
react/react-in-jsx-scope:
- off
33 changes: 3 additions & 30 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,35 +1,8 @@
# Logs
node_modules
.git
.DS_Store
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

# Custom
#build
*.bak
bower_components
.jshintrc
# /demo
/documentation
Loading

0 comments on commit c6ec241

Please sign in to comment.