@@ -76,9 +76,9 @@ const recommendedRules: Linter.RulesRecord = {
7676 'mocha/valid-test-title' : 'off' ,
7777 'mocha/no-empty-title' : 'error' ,
7878 'mocha/consistent-spacing-between-blocks' : 'error'
79- } as const ;
79+ } ;
8080
81- const mochaPlugin : ESLint . Plugin = {
81+ const mochaPlugin = {
8282 rules : {
8383 'handle-done-callback' : handleDoneCallbackRule ,
8484 'max-top-level-suites' : maxTopLevelSuitesRule ,
@@ -104,22 +104,24 @@ const mochaPlugin: ESLint.Plugin = {
104104 'valid-suite-title' : validSuiteTitleRule ,
105105 'valid-test-title' : validTestTitleRule ,
106106 'no-empty-title' : noEmptyTitleRule
107- }
108- } ;
109-
110- mochaPlugin . configs = {
111- all : {
112- name : 'mocha/all' ,
113- plugins : { mocha : mochaPlugin } ,
114- languageOptions : { globals : globals . mocha } ,
115- rules : allRules
116107 } ,
117- recommended : {
118- name : 'mocha/recommended' ,
119- plugins : { mocha : mochaPlugin } ,
120- languageOptions : { globals : globals . mocha } ,
121- rules : recommendedRules
108+ configs : {
109+ all : {
110+ name : 'mocha/all' ,
111+ plugins : { mocha : { } } ,
112+ languageOptions : { globals : globals . mocha } ,
113+ rules : allRules
114+ } ,
115+ recommended : {
116+ name : 'mocha/recommended' ,
117+ plugins : { mocha : { } } ,
118+ languageOptions : { globals : globals . mocha } ,
119+ rules : recommendedRules
120+ }
122121 }
123- } ;
122+ } satisfies ESLint . Plugin ;
123+
124+ mochaPlugin . configs . all . plugins . mocha = mochaPlugin ;
125+ mochaPlugin . configs . recommended . plugins . mocha = mochaPlugin ;
124126
125127export default mochaPlugin ;
0 commit comments