Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

Commit a5ef50a

Browse files
committed
chore: remove old code
1 parent 014dc69 commit a5ef50a

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

crates/rome_analyze/CONTRIBUTING.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ inside the `semantic_analyzers` folder
7575
use rome_analyze::context::RuleContext;
7676
7777
impl Rule for UseAwesomeTricks {
78-
const CATEGORY: RuleCategory = RuleCategory::Lint;
7978
type Query = Semantic<JsAnyExpression>;
8079
type State = String;
8180
type Signals = Option<Self::State>;
@@ -84,14 +83,13 @@ inside the `semantic_analyzers` folder
8483
fn run(ctx: &RuleContext<Self>) -> Self::Signals {}
8584
}
8685
```
87-
5. the const `CATEGORY` must be `RuleCategory::Lint` otherwise it won't work
88-
6. the `Query` needs to have the `Semantic` type, because we want to have access to the semantic model.
86+
5. the `Query` needs to have the `Semantic` type, because we want to have access to the semantic model.
8987
`Query` tells the engine on which AST node we want to trigger the rule.
90-
7. The `State` type doesn't have to be used, so it can be considered optional, but it has
88+
6. The `State` type doesn't have to be used, so it can be considered optional, but it has
9189
be defined as `type State = ()`
92-
8. The `run` function must be implemented. This function is called every time the analyzer
90+
7. The `run` function must be implemented. This function is called every time the analyzer
9391
finds a match for the query specified by the rule, and may return zero or more "signals".
94-
9. Implement the optional `diagnostic` function, to tell the user where's the error and why:
92+
8. Implement the optional `diagnostic` function, to tell the user where's the error and why:
9593
```rust,ignore
9694
impl Rule for UseAwesomeTricks {
9795
// .. code
@@ -104,7 +102,7 @@ finds a match for the query specified by the rule, and may return zero or more "
104102
105103
You will have to manually update the file `rome_diagnostics_categories/src/categories.rs` and add a new category
106104
for the new rule you're about to create.
107-
10. Implement the optional `action` function, if we are able to provide automatic code fix to the rule:
105+
9. Implement the optional `action` function, if we are able to provide automatic code fix to the rule:
108106
```rust,ignore
109107
impl Rule for UseAwesomeTricks {
110108
// .. code

0 commit comments

Comments
 (0)