diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 72b2dd4..f5bb970 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,45 +1,39 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node { - "name": "Node.js & TypeScript", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/base:jammy", + "name": "Debian Bullseye Node.js DevContainer", + "image": "mcr.microsoft.com/vscode/devcontainers/base:bullseye", + "features": { + "ghcr.io/devcontainers/features/node:1": { + "version": "6.9.1" + }, + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {} + }, // mount the ssh public identity file for the this project // I limit to just what I need and not the whole ~/.ssh folder "mounts": [ "source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh/personal_id_rsa.pub,target=/home/vscode/.hostssh/id_rsa.pub,readonly,type=bind,consistency=cached" ], - // Features to add to the dev container. More info: https://containers.dev/features. - "features": { - "ghcr.io/devcontainers-contrib/features/node-asdf": {}, - "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {} - }, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], "customizations": { "vscode": { "extensions": [ + "bierner.markdown-mermaid", + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "GitHub.copilot-chat", + "GitHub.copilot", + "mohsen1.prettify-json", "mechatroner.rainbow-csv", "ms-vscode-remote.remote-containers", - "dbaeumer.vscode-eslint", - "GitHub.copilot", - "GitHub.copilot-chat", - "esbenp.prettier-vscode", - "rvest.vs-code-prettier-eslint", - "bierner.markdown-mermaid", - "stylelint.vscode-stylelint", - "vivaxy.vscode-conventional-commits", "oderwat.indent-rainbow", - "mohsen1.prettify-json" + "rvest.vs-code-prettier-eslint", + "stylelint.vscode-stylelint", + "vivaxy.vscode-conventional-commits" ] + }, + "settings": { + "terminal.integrated.defaultProfile.linux": "bash" } }, - - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "/bin/bash ./.devcontainer/scripts/tools.sh >> ~/post-create-tools.log" - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" + "postCreateCommand": "/bin/bash ./.devcontainer/scripts/tools.sh >> ~/post-create-tools.log", + "remoteUser": "vscode" } diff --git a/.devcontainer/scripts/tools.sh b/.devcontainer/scripts/tools.sh index 26e1900..67381ef 100644 --- a/.devcontainer/scripts/tools.sh +++ b/.devcontainer/scripts/tools.sh @@ -9,11 +9,9 @@ Host github.com IdentityFile ~/.hostssh/id_rsa.pub EOF -sudo chown -R vscode:vscode ~/.ssh - -# Install Node.js 6.9.1 -asdf install nodejs 6.9.1 -asdf global nodejs 6.9.1 +sudo chown -R vscode:vscode ~/.ssh && \ + sudo chmod 600 ~/.ssh/config && \ + sudo chmod 600 ~/.ssh/known_hosts git config --global --add safe.directory ${PWD} @@ -40,4 +38,6 @@ echo "$user_email $signing_key" > ~/.ssh/allowed_signers # Set the correct permissions for the allowed_signers file chmod 644 ~/.ssh/allowed_signers -echo "allowed_signers file created successfully." \ No newline at end of file +echo "allowed_signers file created successfully." + +npm install diff --git a/.eslintrc.yaml b/.eslintrc.yaml index bad845d..51e926e 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -1,5 +1,5 @@ extends: - - airbnb + - airbnb-base - prettier - plugin:node/recommended diff --git a/package.json b/package.json index e4dfd62..31b74df 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ }, "scripts": { "start": "node index.js", - "watch": "node_modules/.bin/nodemon index.js", - "standard": "standard --verbose --fix | snazzy" + "lint": "eslint src test", + "watch": "node_modules/.bin/nodemon index.js" }, "standard": { "ignore": [ @@ -58,17 +58,15 @@ ] }, "devDependencies": { - "airbnb": "0.0.2", - "colors": "~1.3.2", - "eslint": "^9.9.0", - "eslint-config-airbnb": "^19.0.4", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-prettier": "^5.2.1", + "eslint": "^5.16.0", + "eslint-config-airbnb-base": "^13.2.0", + "eslint-config-prettier": "^4.3.0", + "eslint-plugin-import": "^2.18.2", + "eslint-plugin-node": "^8.0.0", + "eslint-plugin-prettier": "^2.7.0", "nodemon": "^1.12.1", - "prettier": "^3.3.3", - "prettier-eslint": "^16.3.0", - "snazzy": "^8.0.0", - "standard": "^12.0.1" + "prettier": "^1.19.1", + "prettier-eslint": "^8.8.2", + "standard-version": "^4.4.0" } }