Add Vue linting (#13447)

* Add Vue linting

Turns out the .vue files were not linted at all, so I added that as well
as re-indented the file to 2-space and fixed all reasonable issues that
cam up except one case of a unintended side effect for which I have no
idea how to fix it, so the rule was disabled.

* misc tweaks

* update lockfile

* use overrides to include .vue files

* treat warnings as errors on lint-frontend

* also treat stylelint warnings as errors

* use equal sign syntax

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
silverwind 2020-11-07 16:11:09 +01:00 committed by GitHub
parent ed47da2e29
commit 7c47e24093
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 295 additions and 243 deletions

View file

@ -11,6 +11,10 @@ parserOptions:
plugins:
- eslint-plugin-unicorn
- eslint-plugin-import
- eslint-plugin-vue
extends:
- plugin:vue/recommended
env:
es2021: true
@ -24,7 +28,7 @@ globals:
u2fApi: false
overrides:
- files: ["web_src/**/*.js"]
- files: ["web_src/**/*.js", "web_src/**/*.vue"]
env:
browser: true
jquery: true
@ -387,6 +391,11 @@ rules:
use-isnan: [2]
valid-typeof: [2, {requireStringLiterals: true}]
vars-on-top: [0]
vue/attributes-order: [0]
vue/component-definition-name-casing: [0]
vue/html-closing-bracket-spacing: [0]
vue/max-attributes-per-line: [0]
vue/one-component-per-file: [0]
wrap-iife: [2, inside]
wrap-regex: [0]
yield-star-spacing: [2, after]