Skip to content

Commit

Permalink
add google eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
pipech committed Jun 8, 2019
1 parent ab1cbf3 commit 1aedbf2
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
5 changes: 4 additions & 1 deletion development_setup_vscode/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM pipech/erpnext-docker-debian:mas-py3-latest
COPY ./entrypoint.sh /home/frappe/bench/entrypoint.sh
COPY ./launch.json /home/frappe/bench/apps/.vscode/launch.json
COPY ./set_remote.sql /home/frappe/bench/init.sql
COPY ./eslint /home/frappe/bench/apps/

# prevent permission denied
RUN sudo chmod 777 /home/frappe/bench/entrypoint.sh \
Expand All @@ -23,7 +24,9 @@ RUN sudo chmod 777 /home/frappe/bench/entrypoint.sh \
&& bench set-config developer_mode 1 \
# set mysql remote user
&& sudo service mysql start \
&& mysql -h localhost "-uroot" "-ptravis" < "/home/frappe/bench/init.sql"
&& mysql -h localhost "-uroot" "-ptravis" < "/home/frappe/bench/init.sql" \
# install eslint, using Google JavaScript style guide
&& sudo npm install -g eslint eslint-config-google

# without this socket.io won't work (don't know why)
ENV DEV_SERVER=1
17 changes: 17 additions & 0 deletions development_setup_vscode/.devcontainer/eslint/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"env": {
"browser": true,
"es6": true
},
"extends": "google",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
}
}
11 changes: 11 additions & 0 deletions development_setup_vscode/.devcontainer/eslint/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "vscode_eslint",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}

0 comments on commit 1aedbf2

Please sign in to comment.