-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
579 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type { SortArrayIncludesRule } from './sort-array-includes'; | ||
import type { SortClassesRule } from './sort-classes'; | ||
import type { SortEnumsRule } from './sort-enums'; | ||
import type { SortImportsRule } from './sort-imports'; | ||
import type { SortInterfacesRule } from './sort-interfaces'; | ||
import type { SortJsxPropsRule } from './sort-jsx-props'; | ||
import type { SortMapElementsRule } from './sort-map-elements'; | ||
import type { SortNamedExportsRule } from './sort-named-exports'; | ||
import type { SortNamedImportsRule } from './sort-named-imports'; | ||
import type { SortObjectTypesRule } from './sort-object-types'; | ||
import type { SortObjectsRule } from './sort-objects'; | ||
import type { SortUnionTypesRule } from './sort-union-types'; | ||
|
||
/** | ||
* All Perfectionist rules. | ||
*/ | ||
export type PerfectionistRules = SortArrayIncludesRule & | ||
SortClassesRule & | ||
SortEnumsRule & | ||
SortImportsRule & | ||
SortInterfacesRule & | ||
SortJsxPropsRule & | ||
SortMapElementsRule & | ||
SortNamedExportsRule & | ||
SortNamedImportsRule & | ||
SortObjectTypesRule & | ||
SortObjectsRule & | ||
SortUnionTypesRule; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import type { RuleConfig } from '../rule-config'; | ||
|
||
/** | ||
* Option. | ||
*/ | ||
export interface SortArrayIncludesOption { | ||
type?: 'alphabetical' | 'natural' | 'line-length'; | ||
order?: 'asc' | 'desc'; | ||
'ignore-case'?: boolean; | ||
'spread-last'?: boolean; | ||
} | ||
|
||
/** | ||
* Options. | ||
*/ | ||
export type SortArrayIncludesOptions = [SortArrayIncludesOption?]; | ||
|
||
/** | ||
* Enforce sorted arrays before include method. | ||
* | ||
* @see [sort-array-includes](https://eslint-plugin-perfectionist.azat.io/rules/sort-array-includes) | ||
*/ | ||
export type SortArrayIncludesRuleConfig = RuleConfig<SortArrayIncludesOptions>; | ||
|
||
/** | ||
* Enforce sorted arrays before include method. | ||
* | ||
* @see [sort-array-includes](https://eslint-plugin-perfectionist.azat.io/rules/sort-array-includes) | ||
*/ | ||
export interface SortArrayIncludesRule { | ||
/** | ||
* Enforce sorted arrays before include method. | ||
* | ||
* @see [sort-array-includes](https://eslint-plugin-perfectionist.azat.io/rules/sort-array-includes) | ||
*/ | ||
'perfectionist/sort-array-includes': SortArrayIncludesRuleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import type { RuleConfig } from '../rule-config'; | ||
|
||
/** | ||
* Option. | ||
*/ | ||
export interface SortClassesOption { | ||
type?: 'alphabetical' | 'natural' | 'line-length'; | ||
'ignore-case'?: boolean; | ||
order?: 'asc' | 'desc'; | ||
groups?: any[]; | ||
} | ||
|
||
/** | ||
* Options. | ||
*/ | ||
export type SortClassesOptions = [SortClassesOption?]; | ||
|
||
/** | ||
* Enforce sorted classes. | ||
* | ||
* @see [sort-classes](https://eslint-plugin-perfectionist.azat.io/rules/sort-classes) | ||
*/ | ||
export type SortClassesRuleConfig = RuleConfig<SortClassesOptions>; | ||
|
||
/** | ||
* Enforce sorted classes. | ||
* | ||
* @see [sort-classes](https://eslint-plugin-perfectionist.azat.io/rules/sort-classes) | ||
*/ | ||
export interface SortClassesRule { | ||
/** | ||
* Enforce sorted classes. | ||
* | ||
* @see [sort-classes](https://eslint-plugin-perfectionist.azat.io/rules/sort-classes) | ||
*/ | ||
'perfectionist/sort-classes': SortClassesRuleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import type { RuleConfig } from '../rule-config'; | ||
|
||
/** | ||
* Option. | ||
*/ | ||
export interface SortEnumsOption { | ||
type?: 'alphabetical' | 'natural' | 'line-length'; | ||
'ignore-case'?: boolean; | ||
order?: 'asc' | 'desc'; | ||
} | ||
|
||
/** | ||
* Options. | ||
*/ | ||
export type SortEnumsOptions = [SortEnumsOption?]; | ||
|
||
/** | ||
* Enforce sorted TypeScript enums. | ||
* | ||
* @see [sort-enums](https://eslint-plugin-perfectionist.azat.io/rules/sort-enums) | ||
*/ | ||
export type SortEnumsRuleConfig = RuleConfig<SortEnumsOptions>; | ||
|
||
/** | ||
* Enforce sorted TypeScript enums. | ||
* | ||
* @see [sort-enums](https://eslint-plugin-perfectionist.azat.io/rules/sort-enums) | ||
*/ | ||
export interface SortEnumsRule { | ||
/** | ||
* Enforce sorted TypeScript enums. | ||
* | ||
* @see [sort-enums](https://eslint-plugin-perfectionist.azat.io/rules/sort-enums) | ||
*/ | ||
'perfectionist/sort-enums': SortEnumsRuleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import type { RuleConfig } from '../rule-config'; | ||
|
||
/** | ||
* Option. | ||
*/ | ||
export interface SortImportsOption { | ||
type?: 'alphabetical' | 'natural' | 'line-length'; | ||
order?: 'asc' | 'desc'; | ||
'ignore-case'?: boolean; | ||
groups?: any[]; | ||
'internal-pattern'?: any[]; | ||
'newlines-between'?: 'ignore' | 'always' | 'never'; | ||
'read-tsconfig'?: boolean; | ||
} | ||
|
||
/** | ||
* Options. | ||
*/ | ||
export type SortImportsOptions = [SortImportsOption?]; | ||
|
||
/** | ||
* Enforce sorted imports. | ||
* | ||
* @see [sort-imports](https://eslint-plugin-perfectionist.azat.io/rules/sort-imports) | ||
*/ | ||
export type SortImportsRuleConfig = RuleConfig<SortImportsOptions>; | ||
|
||
/** | ||
* Enforce sorted imports. | ||
* | ||
* @see [sort-imports](https://eslint-plugin-perfectionist.azat.io/rules/sort-imports) | ||
*/ | ||
export interface SortImportsRule { | ||
/** | ||
* Enforce sorted imports. | ||
* | ||
* @see [sort-imports](https://eslint-plugin-perfectionist.azat.io/rules/sort-imports) | ||
*/ | ||
'perfectionist/sort-imports': SortImportsRuleConfig; | ||
} |
Oops, something went wrong.