Skip to content

Commit

Permalink
chore: apply eslint to wordcloud2
Browse files Browse the repository at this point in the history
  • Loading branch information
KatherineWinter committed May 10, 2020
1 parent 10f1f0b commit 8bc8447
Show file tree
Hide file tree
Showing 5 changed files with 1,558 additions and 555 deletions.
29 changes: 29 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* Using StandardJS for the ES6 environment. All rules are documented at:
* https://standardjs.com/
*
* Extending configuration from eslint-config-standard:
* https://github.com/standard/eslint-config-standard/blob/master/eslintrc.json
*
* We extend the standard configuration with our own globals, parser,
* and environment for shared needs of all repos.
*
* Do NOT add/modify any rules. We are adhering strictly to rules set by the
* StandardJS community. If any exceptions are truly needed, they can be
* made by consuming repos with their own respective eslintrc config files.
*/

module.exports = {
env: {
es6: true,
browser: true
},
rules: {
// Workaround for optional chaining, remove once https://github.com/eslint/eslint/issues/12822 is fixed
'no-unused-expressions': 'off'
},
ignorePatterns: [
'./.eslintrc.js',
'**/*/node_modules/'
]
}
46 changes: 46 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# EXAMPLE USAGE
# Refer for explanation to following link:
# https://github.com/Arkweid/lefthook/blob/master/docs/full_guide.md
#
# pre-push:
# commands:
# packages-audit:
# tags: frontend security
# run: yarn audit
# gems-audit:
# tags: backend security
# run: bundle audit
#
# pre-commit:
# parallel: true
# commands:
# eslint:
# glob: "*.{js,ts}"
# run: yarn eslint {staged_files}
# rubocop:
# tags: backend style
# glob: "*.rb"
# exclude: "application.rb|routes.rb"
# run: bundle exec rubocop --force-exclusion {all_files}
# govet:
# tags: backend style
# files: git ls-files -m
# glob: "*.go"
# run: go vet {files}
# scripts:
# "hello.js":
# runner: node
# "any.go":
# runner: go run

pre-commit:
parallel: true
commands:
eslint:
glob: "*.{js,ts}"
run: npm run lint {staged_files}

post-merge:
commands:
yarn-install:
run: yarn --frozen-lockfile
Loading

0 comments on commit 8bc8447

Please sign in to comment.