lint js and scss

This commit is contained in:
Jake Howard 2017-04-05 15:37:08 +01:00
parent 490263f7cd
commit 87e01c171f
4 changed files with 14 additions and 2 deletions

1
.gitignore vendored
View file

@ -92,3 +92,4 @@ md_pdf/assets/templates/cover.html
md_pdf/assets/static/style.css
md_pdf/assets/csl/
md_pdf/assets/styles-master/
node_modules/

View file

@ -1,11 +1,14 @@
machine:
python:
version: 3.6.0
node:
version: 6.10.2
dependencies:
post:
- pip install -r dev-requirements.txt
- npm install
test:
@ -13,3 +16,4 @@ test:
- flake8 md_pdf/ --ignore=E128,E501
- safety check
- bandit -r md_pdf/
- npm test

View file

@ -1,3 +1,5 @@
'use strict';
function subst() {
var vars = {};
var query_strings_from_url = document.location.search.substring(1).split('&');
@ -18,3 +20,5 @@ function subst() {
}
}
}
window.subst = subst();

View file

@ -4,7 +4,9 @@
"private": true,
"description": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "npm run lint-scss && npm run lint-js",
"lint-scss": "sass-lint -vq md_pdf/assets/static/**/*.scss",
"lint-js": "eslint -c eslint-config-dabapps/base/.eslintrc md_pdf/assets/static/**/*.js"
},
"repository": {
"type": "git",
@ -16,6 +18,7 @@
},
"homepage": "https://github.com/RealOrangeOne/md-pdf#readme",
"devDependencies": {
"eslint-config": "dabapps/eslint-config.git#2.0.4"
"eslint-config": "dabapps/eslint-config.git#2.0.4",
"sass-lint": "1.10.2"
}
}