From a4b2408fe1de2c35a932660b17459335e8f53e97 Mon Sep 17 00:00:00 2001 From: klemek Date: Mon, 3 Mar 2025 14:59:49 +0100 Subject: [PATCH] eslint --- .github/workflows/lint.yml | 13 + .gitignore | 3 +- README.md | 4 + eslint.config.mjs | 31 + index.html | 68 +- main.js | 170 +-- package-lock.json | 2052 ++++++++++++++++++++++++++++++++++++ package.json | 26 + 8 files changed, 2249 insertions(+), 118 deletions(-) create mode 100644 .github/workflows/lint.yml create mode 100644 README.md create mode 100644 eslint.config.mjs create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..b495137 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,13 @@ +name: Lint + +on: [push] + +jobs: + eslint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install modules + run: npm ci + - name: Run ESLint + run: npm run lint diff --git a/.gitignore b/.gitignore index 723ef36..2d2b47d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.idea \ No newline at end of file +.idea +node_modules \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..56cb46b --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# Meeting Roulette +*🎡 Spin your meetings* + +### [Tool link](https://klemek.github.io/meeting-roulette/) \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..4e09536 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,31 @@ +import eslintConfigPrettier from "eslint-config-prettier"; +import globals from "globals"; +import pluginJs from "@eslint/js"; +import pluginVue from "eslint-plugin-vue"; + +/** @type {import('eslint').Linter.Config[]} */ +export default [ + { + languageOptions: { + globals: { + ...globals.browser, + confetti: "readonly", + }, + }, + }, + pluginJs.configs.all, + ...pluginVue.configs["flat/recommended"], + { + rules: { + "no-magic-numbers": "off", + "sort-keys": "off", + "no-warning-comments": "off", + "no-ternary": "off", + "one-var": "off", + "max-statements": ["warn", 50], + "max-params": ["warn", 5], + "max-lines": "off", + }, + }, + eslintConfigPrettier, +]; diff --git a/index.html b/index.html index 248d533..eed2d71 100644 --- a/index.html +++ b/index.html @@ -3,8 +3,14 @@ Meeting Roulette - - + + -