Skip to content

Commit

Permalink
fix: fix missed sort-union-types rule export
Browse files Browse the repository at this point in the history
  • Loading branch information
azat-io committed May 16, 2023
1 parent 8a43758 commit 3b02609
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/rules/sort-union-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default {

## 🚀 Version

This rule was introduced in v0.3.0.
It will be released soon.

## 📚 Resources

Expand Down
3 changes: 3 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import sortInterfaces, { RULE_NAME as sortInterfacesName } from '~/rules/sort-interfaces'
import sortJsxProps, { RULE_NAME as sortJsxPropsName } from '~/rules/sort-jsx-props'
import sortNamedImports, { RULE_NAME as sortNamedImportsName } from '~/rules/sort-named-imports'
import sortUnionTypes, { RULE_NAME as sortUnionTypesName } from './rules/sort-union-types'
import { name } from '~/package.json'

let getRulesWithOptions = (options: {
Expand All @@ -14,6 +15,7 @@ let getRulesWithOptions = (options: {
[sortInterfacesName]: ['error'],
[sortJsxPropsName]: ['error'],
[sortNamedImportsName]: ['error'],
[sortUnionTypesName]: ['error'],
}
return Object.fromEntries(
Object.entries(recommendedRules).map(([key, [message, baseOptions = {}]]) => [
Expand All @@ -29,6 +31,7 @@ export default {
[sortInterfacesName]: sortInterfaces,
[sortJsxPropsName]: sortJsxProps,
[sortNamedImportsName]: sortNamedImports,
[sortUnionTypesName]: sortUnionTypes,
},
configs: {
'recommended-natural': getRulesWithOptions({ type: 'natural', order: 'asc' }),
Expand Down

0 comments on commit 3b02609

Please sign in to comment.