mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -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:
@@ -6,7 +6,7 @@
|
||||
"node": "5.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"test": "gulp lint",
|
||||
"postinstall": "./node_modules/bower/bin/bower install",
|
||||
"build": "gulp",
|
||||
"watch": "gulp watch"
|
||||
@@ -35,5 +35,11 @@
|
||||
"gulp-uglify": "1.5.1",
|
||||
"jquery": "1.11.2",
|
||||
"query-command-supported": "1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-jshint": "2.0.0",
|
||||
"gulp-sass-lint": "1.1.1",
|
||||
"jshint": "2.9.1",
|
||||
"jshint-stylish": "2.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user