mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 19:03:30 -05:00
Add linting for SASS and Javascript
Similar to how PEP8 enforces Python style, there are tools for front end code: - jshint[1] for Javascript - sass-lint[2] for SASS This commit adds the Gulp plugins for both, and sets up some sensible rules (which can be iterated on). It also adds a command to `./scripts/run_tests.sh`, so that any errors in the front end code will fail the build before it has a chance to be deployed. 1. http://jshint.com/ 2. https://www.npmjs.com/package/sass-lint
This commit is contained in:
@@ -25,9 +25,12 @@ function display_result {
|
||||
pep8 .
|
||||
display_result $? 1 "Code style check"
|
||||
|
||||
npm test
|
||||
display_result $? 2 "Front end code style check"
|
||||
|
||||
## Code coverage
|
||||
#py.test --cov=app tests/
|
||||
#display_result $? 2 "Code coverage"
|
||||
#display_result $? 3 "Code coverage"
|
||||
|
||||
py.test -v
|
||||
display_result $? 3 "Unit tests"
|
||||
display_result $? 4 "Unit tests"
|
||||
|
||||
Reference in New Issue
Block a user