@sientech/eslint-config-frontend
v2.0.2
Published
sientech frontend custom eslint config
Downloads
17
Keywords
Readme
sientech frontend custom eslint rule base on vue2/vue3
Usage
Installation
Vue2 CLI Project (Legacy)
Vue ~2.6.14 require "eslint-plugin-vue@^8.2.0",please update vue2 project for correct version
yarn add -D eslint@^6.8.0 @sientech/eslint-config-frontend@1 eslint-plugin-vue
Vue ~2.7
yarn add -D eslint@7 @sientech/eslint-config-frontend@2 eslint-plugin-vue eslint-plugin-import@2 eslint-plugin-node@11 eslint-plugin-promise@6 eslint-plugin-vue@9
Vue3 & Vite
yarn add -D eslint @sientech/eslint-config-frontend eslint-plugin-vue
Configuration
Example .eslintrc.js
:
module.exports = {
root: true,
env: {
node: true
},
extends: [
'@sientech/frontend/lib/vue2-essential'
],
parserOptions: {
ecmaVersion: 2020
},
globals: {
},
rules: {
}
}
available extends:
@sientech/frontend/lib/eslint-base
: define custom eslint rules@sientech/frontend/lib/vue-base
: define custom vue rules@sientech/frontend/lib/base
: define custom vue & eslint rules@sientech/frontend/lib/vue2-essential
: base on@sientech/frontend/lib/base
and vue-essential rules@sientech/frontend/lib/vue2-recommended
: base on@sientech/frontend/lib/base
and vue-recommended rules@sientech/frontend/lib/vue3-base
: base on@sientech/frontend/lib/base
and define custom vue3 rules@sientech/frontend/lib/vue3-essential
: base on@sientech/frontend/lib/vue3-base
and vue3-essential rules@sientech/frontend/lib/vue3-recommended
: base on@sientech/frontend/lib/vue3-base
and vue3-recommended rules
NOTE: For Vue 2.7 if use setup script feature, add
vue/setup-compiler-macros: true
in env config.
env: {
'vue/setup-compiler-macros': true,
},