Jelajahi Sumber

chore: eslint

xingyu 1 tahun lalu
induk
melakukan
37c41aeecc
1 mengubah file dengan 16 tambahan dan 7 penghapusan
  1. 16 7
      .eslintrc.js

+ 16 - 7
.eslintrc.js

@@ -1,6 +1,4 @@
-// @ts-check
-const { defineConfig } = require('eslint-define-config')
-module.exports = defineConfig({
+module.exports = {
   root: true,
   env: {
     browser: true,
@@ -21,7 +19,6 @@ module.exports = defineConfig({
   extends: ['plugin:vue/vue3-recommended', 'prettier', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
   rules: {
     'vue/script-setup-uses-vars': 'error',
-    'vue/no-reserved-component-names': 'off',
     '@typescript-eslint/ban-ts-ignore': 'off',
     '@typescript-eslint/explicit-function-return-type': 'off',
     '@typescript-eslint/no-explicit-any': 'off',
@@ -34,8 +31,20 @@ module.exports = defineConfig({
     '@typescript-eslint/ban-types': 'off',
     '@typescript-eslint/no-non-null-assertion': 'off',
     '@typescript-eslint/explicit-module-boundary-types': 'off',
-    '@typescript-eslint/no-unused-vars': 'error',
-    'no-unused-vars': 'error',
+    '@typescript-eslint/no-unused-vars': [
+      'error',
+      {
+        argsIgnorePattern: '^_',
+        varsIgnorePattern: '^_'
+      }
+    ],
+    'no-unused-vars': [
+      'error',
+      {
+        argsIgnorePattern: '^_',
+        varsIgnorePattern: '^_'
+      }
+    ],
     'space-before-function-paren': 'off',
 
     'vue/attributes-order': 'off',
@@ -61,4 +70,4 @@ module.exports = defineConfig({
     ],
     'vue/multi-word-component-names': 'off'
   }
-})
+}