1
1
import sortInterfaces , { RULE_NAME as sortInterfacesName } from '~/rules/sort-interfaces'
2
2
import sortJsxProps , { RULE_NAME as sortJsxPropsName } from '~/rules/sort-jsx-props'
3
3
import sortNamedImports , { RULE_NAME as sortNamedImportsName } from '~/rules/sort-named-imports'
4
+ import sortUnionTypes , { RULE_NAME as sortUnionTypesName } from './rules/sort-union-types'
4
5
import { name } from '~/package.json'
5
6
6
7
let getRulesWithOptions = ( options : {
@@ -14,6 +15,7 @@ let getRulesWithOptions = (options: {
14
15
[ sortInterfacesName ] : [ 'error' ] ,
15
16
[ sortJsxPropsName ] : [ 'error' ] ,
16
17
[ sortNamedImportsName ] : [ 'error' ] ,
18
+ [ sortUnionTypesName ] : [ 'error' ] ,
17
19
}
18
20
return Object . fromEntries (
19
21
Object . entries ( recommendedRules ) . map ( ( [ key , [ message , baseOptions = { } ] ] ) => [
@@ -29,6 +31,7 @@ export default {
29
31
[ sortInterfacesName ] : sortInterfaces ,
30
32
[ sortJsxPropsName ] : sortJsxProps ,
31
33
[ sortNamedImportsName ] : sortNamedImports ,
34
+ [ sortUnionTypesName ] : sortUnionTypes ,
32
35
} ,
33
36
configs : {
34
37
'recommended-natural' : getRulesWithOptions ( { type : 'natural' , order : 'asc' } ) ,
0 commit comments