eslint-plugin-css-modules icon indicating copy to clipboard operation
eslint-plugin-css-modules copied to clipboard

Support for .vue files

Open manuel-di-iorio opened this issue 7 years ago • 1 comments

The .vue file

<style lang="scss" scoped>
.unused-class {
  background: red;
}
</style>

My eslintrc.js config:

module.exports = {
  root: true,
  env: {
    browser: true,
    node: true
  },
  extends: [
    'plugin:vue/recommended',
    'plugin:css-modules/recommended'
  ],
  plugins: [
    'vue',
    'eslint-plugin-css-modules'
  ]
};

Expected: eslint should throws a warning/error for the unused class

manuel-di-iorio avatar Feb 01 '18 10:02 manuel-di-iorio

scoped attribute for <style> tag doesn't use css modules. You should use module attribute for <style> tag to use css modules ( https://vue-loader.vuejs.org/guide/css-modules.html )

Solant avatar Jul 30 '18 17:07 Solant