Added js linter config.
This commit is contained in:
parent
76a5987a23
commit
abe356a802
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
version: '2'
|
||||||
|
|
||||||
|
services:
|
||||||
|
xo-js-lint:
|
||||||
|
build: linting/js
|
||||||
|
image: patek-devs/eslint-xo
|
||||||
|
command: . --space=4 --env=browser --extend=/eslintrc.yml
|
||||||
|
volumes:
|
||||||
|
- ./themes/patek/assets/js:/src:ro
|
||||||
|
- ./linting/js/eslintrc.yml:/eslintrc.yml
|
||||||
|
xo-html-lint:
|
||||||
|
build: linting/js
|
||||||
20
linting/js/Dockerfile
Normal file
20
linting/js/Dockerfile
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
FROM node:12-alpine
|
||||||
|
|
||||||
|
RUN mkdir /src
|
||||||
|
|
||||||
|
# Hack to upgrade NPM:
|
||||||
|
# - install local version
|
||||||
|
# - replace old global verson with new one
|
||||||
|
|
||||||
|
RUN npm install npm@5.3 && \
|
||||||
|
rm -rf /usr/local/lib/node_modules/npm && \
|
||||||
|
mv /node_modules/npm /usr/local/lib/node_modules
|
||||||
|
|
||||||
|
RUN npm install -g xo@0.24.0
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
RUN rm -fr /root/.npm /node_modules
|
||||||
|
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/local/bin/xo"]
|
||||||
5
linting/js/eslintrc.yml
Normal file
5
linting/js/eslintrc.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
rules:
|
||||||
|
quotes:
|
||||||
|
- error
|
||||||
|
- double
|
||||||
|
unicorn/prefer-query-selector: off
|
||||||
Loading…
Reference in New Issue
Block a user