User Guide | eslint-plugin | vue eslintrc js
💿InstallationViavue-cli(Recommended):Vianpm(opensnewwindow)[1]:Viayarn(opensnewwindow)[2]:RequirementsESLintv6.2.0andaboveNode.jsv8.10.0andaboveWehavestartedsupportingESLintv8.0.0beta,butnotethatbetasupportwillbedroppedoncethestableversionisreleased.📖UsageConfigurationUse.eslintrc.*filetoconfigurerules.Seealso:https://eslint.org/docs/user-guide/configuring(opensnewwindow)[3].Example.eslintrc.js:Seetherulelist[4]togettheextends&rulesthatthispluginprovides.BundleConfigurationsThispluginpro...
💿 InstallationVia vue-cli (Recommended):
Via npm(opens new window)[1]:
Via yarn(opens new window)[2]:
Requirements
ESLint v6.2.0 and above Node.js v8.10.0 and aboveWe have started supporting ESLint v8.0.0 beta, but note that beta support will be dropped once the stable version is released.
📖 Usage ConfigurationUse .eslintrc.* file to configure rules. See also: https://eslint.org/docs/user-guide/configuring(opens new window)[3].
Example .eslintrc.js:
See the rule list[4] to get the extends & rules that this plugin provides.
Bundle ConfigurationsThis plugin provides some predefined configs. You can use the following configs by adding them to extends.
"plugin:vue/base" ... Settings and rules to enable correct ESLint parsing. Configurations for using Vue.js 3.x. "plugin:vue/vue3-essential" ... base, plus rules to prevent errors or unintended behavior. "plugin:vue/vue3-strongly-recommended"...