-
-
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
1 parent
b3a7874
commit 3b2f8d6
Showing
33 changed files
with
1,170 additions
and
0 deletions.
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,35 @@ | ||
import type { RuleConfig } from '../rule-config'; | ||
|
||
/** | ||
* Option. | ||
*/ | ||
export type BlockMappingColonIndicatorNewlineOption = 'always' | 'never'; | ||
|
||
/** | ||
* Options. | ||
*/ | ||
export type BlockMappingColonIndicatorNewlineOptions = [ | ||
BlockMappingColonIndicatorNewlineOption?, | ||
]; | ||
|
||
/** | ||
* Enforce consistent line breaks after `:` indicator. | ||
* | ||
* @see [block-mapping-colon-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-colon-indicator-newline.html) | ||
*/ | ||
export type BlockMappingColonIndicatorNewlineRuleConfig = | ||
RuleConfig<BlockMappingColonIndicatorNewlineOptions>; | ||
|
||
/** | ||
* Enforce consistent line breaks after `:` indicator. | ||
* | ||
* @see [block-mapping-colon-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-colon-indicator-newline.html) | ||
*/ | ||
export interface BlockMappingColonIndicatorNewlineRule { | ||
/** | ||
* Enforce consistent line breaks after `:` indicator. | ||
* | ||
* @see [block-mapping-colon-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-colon-indicator-newline.html) | ||
*/ | ||
'yml/block-mapping-colon-indicator-newline': BlockMappingColonIndicatorNewlineRuleConfig; | ||
} |
35 changes: 35 additions & 0 deletions
35
src/rules/yml/block-mapping-question-indicator-newline.d.ts
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,35 @@ | ||
import type { RuleConfig } from '../rule-config'; | ||
|
||
/** | ||
* Option. | ||
*/ | ||
export type BlockMappingQuestionIndicatorNewlineOption = 'always' | 'never'; | ||
|
||
/** | ||
* Options. | ||
*/ | ||
export type BlockMappingQuestionIndicatorNewlineOptions = [ | ||
BlockMappingQuestionIndicatorNewlineOption?, | ||
]; | ||
|
||
/** | ||
* Enforce consistent line breaks after `?` indicator. | ||
* | ||
* @see [block-mapping-question-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-question-indicator-newline.html) | ||
*/ | ||
export type BlockMappingQuestionIndicatorNewlineRuleConfig = | ||
RuleConfig<BlockMappingQuestionIndicatorNewlineOptions>; | ||
|
||
/** | ||
* Enforce consistent line breaks after `?` indicator. | ||
* | ||
* @see [block-mapping-question-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-question-indicator-newline.html) | ||
*/ | ||
export interface BlockMappingQuestionIndicatorNewlineRule { | ||
/** | ||
* Enforce consistent line breaks after `?` indicator. | ||
* | ||
* @see [block-mapping-question-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-question-indicator-newline.html) | ||
*/ | ||
'yml/block-mapping-question-indicator-newline': BlockMappingQuestionIndicatorNewlineRuleConfig; | ||
} |
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 type BlockMappingOption = | ||
| ('always' | 'never') | ||
| { | ||
singleline?: 'always' | 'never' | 'ignore'; | ||
multiline?: 'always' | 'never' | 'ignore'; | ||
}; | ||
|
||
/** | ||
* Options. | ||
*/ | ||
export type BlockMappingOptions = [BlockMappingOption?]; | ||
|
||
/** | ||
* Require or disallow block style mappings. | ||
* | ||
* @see [block-mapping](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping.html) | ||
*/ | ||
export type BlockMappingRuleConfig = RuleConfig<BlockMappingOptions>; | ||
|
||
/** | ||
* Require or disallow block style mappings. | ||
* | ||
* @see [block-mapping](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping.html) | ||
*/ | ||
export interface BlockMappingRule { | ||
/** | ||
* Require or disallow block style mappings. | ||
* | ||
* @see [block-mapping](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping.html) | ||
*/ | ||
'yml/block-mapping': BlockMappingRuleConfig; | ||
} |
43 changes: 43 additions & 0 deletions
43
src/rules/yml/block-sequence-hyphen-indicator-newline.d.ts
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,43 @@ | ||
import type { RuleConfig } from '../rule-config'; | ||
|
||
/** | ||
* Config. | ||
*/ | ||
export interface BlockSequenceHyphenIndicatorNewlineConfig { | ||
nestedHyphen?: 'always' | 'never'; | ||
} | ||
|
||
/** | ||
* Option. | ||
*/ | ||
export type BlockSequenceHyphenIndicatorNewlineOption = 'always' | 'never'; | ||
|
||
/** | ||
* Options. | ||
*/ | ||
export type BlockSequenceHyphenIndicatorNewlineOptions = [ | ||
BlockSequenceHyphenIndicatorNewlineOption?, | ||
BlockSequenceHyphenIndicatorNewlineConfig?, | ||
]; | ||
|
||
/** | ||
* Enforce consistent line breaks after `-` indicator. | ||
* | ||
* @see [block-sequence-hyphen-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence-hyphen-indicator-newline.html) | ||
*/ | ||
export type BlockSequenceHyphenIndicatorNewlineRuleConfig = | ||
RuleConfig<BlockSequenceHyphenIndicatorNewlineOptions>; | ||
|
||
/** | ||
* Enforce consistent line breaks after `-` indicator. | ||
* | ||
* @see [block-sequence-hyphen-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence-hyphen-indicator-newline.html) | ||
*/ | ||
export interface BlockSequenceHyphenIndicatorNewlineRule { | ||
/** | ||
* Enforce consistent line breaks after `-` indicator. | ||
* | ||
* @see [block-sequence-hyphen-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence-hyphen-indicator-newline.html) | ||
*/ | ||
'yml/block-sequence-hyphen-indicator-newline': BlockSequenceHyphenIndicatorNewlineRuleConfig; | ||
} |
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 type BlockSequenceOption = | ||
| ('always' | 'never') | ||
| { | ||
singleline?: 'always' | 'never' | 'ignore'; | ||
multiline?: 'always' | 'never' | 'ignore'; | ||
}; | ||
|
||
/** | ||
* Options. | ||
*/ | ||
export type BlockSequenceOptions = [BlockSequenceOption?]; | ||
|
||
/** | ||
* Require or disallow block style sequences. | ||
* | ||
* @see [block-sequence](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence.html) | ||
*/ | ||
export type BlockSequenceRuleConfig = RuleConfig<BlockSequenceOptions>; | ||
|
||
/** | ||
* Require or disallow block style sequences. | ||
* | ||
* @see [block-sequence](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence.html) | ||
*/ | ||
export interface BlockSequenceRule { | ||
/** | ||
* Require or disallow block style sequences. | ||
* | ||
* @see [block-sequence](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence.html) | ||
*/ | ||
'yml/block-sequence': BlockSequenceRuleConfig; | ||
} |
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,35 @@ | ||
import type { RuleConfig } from '../rule-config'; | ||
|
||
/** | ||
* Option. | ||
*/ | ||
export interface FileExtensionOption { | ||
extension?: 'yaml' | 'yml'; | ||
caseSensitive?: boolean; | ||
} | ||
|
||
/** | ||
* Options. | ||
*/ | ||
export type FileExtensionOptions = [FileExtensionOption?]; | ||
|
||
/** | ||
* Enforce YAML file extension. | ||
* | ||
* @see [file-extension](https://ota-meshi.github.io/eslint-plugin-yml/rules/file-extension.html) | ||
*/ | ||
export type FileExtensionRuleConfig = RuleConfig<FileExtensionOptions>; | ||
|
||
/** | ||
* Enforce YAML file extension. | ||
* | ||
* @see [file-extension](https://ota-meshi.github.io/eslint-plugin-yml/rules/file-extension.html) | ||
*/ | ||
export interface FileExtensionRule { | ||
/** | ||
* Enforce YAML file extension. | ||
* | ||
* @see [file-extension](https://ota-meshi.github.io/eslint-plugin-yml/rules/file-extension.html) | ||
*/ | ||
'yml/file-extension': FileExtensionRuleConfig; | ||
} |
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,39 @@ | ||
import type { RuleConfig } from '../rule-config'; | ||
|
||
/** | ||
* Option. | ||
*/ | ||
export type FlowMappingCurlyNewlineOption = | ||
| ('always' | 'never') | ||
| { | ||
multiline?: boolean; | ||
minProperties?: number; | ||
consistent?: boolean; | ||
}; | ||
|
||
/** | ||
* Options. | ||
*/ | ||
export type FlowMappingCurlyNewlineOptions = [FlowMappingCurlyNewlineOption?]; | ||
|
||
/** | ||
* Enforce consistent line breaks inside braces. | ||
* | ||
* @see [flow-mapping-curly-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-newline.html) | ||
*/ | ||
export type FlowMappingCurlyNewlineRuleConfig = | ||
RuleConfig<FlowMappingCurlyNewlineOptions>; | ||
|
||
/** | ||
* Enforce consistent line breaks inside braces. | ||
* | ||
* @see [flow-mapping-curly-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-newline.html) | ||
*/ | ||
export interface FlowMappingCurlyNewlineRule { | ||
/** | ||
* Enforce consistent line breaks inside braces. | ||
* | ||
* @see [flow-mapping-curly-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-newline.html) | ||
*/ | ||
'yml/flow-mapping-curly-newline': FlowMappingCurlyNewlineRuleConfig; | ||
} |
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,44 @@ | ||
import type { RuleConfig } from '../rule-config'; | ||
|
||
/** | ||
* Config. | ||
*/ | ||
export interface FlowMappingCurlySpacingConfig { | ||
arraysInObjects?: boolean; | ||
objectsInObjects?: boolean; | ||
} | ||
|
||
/** | ||
* Option. | ||
*/ | ||
export type FlowMappingCurlySpacingOption = 'always' | 'never'; | ||
|
||
/** | ||
* Options. | ||
*/ | ||
export type FlowMappingCurlySpacingOptions = [ | ||
FlowMappingCurlySpacingOption?, | ||
FlowMappingCurlySpacingConfig?, | ||
]; | ||
|
||
/** | ||
* Enforce consistent spacing inside braces. | ||
* | ||
* @see [flow-mapping-curly-spacing](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-spacing.html) | ||
*/ | ||
export type FlowMappingCurlySpacingRuleConfig = | ||
RuleConfig<FlowMappingCurlySpacingOptions>; | ||
|
||
/** | ||
* Enforce consistent spacing inside braces. | ||
* | ||
* @see [flow-mapping-curly-spacing](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-spacing.html) | ||
*/ | ||
export interface FlowMappingCurlySpacingRule { | ||
/** | ||
* Enforce consistent spacing inside braces. | ||
* | ||
* @see [flow-mapping-curly-spacing](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-spacing.html) | ||
*/ | ||
'yml/flow-mapping-curly-spacing': FlowMappingCurlySpacingRuleConfig; | ||
} |
Oops, something went wrong.