50 lines
1.1 KiB
JavaScript
50 lines
1.1 KiB
JavaScript
import pluginVue from 'eslint-plugin-vue'
|
|
import js from '@eslint/js'
|
|
import globals from 'globals'
|
|
|
|
export default [
|
|
// Base JS recommended rules (all off for now to allow pre-commit)
|
|
{
|
|
rules: Object.keys(js.configs.recommended.rules).reduce((acc, rule) => {
|
|
acc[rule] = 'off';
|
|
return acc;
|
|
}, {}),
|
|
},
|
|
// Vue essential rules
|
|
...pluginVue.configs['flat/essential'],
|
|
{
|
|
// Apply to all JS and Vue files
|
|
files: ['**/*.js', '**/*.vue'],
|
|
languageOptions: {
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module',
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
crypto: 'readonly',
|
|
BarcodeDetector: 'readonly',
|
|
chrome: 'readonly',
|
|
__APP_VERSION__: 'readonly',
|
|
VITE_APP_VERSION: 'readonly',
|
|
},
|
|
},
|
|
rules: {
|
|
'vue/multi-word-component-names': 'off',
|
|
'no-unused-vars': 'off',
|
|
'no-undef': 'off',
|
|
'no-debugger': 'off',
|
|
}
|
|
},
|
|
{
|
|
// Global ignores
|
|
ignores: [
|
|
'dist/**',
|
|
'dev-dist/**',
|
|
'node_modules/**',
|
|
'public/**',
|
|
'scripts/pack_crx.js',
|
|
'src/app.config.mjs'
|
|
]
|
|
}
|
|
]
|