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

Commit

Permalink
change rule name
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Jun 21, 2023
1 parent a8575d8 commit 6cf78d5
Show file tree
Hide file tree
Showing 14 changed files with 52 additions and 47 deletions.
2 changes: 1 addition & 1 deletion crates/rome_diagnostics_categories/src/categories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ define_categories! {
"lint/nursery/useLiteralKeys": "https://docs.rome.tools/lint/rules/useLiteralKeys",
"lint/nursery/useSimpleNumberKeys": "https://docs.rome.tools/lint/rules/useSimpleNumberKeys",
"lint/nursery/noStaticOnlyClass": "https://docs.rome.tools/lint/rules/noStaticOnlyClass",
"lint/nursery/noDuplicateKeys": "https://docs.rome.tools/lint/rules/noDuplicateKeys",
"lint/nursery/noDuplicateJsonKeys": "https://docs.rome.tools/lint/rules/noDuplicateJsonKeys",
"lint/nursery/useNamingConvention": "https://docs.rome.tools/lint/rules/useNamingConvention",
// Insert new nursery rule here

Expand Down
4 changes: 2 additions & 2 deletions crates/rome_json_analyze/src/analyzers/nursery.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Generated file, do not edit by hand, see `xtask/codegen`

use rome_analyze::declare_group;
pub(crate) mod no_duplicate_keys;
declare_group! { pub (crate) Nursery { name : "nursery" , rules : [self :: no_duplicate_keys :: NoDuplicateKeys ,] } }
pub(crate) mod no_duplicate_json_keys;
declare_group! { pub (crate) Nursery { name : "nursery" , rules : [self :: no_duplicate_json_keys :: NoDuplicateJsonKeys ,] } }
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ declare_rule! {
/// "secondTitle": "Second title"
/// }
/// ```
pub(crate) NoDuplicateKeys {
pub(crate) NoDuplicateJsonKeys {
version: "next",
name: "noDuplicateKeys",
name: "noDuplicateJsonKeys",
recommended: true,
}
}
Expand All @@ -40,7 +40,7 @@ pub(crate) struct DuplicatedKeys {
duplicated_keys: Vec<TextRange>,
}

impl Rule for NoDuplicateKeys {
impl Rule for NoDuplicateJsonKeys {
type Query = Ast<JsonObjectValue>;
type State = DuplicatedKeys;
type Signals = Option<Self::State>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ expression: invalid.json

# Diagnostics
```
invalid.json:2:2 lint/nursery/noDuplicateKeys ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
invalid.json:2:2 lint/nursery/noDuplicateJsonKeys ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! The key foo was already declared.
Expand Down
27 changes: 16 additions & 11 deletions crates/rome_service/src/configuration/linter/rules.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions crates/rome_service/src/configuration/parse/json/rules.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions editors/vscode/configuration_schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions npm/backend-jsonrpc/src/workspace.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions npm/rome/configuration_schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions website/src/pages/lint/rules/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -933,16 +933,16 @@ Disallow the use of <code>console.log</code>
Disallow constant expressions in conditions
</section>
<section class="rule">
<h3 data-toc-exclude id="noDuplicateJsxProps">
<a href="/lint/rules/noDuplicateJsxProps">noDuplicateJsxProps</a>
<h3 data-toc-exclude id="noDuplicateJsonKeys">
<a href="/lint/rules/noDuplicateJsonKeys">noDuplicateJsonKeys</a>
</h3>
Prevents JSX properties to be assigned multiple times.
Disallow two keys with the same name inside a JSON object.
</section>
<section class="rule">
<h3 data-toc-exclude id="noDuplicateKeys">
<a href="/lint/rules/noDuplicateKeys">noDuplicateKeys</a>
<h3 data-toc-exclude id="noDuplicateJsxProps">
<a href="/lint/rules/noDuplicateJsxProps">noDuplicateJsxProps</a>
</h3>
Disallow two keys with the same name inside a JSON object.
Prevents JSX properties to be assigned multiple times.
</section>
<section class="rule">
<h3 data-toc-exclude id="noForEach">
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6cf78d5

Please sign in to comment.