diff --git a/.github/weblint.yml b/.github/weblint.yml new file mode 100644 index 0000000..eea4ec9 --- /dev/null +++ b/.github/weblint.yml @@ -0,0 +1,28 @@ +# This workflow lints the code in /Website, if any was committed + +name: Website Lint + +on: + push: + branches: [ main ] + paths: + - Website/** + + pull_request: + branches: [ main ] + paths: + - Website/** + +jobs: + weblint: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@main + - name: npm install + run: npm install + working-directory: Website + - name: npm run lint + run: npm run lint + working-directory: Website \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1a0c019..a8cad72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,29 @@ -*.idea -*Backend *cert +*Backend .DS_Store -StaticSite/.editorconfig -StaticSite/package-lock.json +# Website node modules and build output +Website/package-lock.json +Website/.editorconfig Website/node_modules Website/.nuxt -Website/.editorconfig Website/dist/ Website/_nuxt + +# local env files +.env.local +.env.*.local + +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw* \ No newline at end of file diff --git a/Website/.eslintignore b/Website/.eslintignore new file mode 100644 index 0000000..6dfcb5b --- /dev/null +++ b/Website/.eslintignore @@ -0,0 +1,10 @@ +# js vendor file with import/require +assets/vendor/** +# static vendor file . use with nuxt.config.js script +static/** +# dependencies +node_modules +# Nuxt build +.nuxt +# Nuxt generate +dist diff --git a/Website/.eslintrc.js b/Website/.eslintrc.js new file mode 100644 index 0000000..e7109c8 --- /dev/null +++ b/Website/.eslintrc.js @@ -0,0 +1,24 @@ +module.exports = { + root: true, + env: { + node: true, + browser: true, + }, + parserOptions: { + parser: "babel-eslint", + }, + extends: [ + "prettier", + "eslint:recommended", + "plugin:vue/recommended", + "plugin:prettier/recommended", + ], + plugins: ["vue"], + rules: { + "vue/multi-word-component-names": 0, + "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", + "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", + // 'prettier/prettier': ['error', { semi: false }], + // semi: [2, 'never'], + }, +}; diff --git a/Website/README.md b/Website/README.md index 552c817..cc42b01 100644 --- a/Website/README.md +++ b/Website/README.md @@ -9,6 +9,9 @@ $ npm install # serve with hot reload at localhost:3000 $ npm run dev +# lint your changes +$ npm run lint + # build for production and launch server $ npm run build $ npm run start @@ -19,6 +22,20 @@ $ npm run generate For detailed explanation on how things work, check out the [documentation](https://nuxtjs.org). +## Recommended VSCode Setup + - [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) `ext install dbaeumer.vscode-eslint` + - [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) `ext install esbenp.prettier-vscode` + - [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur) + +>`Ctrl(Cmd)` + `Shift` + `P` > Open Settings (JSON) +``` +"editor.formatOnSave": true, +"editor.codeActionsOnSave": { + "source.fixAll.eslint": true +} +"vetur.validation.template": false, +``` + ## Special Directories You can create the following extra directories, some of which have special behaviors. Only `pages` is required; you can delete them if you don't want to use their functionality. diff --git a/Website/layouts/default.vue b/Website/layouts/default.vue index 7142c69..828216f 100644 --- a/Website/layouts/default.vue +++ b/Website/layouts/default.vue @@ -1,6 +1,5 @@ + + - - \ No newline at end of file diff --git a/Website/layouts/error.vue b/Website/layouts/error.vue index ae22f7c..d99a426 100644 --- a/Website/layouts/error.vue +++ b/Website/layouts/error.vue @@ -6,35 +6,33 @@

{{ otherError }}

- - Home page - + Home page - - diff --git a/Website/pages/install.vue b/Website/pages/install.vue index 6215111..ba84b06 100644 --- a/Website/pages/install.vue +++ b/Website/pages/install.vue @@ -1,79 +1,102 @@ diff --git a/Website/pages/links.vue b/Website/pages/links.vue index 16c1f34..35df9ed 100644 --- a/Website/pages/links.vue +++ b/Website/pages/links.vue @@ -1,61 +1,67 @@ - - + + diff --git a/Website/pages/pay/crypto.vue b/Website/pages/pay/crypto.vue index c944c11..b450588 100644 --- a/Website/pages/pay/crypto.vue +++ b/Website/pages/pay/crypto.vue @@ -1,27 +1,15 @@