eslint-plugin-postcss-modules
eslint-plugin-postcss-modules copied to clipboard
Linting doesn't work in vue template
I'm using Vue 3 with composition API and it works correctly in
<script setup>
import styles from 'view/pages/booking/passengers/contact-form/contact-form.css'; // It has error, no classes used from here (except .contact-form)
const form = styles['contact-form']; // no error
const form2 = styles['contact-error']; // error, because no class in css, correct
</script>
<template>
<div :class="styles['contact-for']"> // expected to have error because class doesn't exist
<div :class="styles['contact-form__header']">
<div :class="styles['contact-form__header-section']">
<span :class="styles['contact-form__title']">
{{ messages.title }}
</span>
</div>
</div>
</div>
</template>