1
Fork 0

Link SCSS and JS

This commit is contained in:
Jake Howard 2018-07-27 21:48:42 +01:00
parent 1bb710cd29
commit 611fbef45e
Signed by: jake
GPG Key ID: 57AFB45680EDD477
4 changed files with 83 additions and 0 deletions

10
.eslintrc Normal file
View File

@ -0,0 +1,10 @@
{
"extends": [
"dabapps/commonjs",
"dabapps/browser"
],
"globals": {
"mermaid": true
}
}

65
.sass-lint.yml Normal file
View File

@ -0,0 +1,65 @@
files:
include: 'static/src/scss/**/*.scss'
rules:
clean-import-paths: 0
extends-before-mixins: 2
extends-before-declarations: 2
force-attribute-nesting: 0
no-css-comments: 0
no-debug: 1
no-duplicate-properties:
- 2
-
exclude:
- src
- transform
no-ids: 0
no-important: 0
no-transition-all: 0
no-vendor-prefixes: 2
no-qualifying-elements: 0
no-url-protocols: 0
no-warn: 1
hex-notation:
- 2
-
style: uppercase
indentation:
- 2
-
size: 2
variable-name-format:
- 2
-
allow-leading-underscore: false
convention: hyphenatedlowercase
quotes:
- 2
-
style: double
property-sort-order:
- 2
-
order: 'concentric'
empty-line-between-blocks: 2
space-after-bang: 2
space-after-colon: 2
space-after-comma: 2
space-before-bang: 2
space-before-brace: 2
space-before-colon: 2
space-between-parens: 2
trailing-semicolon: 2
leading-zero: 0
single-line-per-selector: 0
force-pseudo-nesting: 0
force-element-nesting: 0
placeholder-in-extend: 0
no-url-domains: 0
no-color-literals: 2
class-name-format: 2
nesting-depth:
- 2
-
max-depth: 5

View File

@ -29,6 +29,8 @@ COPY project/ /app/project/
COPY static/ /app/static/
COPY scripts/ /app/scripts/
COPY templates/ /app/templates/
COPY .sass-lint.yml /app/.sass-lint.yml
COPY .eslintrc /app/.eslintrc
RUN BASE_URL= ./scripts/build-static.sh

View File

@ -12,3 +12,9 @@ flake8 project --ignore=E128,E501 --exclude=migrations,wsgi.py
echo ">> Running backend unit tests..."
coverage run --source=project --omit='*/wsgi.py,*/settings.py,*/migrations/*.py,*__init__.py' manage.py test $@
coverage report
echo ">> Linting SCSS..."
sass-lint -vqc .sass-lint.yml
echo ">> Linting JS..."
eslint $STATIC_SRC/js