Eslint single quote rule not applying to vue template

  Kiến thức lập trình

Why doesn’t eslint single quote rule apply to .vue?

.vue (I don’t get a warning here. It should be t('...'))

<template>
    <span class="myClass">{{ t("myLabel") }}</span>
</template>

eslint rule

module.exports = {
  root: true,
  'extends': [
    'plugin:vue/vue3-essential',
    'eslint:recommended',
    '@vue/eslint-config-typescript'
  ],
  parserOptions: {
    ecmaVersion: 'latest'
  },
  rules: {
    quotes: ['warn', 'single'],
  },
  ignorePatterns: ['dist/']
}

package.json script

"lint": "eslint . --ext .ts,.vue src/"

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT