Skip to content

Commit

Permalink
chore: update linter
Browse files Browse the repository at this point in the history
  • Loading branch information
StarHeartHunt committed Aug 7, 2024
1 parent 7d84b27 commit 4bb6de0
Showing 1 changed file with 56 additions and 13 deletions.
69 changes: 56 additions & 13 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,60 @@ export const typescript = tseslint.config({
},
});

const vueCustomRules = {
'vue/block-order': ['error', { order: ['script', 'template', 'style'] }],

Check warning on line 52 in eslint.config.js

View workflow job for this annotation

GitHub Actions / build

Replace `'vue/block-order':·['error',·{·order:·['script',·'template',·'style'` with `"vue/block-order":·["error",·{·order:·["script",·"template",·"style"`
"vue/component-tags-order": [
"error",
{
order: ["script", "template", "style"],
},
],
'vue/custom-event-name-casing': ['error', 'camelCase'],

Check warning on line 59 in eslint.config.js

View workflow job for this annotation

GitHub Actions / build

Replace `'vue/custom-event-name-casing':·['error',·'camelCase'` with `"vue/custom-event-name-casing":·["error",·"camelCase"`
'vue/eqeqeq': ['error', 'smart'],

Check warning on line 60 in eslint.config.js

View workflow job for this annotation

GitHub Actions / build

Replace `'vue/eqeqeq':·['error',·'smart'` with `"vue/eqeqeq":·["error",·"smart"`
'vue/html-self-closing': [

Check warning on line 61 in eslint.config.js

View workflow job for this annotation

GitHub Actions / build

Replace `'vue/html-self-closing'` with `"vue/html-self-closing"`
'error',

Check warning on line 62 in eslint.config.js

View workflow job for this annotation

GitHub Actions / build

Replace `'error'` with `"error"`
{
html: {
component: 'always',

Check warning on line 65 in eslint.config.js

View workflow job for this annotation

GitHub Actions / build

Replace `'always'` with `"always"`
normal: 'always',

Check warning on line 66 in eslint.config.js

View workflow job for this annotation

GitHub Actions / build

Replace `'always'` with `"always"`
void: 'any',

Check warning on line 67 in eslint.config.js

View workflow job for this annotation

GitHub Actions / build

Replace `'any'` with `"any"`
},
math: 'always',

Check warning on line 69 in eslint.config.js

View workflow job for this annotation

GitHub Actions / build

Replace `'always'` with `"always"`
svg: 'always',

Check warning on line 70 in eslint.config.js

View workflow job for this annotation

GitHub Actions / build

Replace `'always'` with `"always"`
},
],
'vue/max-attributes-per-line': 'off',

'vue/multi-word-component-names': 'off',
'vue/no-constant-condition': 'warn',
'vue/no-empty-pattern': 'error',
'vue/no-loss-of-precision': 'error',
'vue/no-unused-refs': 'error',
'vue/no-useless-v-bind': 'error',

"vue/no-v-html": "off",
'vue/object-shorthand': [
'error',
'always',
{
avoidQuotes: true,
ignoreConstructors: false,
},
],
'vue/one-component-per-file': 'off',
'vue/padding-line-between-blocks': ['error', 'always'],
'vue/prefer-template': 'error',
"vue/require-default-prop": "off",
'vue/require-prop-types': 'off',
}

const vue3Rules = {
...pluginVue.configs.base.rules,
...pluginVue.configs['vue3-essential'].rules,
...pluginVue.configs['vue3-strongly-recommended'].rules,
...pluginVue.configs['vue3-recommended'].rules,
}

export const vue = [
...tseslint.config({
extends: typescript,
Expand All @@ -72,19 +126,8 @@ export const vue = [
},
processor: pluginVue.processors[".vue"],
rules: {
...pluginVue.configs.base.rules,
...pluginVue.configs["vue3-essential"].rules,
...pluginVue.configs["vue3-strongly-recommended"].rules,
...pluginVue.configs["vue3-recommended"].rules,
"vue/require-default-prop": "off",
"vue/multi-word-component-names": 0,
"vue/no-v-html": 0,
"vue/component-tags-order": [
"error",
{
order: ["script", "template", "style"],
},
],
...vue3Rules,
...vueCustomRules
},
},
];
Expand Down

0 comments on commit 4bb6de0

Please sign in to comment.