0.3.1 • Published 3 years ago
@factorial/stack-vue v0.3.1
@factorial/stack-vue
This is the Vue plugin for @factorial/stack-core.
It provides a linting task. The configuration files for that can be found in eslint.
Please be aware that this package not only lints .vue, but also .js, .mjs and .cjs files. This means that you do not need the @factorial/stack-javascript package.
Installation
You can install it via:
yarn factorial initor manually via:
yarn add @factorial/stack-vueMake sure it is added to your .factorialrc.js like this:
// .factorialrc.js
module.exports = {
use: [require("@factorial/stack-vue")],
};And add a .eslintrc.js:
// .eslintrc.js
module.exports = {
root: true,
extends: [
require.resolve("@factorial/stack-javascript/eslint"),
require.resolve("@factorial/stack-vue/eslint/v3"),
],
};Available configurations:
@factorial/stack-vue/eslint/v2: Vue 2@factorial/stack-vue/eslint/v3: Vue 3
Extending or overwriting linting rules
If you need to extend or overwrite the linting rules, you can do that like this:
// .eslintrc.js
module.exports = {
root: true,
extends: […],
rules: {
...
},
};Usage
You can run:
yarn factorial lintThis will also run other linting tasks provided by other packages (in case you installed some).
If you want to only lint .vue files, you can run:
yarn factorial lint --only vue