Skip to content
On this page

@vue-bridge/eslint-config

current npm versionlicence - MITnpm downloads per month

Vue-Bridge provides an eslint-config package that defines a bunch of rules that will help plugin authors to write cross-compatible code by warning when using incompatible features or APIs and enforcing the use of the right exports, i.e. using defineComponent from '@vue-bridge/runtime' over the normal version exported from 'vue'

Dependencies

This package depends on eslint ^8.0.0 or higher and eslint-plugin-vue version ^9.0.0 or higher. You have to install these packages yourself.

Installation

npm install -D @vue-bridge/eslint-config eslint eslint-plugin-vue

Add to your eslint config:

// .eslintrc.js
module.exports = {
  extends: [
    'eslint-plugin-vue',
    '@vue-bridge/eslint-config'
  ]
}

Rules

The following rules are used by this config:

TODO: Go over these list, check completeness. Add links to eslint-vue docs.

Namefrom
vue-no-multiple-template-rooteslint-plugin-vue
vue-require-explicit-emitseslint-plugin-vue
vue/no-v-model-argumenteslint-plugin-vue
vue/no-deprecated-v-bind-synceslint-plugin-vue
vue/no-deprecated-v-on-native-modifiereslint-plugin-vue
vue/no-deprecated-dollar-listeners-apieslint-plugin-vue
vue/no-deprecated-filtereslint-plugin-vue
vue/no-deprecated-html-element-iseslint-plugin-vue
vue/no-use-v-if-with-v-foreslint-plugin-vue
no-restricted-importseslint
no-restricted-propertieseslint

Further Reading

See the Compatibility Listing to learn in which situations the above rules are helpful.

Released under the MIT license