Skip to content

Commit

Permalink
Make no-unused-vars an error in the linter
Browse files Browse the repository at this point in the history
This is to make the CI fail when someone forgets
to remove a variable or import. It was defaulted to
warning only meaning some have been missed.
  • Loading branch information
Abban authored and moiikana committed Aug 28, 2023
1 parent db6a407 commit 0355855
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ module.exports = {
// TODO: Turn this rule back on when this is merged https://github.com/vuejs/eslint-plugin-vue/pull/2268
'vue/no-setup-props-destructure': [ 'off' ],

// Make unused vars throw a linter error
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',

// We want to use const and let wherever we like. TypeScript will inform us about use-before-declaration situations
'vars-on-top': [ 'off' ],

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<script setup lang="ts">
import { DynamicContent } from '@src/utils/DynamicContent/DynamicContent';
import { computed, inject, ref } from 'vue';
import { computed, inject } from 'vue';
import InfoIcon from '@src/components/Icons/InfoIcon.vue';
import KeenSliderSlide from '@src/components/Slider/KeenSliderSlide.vue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</template>

<script setup lang="ts">
import { computed, inject, ref } from 'vue';
import { computed, inject } from 'vue';
import { DynamicContent } from '@src/utils/DynamicContent/DynamicContent';
import InfoIcon from '@src/components/Icons/InfoIcon.vue';
Expand Down
2 changes: 1 addition & 1 deletion banners/desktop/content/BannerSlidesVar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<script setup lang="ts">
import { DynamicContent } from '@src/utils/DynamicContent/DynamicContent';
import { computed, inject, ref } from 'vue';
import { computed, inject } from 'vue';
import InfoIcon from '@src/components/Icons/InfoIcon.vue';
import KeenSliderSlide from '@src/components/Slider/KeenSliderSlide.vue';
Expand Down
2 changes: 1 addition & 1 deletion banners/desktop/content/BannerTextVar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</template>

<script setup lang="ts">
import { computed, inject, ref } from 'vue';
import { computed, inject } from 'vue';
import { DynamicContent } from '@src/utils/DynamicContent/DynamicContent';
import InfoIcon from '@src/components/Icons/InfoIcon.vue';
Expand Down

0 comments on commit 0355855

Please sign in to comment.