diff options
author | silverwind <me@silverwind.io> | 2022-07-15 11:38:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-15 17:38:18 +0800 |
commit | 4c0fce8f7b3ec185ca34e301fb67bf2d28d972d4 (patch) | |
tree | 928012fd19d7806b265bb096f6e5bcd68ba25e85 /web_src/js | |
parent | e35a39e81d9ef548b17612b6441951eb08b4345e (diff) | |
download | gitea-4c0fce8f7b3ec185ca34e301fb67bf2d28d972d4.tar.gz gitea-4c0fce8f7b3ec185ca34e301fb67bf2d28d972d4.zip |
Fix eslint parsing errors, remove eslint-plugin-html (#20323)
Introduce a separate .eslintrc in the Vue components folder to
selectively enable vue-eslint-parser there, so that the rest of the
files can use eslint's core parser which can deal with hashbangs.
The fact that the eslint-disable comments worked in HTML was a
unintended side-effect of the files being parsed via vue-eslint-parser,
so I had to disable the parsing of these files in .eslintrc.yaml to make
it work, and finally decided to remove eslint-plugin-html as it causes
more issues than it solves.
Diffstat (limited to 'web_src/js')
-rw-r--r-- | web_src/js/components/.eslintrc.yaml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/web_src/js/components/.eslintrc.yaml b/web_src/js/components/.eslintrc.yaml new file mode 100644 index 0000000000..e19bd06637 --- /dev/null +++ b/web_src/js/components/.eslintrc.yaml @@ -0,0 +1,16 @@ +plugins: + - eslint-plugin-vue + +extends: + - ../../../.eslintrc.yaml + - plugin:vue/recommended + +env: + browser: true + +rules: + 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] |