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/static/style.css
md_pdf/assets/csl/ md_pdf/assets/csl/
md_pdf/assets/styles-master/ md_pdf/assets/styles-master/
node_modules/

View File

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

View File

@ -1,3 +1,5 @@
'use strict';
function subst() { function subst() {
var vars = {}; var vars = {};
var query_strings_from_url = document.location.search.substring(1).split('&'); 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, "private": true,
"description": "", "description": "",
"scripts": { "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": { "repository": {
"type": "git", "type": "git",
@ -16,6 +18,7 @@
}, },
"homepage": "https://github.com/RealOrangeOne/md-pdf#readme", "homepage": "https://github.com/RealOrangeOne/md-pdf#readme",
"devDependencies": { "devDependencies": {
"eslint-config": "dabapps/eslint-config.git#2.0.4" "eslint-config": "dabapps/eslint-config.git#2.0.4",
"sass-lint": "1.10.2"
} }
} }