Skip to content

Commit

Permalink
Add autoformat checking for JS code
Browse files Browse the repository at this point in the history
  • Loading branch information
arnavb committed Feb 24, 2019
1 parent b90825c commit f202540
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,21 @@ matrix:
env:
- MATRIX_EVAL="CXX=g++-7"

# Autoformat Python code
# Check formatting of Python code
- os: linux
language: python
python: 3.6
script:
- pip install black
- ./scripts/python_code_style_checker.sh

# Check formatting of Javascript code
- os: linux
language: node_js
node_js: node
script:
- npm install -g prettier
- ./scripts/javascript_code_style_checker.sh

before_install:
- eval "${MATRIX_EVAL}"
3 changes: 3 additions & 0 deletions scripts/javascript_code_style_checker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

find code/ -type f -name "*.js" | xargs prettier --check

0 comments on commit f202540

Please sign in to comment.