8
8
'unicorn/prevent-abbreviations' : 'off' ,
9
9
'unicorn/consistent-function-scoping' : 'off' ,
10
10
'unicorn/filename-case' : 'off' ,
11
+ 'unicorn/prefer-string-raw' : 'off' ,
11
12
} ,
12
13
optin : {
13
14
'unicorn/catch-error-name' : [ 'error' , { name : 'e' } ] ,
283
284
hoist : 'all' ,
284
285
allow : [ 'name' ] ,
285
286
} ] ,
286
- 'no-throw-literal' : 'off' ,
287
- '@typescript-eslint/no-throw-literal' : 'error' ,
288
287
'no-unused-expressions' : 'off' ,
289
288
'@typescript-eslint/no-unused-expressions' : 'error' ,
290
289
'no-use-before-define' : 'off' ,
522
521
} ] ;
523
522
524
523
import viteConfig from './vite.config.ts' ;
524
+ import pluginStylistic from '@stylistic/eslint-plugin' ;
525
+ import pluginImportX from 'eslint-plugin-import-x' ;
526
+ import pluginUnicorn from 'eslint-plugin-unicorn' ;
527
+ import * as typescriptESLintParserForExtraFiles from 'typescript-eslint-parser-for-extra-files' ;
528
+ import * as vueESLintParser from 'vue-eslint-parser' ;
529
+ import vueESLintConfigTypescriptRecommendedExtends from '@vue/eslint-config-typescript/recommended.js' ;
530
+ import pluginVue from 'eslint-plugin-vue' ;
525
531
import { fixupConfigRules } from '@eslint/compat' ;
526
532
import { FlatCompat } from '@eslint/eslintrc' ;
527
533
import eslintJs from '@eslint/js' ;
528
- import * as vueESLintParser from 'vue-eslint-parser' ;
529
- import pluginVue from 'eslint-plugin-vue'
530
- import vueESLintConfigTypescriptRecommendedExtends from '@vue/eslint-config-typescript/recommended.js'
531
- import * as typescriptESLintParserForExtraFiles from 'typescript-eslint-parser-for-extra-files' ;
532
- import pluginStylistic from '@stylistic/eslint-plugin' ;
533
534
import stylisticMigrate from '@stylistic/eslint-plugin-migrate' ;
534
- import pluginImportX from 'eslint-plugin-import-x' ;
535
- import pluginUnicorn from 'eslint-plugin-unicorn' ;
536
535
import * as _ from 'lodash-es' ;
537
536
538
537
// https://github.com/eslint/eslint/issues/18093
@@ -553,6 +552,8 @@ export default [
553
552
'plugin:@tanstack/eslint-plugin-query/recommended' , // https://github.com/TanStack/query/pull/7253
554
553
) ) ,
555
554
pluginUnicorn . configs [ 'flat/recommended' ] ,
555
+ { languageOptions : { parserOptions : { ecmaVersion : 'latest' } } } ,
556
+ { ignores : [ '.yarn/' , '.pnp.*' ] } ,
556
557
{ linterOptions : { reportUnusedDisableDirectives : 'error' } } ,
557
558
{
558
559
languageOptions : {
@@ -562,9 +563,15 @@ export default [
562
563
} ,
563
564
} ,
564
565
plugins : { '@stylistic' : pluginStylistic } ,
565
-
566
+
566
567
// https://stackoverflow.com/questions/30221286/how-to-convert-an-array-of-objects-to-an-object-in-lodash/36692117#36692117
567
- rules : Object . assign ( { } , ..._ . flatten ( _ . map ( rules , Object . values ) ) ) ,
568
+ rules : Object . assign ( { } , ..._ . flatMap ( rules , Object . values ) ) ,
569
+ } ,
570
+ {
571
+ files : [ '**/*.js' ] ,
572
+ languageOptions : { // https://github.com/vuejs/vue-eslint-parser/issues/104#issuecomment-2148652586
573
+ parserOptions : { disallowAutomaticSingleRunInference : true } ,
574
+ } ,
568
575
} ,
569
576
{
570
577
files : [ '**/*.ts' ] ,
@@ -584,9 +591,7 @@ export default [
584
591
settings : {
585
592
'import-x/resolver' : {
586
593
typescript : true ,
587
-
588
- // https://github.com/pzmosquito/eslint-import-resolver-vite/issues/12#issuecomment-1979897899
589
- vite : { viteConfig : import ( './vite.config' ) } ,
594
+ vite : { viteConfig } , // https://github.com/pzmosquito/eslint-import-resolver-vite/issues/12#issuecomment-2148676875
590
595
} ,
591
596
} ,
592
597
} ,
@@ -598,6 +603,10 @@ export default [
598
603
'@stylistic/migrate/migrate-ts' : 'error' ,
599
604
'@stylistic/comma-dangle' : [ 'error' , 'always-multiline' ] ,
600
605
'@typescript-eslint/naming-convention' : 'off' ,
606
+ '@typescript-eslint/no-unsafe-call' : 'off' ,
607
+ '@typescript-eslint/no-unsafe-argument' : 'off' ,
608
+ '@typescript-eslint/no-unsafe-assignment' : 'off' ,
609
+ '@typescript-eslint/no-unsafe-member-access' : 'off' ,
601
610
} ,
602
611
} ,
603
612
] ;
0 commit comments