Skip to content

Commit

Permalink
fix: avoid source overriding of useConsistentArrayType
Browse files Browse the repository at this point in the history
  • Loading branch information
Conaclos committed Mar 6, 2024
1 parent 3cb83bf commit 5d1a2c8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, FixKind, Rule, RuleDiagnostic,
RuleSource, RuleSourceKind,
};
use biome_console::markup;
use biome_diagnostics::Applicability;
Expand Down Expand Up @@ -52,8 +51,6 @@ declare_rule! {
pub UseShorthandArrayType {
version: "1.0.0",
name: "useShorthandArrayType",
source: RuleSource::EslintTypeScript("array-type"),
source_kind: RuleSourceKind::Inspired,
recommended: false,
deprecated: "Use `useConsistentArrayType` instead.",
fix_kind: FixKind::Unsafe,
Expand Down
1 change: 1 addition & 0 deletions website/src/content/docs/linter/rules-sources.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ description: A page that maps lint rules from other sources to Biome
- [noUnnecessaryContinue](/linter/rules/no-unnecessary-continue)
- [noUnusedImports](/linter/rules/no-unused-imports)
- [noVoidTypeReturn](/linter/rules/no-void-type-return)
- [useShorthandArrayType](/linter/rules/use-shorthand-array-type)
- [useSimpleNumberKeys](/linter/rules/use-simple-number-keys)
- [useSimplifiedLogicExpression](/linter/rules/use-simplified-logic-expression)
- [useSingleCaseStatement](/linter/rules/use-single-case-statement)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ title: useShorthandArrayType (since v1.0.0)

**Diagnostic Category: `lint/style/useShorthandArrayType`**

Inspired from: <a href="https://typescript-eslint.io/rules/array-type" target="_blank"><code>array-type</code></a>

When expressing array types, this rule promotes the usage of `T[]` shorthand instead of `Array<T>`.

## Examples
Expand Down

0 comments on commit 5d1a2c8

Please sign in to comment.