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.4.0
This release contains a lot of refactoring and structural changes:
- renamed
await-promise
to await-only-promise
- renamed
deprecation
to no-unstable-api-use
Two new packages were split from the wotan
package:
ymir
contains all base types and classes. This package can be used by extension and rule authors to not depend on the full wotan
runtime.mimir
contains all rules, formatters and configuration presets. Together with ymir
this package allows rules to be executed in a different runtime without depending on the whole wotan
package
Features:
- Added recipes to Readme
- new rule
await-async-result
- new rule
generator-require-yield
- new rule
no-nan-compare
- new rule
no-unreachable-code
- new rule
prefer-dot-notation
- new rule
prefer-number-isnan
- new rule
prefer-object-spread
no-unstable-api-use
(previously deprecation
) also checks @experimental
tag
Bugfixes:
no-unused-label
no longer forbids labels on statements other than loops and switch