From 1ea91b825bde53b2ae62a08a1de0690af3ed690c Mon Sep 17 00:00:00 2001 From: Tino Koch <17991193+Tinoooo@users.noreply.github.com> Date: Thu, 7 Sep 2023 14:18:00 +0200 Subject: [PATCH] feat: 50 similar linting rules throughout the tresjs packages (#51) * feature: added eslint rules to have homogeneous rules in the tres ecosystem * chore: applied eslint fixes * chore: moved linting rules to correct position --------- Co-authored-by: Tino Koch --- .eslintignore | 8 + .eslintrc.json | 7 + .prettierrc.cjs | 4 - docs/.eslintrc.json | 3 + docs/.vitepress/theme/TresLayout.vue | 1 + .../.vitepress/theme/components/BloomDemo.vue | 13 +- .../theme/components/GlitchDemo.vue | 11 +- .../theme/components/LoveVueThreeJS.vue | 16 +- .../theme/components/OutlineDemo.vue | 31 +- package.json | 3 +- playground/.eslintrc.json | 6 + playground/src/components/GlitchDemo.vue | 13 +- playground/src/components/OutlineDemo.vue | 29 +- playground/src/components/TheExperience.vue | 10 +- playground/src/components/UnrealBloom.vue | 26 +- playground/src/pages/glitch.vue | 4 +- playground/src/pages/outline.vue | 34 +- pnpm-lock.yaml | 1141 ++++++++++++++++- src/core/EffectComposer.vue | 13 +- src/core/effects/Bloom.vue | 20 +- src/core/effects/Glitch.vue | 20 +- src/core/effects/Outline.vue | 16 +- src/core/injectionKeys.ts | 4 +- 23 files changed, 1303 insertions(+), 130 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc.json delete mode 100644 .prettierrc.cjs create mode 100644 docs/.eslintrc.json create mode 100644 playground/.eslintrc.json diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..d88e5152 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,8 @@ +dist +**.spec.js +**.test.ts +**.test.js +**.cy.js +**/cypress/** +docs/.vitepress/cache +docs/.vitepress/dist \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..cd76aa45 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,7 @@ +{ + "extends": "@tresjs/eslint-config-vue", + "rules": { + "@typescript-eslint/no-use-before-define": "off", + "vue/valid-template-root": "off" + } +} diff --git a/.prettierrc.cjs b/.prettierrc.cjs deleted file mode 100644 index c7e30143..00000000 --- a/.prettierrc.cjs +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - ...require('@alvarosabu/prettier-config'), - printWidth: 120, -} diff --git a/docs/.eslintrc.json b/docs/.eslintrc.json new file mode 100644 index 00000000..abc08e54 --- /dev/null +++ b/docs/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "@tresjs/eslint-config-vue" +} diff --git a/docs/.vitepress/theme/TresLayout.vue b/docs/.vitepress/theme/TresLayout.vue index c61001ab..15c65b81 100644 --- a/docs/.vitepress/theme/TresLayout.vue +++ b/docs/.vitepress/theme/TresLayout.vue @@ -1,4 +1,5 @@