1- import type { FlatESLintConfigItem } from 'eslint-define-config'
21import globals from 'globals'
2+ import type { FlatESLintConfigItem , OptionsIsInEditor , OptionsOverrides } from '../types'
33import { pluginAntfu , pluginUnusedImports } from '../plugins'
44import { OFF } from '../flags'
5- import type { OptionsIsInEditor , OptionsOverrides } from '../types'
65import { GLOB_SRC , GLOB_SRC_EXT } from '../globs'
76
87export function javascript ( options : OptionsIsInEditor & OptionsOverrides = { } ) : FlatESLintConfigItem [ ] {
@@ -12,12 +11,6 @@ export function javascript(options: OptionsIsInEditor & OptionsOverrides = {}):
1211 } = options
1312
1413 return [
15- {
16- plugins : {
17- 'antfu' : pluginAntfu ,
18- 'unused-imports' : pluginUnusedImports ,
19- } ,
20- } ,
2114 {
2215 languageOptions : {
2316 ecmaVersion : 2022 ,
@@ -38,6 +31,11 @@ export function javascript(options: OptionsIsInEditor & OptionsOverrides = {}):
3831 } ,
3932 sourceType : 'module' ,
4033 } ,
34+ name : 'coderwyd:javascript' ,
35+ plugins : {
36+ 'antfu' : pluginAntfu ,
37+ 'unused-imports' : pluginUnusedImports ,
38+ } ,
4139
4240 rules : {
4341 'accessor-pairs' : [ 'error' , { enforceForClassMembers : true , setWithoutGet : true } ] ,
@@ -235,6 +233,7 @@ export function javascript(options: OptionsIsInEditor & OptionsOverrides = {}):
235233 } ,
236234 {
237235 files : [ `scripts/${ GLOB_SRC } ` , `cli.${ GLOB_SRC_EXT } ` ] ,
236+ name : 'coderwyd:scripts-overrides' ,
238237 rules : {
239238 'no-console' : OFF ,
240239 } ,
0 commit comments