File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,17 @@ import sortEnums from './rules/sort-enums'
2424import sortMaps from './rules/sort-maps'
2525import sortSets from './rules/sort-sets'
2626
27+ interface PluginConfigs {
28+ 'recommended-alphabetical-legacy' : Linter . LegacyConfig
29+ 'recommended-line-length-legacy' : Linter . LegacyConfig
30+ 'recommended-natural-legacy' : Linter . LegacyConfig
31+ 'recommended-custom-legacy' : Linter . LegacyConfig
32+ 'recommended-alphabetical' : Linter . Config
33+ 'recommended-line-length' : Linter . Config
34+ 'recommended-natural' : Linter . Config
35+ 'recommended-custom' : Linter . Config
36+ }
37+
2738interface BaseOptions {
2839 type : 'alphabetical' | 'line-length' | 'natural' | 'custom'
2940 order : 'desc' | 'asc'
@@ -89,7 +100,7 @@ function createLegacyConfig(options: BaseOptions): Linter.LegacyConfig {
89100 }
90101}
91102
92- export let configs = {
103+ export let configs : PluginConfigs = {
93104 'recommended-alphabetical-legacy' : createLegacyConfig ( {
94105 type : 'alphabetical' ,
95106 order : 'asc' ,
@@ -122,9 +133,9 @@ export let configs = {
122133 type : 'custom' ,
123134 order : 'asc' ,
124135 } ) ,
125- } as unknown as ESLint . Plugin [ 'configs' ]
136+ }
126137
127138export default {
128139 ...plugin ,
129140 configs,
130- } as ESLint . Plugin
141+ } as { configs : PluginConfigs } & ESLint . Plugin
You can’t perform that action at this time.
0 commit comments