Skip to content

Commit

Permalink
chore(init): bootstrap project with npm and quality tools
Browse files Browse the repository at this point in the history
- setup vscode .devcontainer
- init with npm
- add dev dependencies: typescript, eslint, prettier,
commitlint
  • Loading branch information
yassinedoghri committed Apr 23, 2022
0 parents commit 2c58974
Show file tree
Hide file tree
Showing 13 changed files with 9,637 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ARG VARIANT="16-bullseye"
FROM node:${VARIANT}

RUN npm install -g npm@latest
40 changes: 40 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "astro-i18next",
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "16-bullseye"
}
},

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.defaultProfile.linux": "bash",
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"astro-build.astro-vscode",
"DavidAnson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"eamodio.gitlens",
"esbenp.prettier-vscode",
"pflannery.vscode-versionlens",
"streetsidesoftware.code-spell-checker",
"wayou.vscode-todo-highlight",
"yzhang.markdown-all-in-one"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm install",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"features": {
"git": "latest"
}
}
19 changes: 19 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"standard"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
}
}
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# build output
dist

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# macOS-specific files
.DS_Store

# cache
.eslintcache
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --verbose --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
11 changes: 11 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"trailingComma": "es5",
"overrides": [
{
"files": "*.md",
"options": {
"proseWrap": "always"
}
}
]
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# astro-i18next

Astro components for i18next.
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] }
Loading

0 comments on commit 2c58974

Please sign in to comment.