Update eslint.config.js

shleeable-patch-3
Shlee 4 weeks ago committed by GitHub
parent b05b7b3444
commit 5cdb7b978a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

22
eslint.config.js vendored

@ -1,14 +1,14 @@
const js = require('@eslint/js');
const vue = require('eslint-plugin-vue');
const { globals } = require('globals');
const globals = require('globals');
module.exports = [
// Base JavaScript configuration
js.configs.recommended,
// Vue.js configuration for Vue 2
...vue.configs['flat/essential'],
{
files: ['**/*.{js,vue}'],
languageOptions: {
@ -34,17 +34,17 @@ module.exports = [
'vue/multi-word-component-names': 'off',
'vue/no-v-model-argument': 'off',
'vue/no-multiple-template-root': 'error',
// General JavaScript rules
'no-console': 'warn',
'no-debugger': 'warn',
'no-unused-vars': ['error', {
'no-unused-vars': ['error', {
argsIgnorePattern: '^_',
varsIgnorePattern: '^_'
varsIgnorePattern: '^_'
}],
'prefer-const': 'error',
'no-var': 'error',
// Code style
'indent': ['error', 2],
'quotes': ['error', 'single'],
@ -52,7 +52,7 @@ module.exports = [
'comma-dangle': ['error', 'never'],
'object-curly-spacing': ['error', 'always'],
'array-bracket-spacing': ['error', 'never'],
// Best practices
'eqeqeq': 'error',
'no-eval': 'error',
@ -60,7 +60,7 @@ module.exports = [
'no-new-func': 'error'
}
},
// Specific configuration for Vue files
{
files: ['**/*.vue'],
@ -79,7 +79,7 @@ module.exports = [
}]
}
},
// Configuration for Laravel Mix and build files
{
files: ['webpack.mix.js', 'webpack.config.js'],
@ -92,7 +92,7 @@ module.exports = [
'no-console': 'off'
}
},
// Ignore patterns
{
ignores: [

Loading…
Cancel
Save