Various ESLint rules to make you Vue(x) code a bit stricter
- ESLint >=4.15.0
- Node.js >=8.0.0
$ npm i eslint eslint-plugin-strict-vue --save-dev
Configure it in .eslintrc
or package.json
:
{
"name": "my-awesome-project",
"eslintConfig": {
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"strict-vue"
],
"rules": {
"strict-vue/require-jsdoc": "error",
"strict-vue/no-root-store-calls": "error",
"strict-vue/no-root-store-assets": "error",
}
}
}
- require-jsdoc - require JSdoc comments for Vue props, and Vuex actions and state.
- no-root-store-calls - disallow dispatch/commit to the global namespase.
- no-root-store-assets - disallow the use of rootGetters and rootStore.
MIT