Skip to content

Commit a68989c

Browse files
camc314connorshea
andauthored
Update crates/oxc_linter/src/rules/typescript/no_restricted_types.rs
Co-authored-by: Connor Shea <connor.james.shea@gmail.com> Signed-off-by: Cameron <cameron.clark@hey.com>
1 parent 3a5913a commit a68989c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

crates/oxc_linter/src/rules/typescript/no_restricted_types.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,17 @@ declare_oxc_lint!(
130130
/// ```ts
131131
/// let value: Bar;
132132
/// ```
133+
///
134+
/// Other examples of configuration option setups for this rule:
135+
///
136+
/// - Banning the `Foo` type with just a message, no fixes or suggestions:
137+
/// `{ "types": { "Foo": "Use `OtherType` instead." } }`
138+
///
139+
/// - Banning `Bar` type with suggestion:
140+
/// `{ "types": { "Bar": { "message": "Avoid using `Bar`.", "suggest": "BazQux" } } }`
141+
///
142+
/// - Banning `Object` type with a generic message:
143+
/// `{ "types": { "Object": true } }`
133144
NoRestrictedTypes,
134145
typescript,
135146
restriction,

0 commit comments

Comments
 (0)