1- import xoBrowser from 'eslint-config-xo/browser '
1+ import eslintConfigXo from 'eslint-config-xo'
22import unicorn from 'eslint-plugin-unicorn'
33import importXPlugin from 'eslint-plugin-import-x'
44import html from 'eslint-plugin-html'
@@ -106,6 +106,16 @@ const localRules = {
106106 'unicorn/prefer-structured-clone' : 'off' ,
107107 'unicorn/prevent-abbreviations' : 'off' ,
108108 // Rules new/changed in ESLint 10 / updated plugins — disable to preserve old behaviour
109+ 'import-x/no-anonymous-default-export' : 'off' ,
110+ 'import-x/no-extraneous-dependencies' : 'off' ,
111+ 'import-x/no-unassigned-import' : 'off' ,
112+ 'n/file-extension-in-import' : 'off' ,
113+ 'n/no-deprecated-api' : 'off' ,
114+ 'n/no-extraneous-import' : 'off' ,
115+ 'n/prefer-global/buffer' : 'off' ,
116+ 'n/prefer-global/process' : 'off' ,
117+ 'n/prefer-promises/fs' : 'off' ,
118+ 'no-shadow' : 'off' ,
109119 'require-unicode-regexp' : 'off' ,
110120 '@stylistic/indent-binary-ops' : 'off' ,
111121 '@stylistic/curly-newline' : 'off' ,
@@ -115,10 +125,13 @@ const localRules = {
115125}
116126
117127// Base config: xo/browser + unicorn + import-x for all JS/HTML/MD files
118- const [ xoBrowserConfig ] = xoBrowser
128+ const xoBrowserConfigs = eslintConfigXo ( { browser : true , space : false } )
129+ const xoBrowserConfig = xoBrowserConfigs . find ( config =>
130+ config . files ?. includes ( '**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,svelte,astro}' )
131+ ) ?? xoBrowserConfigs [ 0 ]
119132const unicornConfig = unicorn . configs [ 'flat/recommended' ]
120133
121- export default [
134+ const eslintConfig = [
122135 // Global ignores (replaces .eslintignore)
123136 {
124137 ignores : [
@@ -330,3 +343,5 @@ export default [
330343 }
331344 }
332345]
346+
347+ export default eslintConfig
0 commit comments