Vé
Wotan processor for Vue Single File Components (SFC)
Make sure to also read the full documentation of all available modules.
Purpose
Enable wotan
to lint *.vue
files. This works by extracting the <script>
content of a single file component and feeding that into TypeScript.
The lang
attribute is respected and defaults to js
if not present. You can use every language TypeScript supports (currently js
, jsx
, ts
, tsx
).
It even works with type checking.
Installation
npm install --save-dev @fimbul/wotan @fimbul/ve
yarn add -D @fimbul/wotan @fimbul/ve
Usage
Use as processor in your config:
---
overrides:
- files: "*.vue"
processor: "@fimbul/ve"
There's also a configuration preset you can extend. This preset comes without any enabled rules and just provides the processor for *.vue
files as described above.
---
extends:
- "@fimbul/ve"
License
Apache-2.0 © Klaus Meinhardt
v0.24.0
:tada: This release contains two major features: caching and code fixes in the LanguageService plugin.
:warning: Breaking Changes:
The changes in the LanguageService plugin require that you update the @fimbul/mithotyn
dependency and the fimbullinter.vscode-plugin
VSCode plugin if you were using one of them.
Features:
- new rule:
no-object-spread-of-iterable
warns about spreading an array into an object - new rule:
no-implicit-tostring
warns about implicit string coercion of certain types - new CLI option:
--cache
enables caching for fast incremental linting. Read more about caching - the LanguageService plugin uses caching to speed up linting in your editor
- the LanguageService plugin now provides fixes for fixable findings