Skip to content

Commit

Permalink
chore: rename rome_js_analyze to biome_js_analyze
Browse files Browse the repository at this point in the history
  • Loading branch information
Conaclos committed Sep 12, 2023
1 parent 106538b commit d500d10
Show file tree
Hide file tree
Showing 1,386 changed files with 667 additions and 664 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ documentation = """
-p rome_*formatter \
-p biome_control_flow \
-p biome_analyze \
-p rome_*analyze \
-p biome_*analyze \
-p biome_*_syntax \
-p biome_*_factory \
-p biome_diagnostics \
Expand Down
16 changes: 8 additions & 8 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
* text=auto eol=lf
crates/biome_js_unicode_table/src/tables.rs linguist-generated=true text=auto eol=lf
**/generated/* linguist-generated=true text=auto eol=lf
crates/rome_js_analyze/src/analyzers.rs linguist-generated=true text=auto eol=lf
crates/rome_js_analyze/src/assists.rs linguist-generated=true text=auto eol=lf
crates/rome_js_analyze/src/semantic_analyzers.rs linguist-generated=true text=auto eol=lf
crates/rome_js_analyze/src/analyzers/*.rs linguist-generated=true text=auto eol=lf
crates/rome_js_analyze/src/assists/*.rs linguist-generated=true text=auto eol=lf
crates/rome_js_analyze/src/semantic_analyzers/*.rs linguist-generated=true text=auto eol=lf
crates/rome_js_analyze/src/registry.rs linguist-generated=true text=auto eol=lf
crates/biome_js_analyze/src/analyzers.rs linguist-generated=true text=auto eol=lf
crates/biome_js_analyze/src/assists.rs linguist-generated=true text=auto eol=lf
crates/biome_js_analyze/src/semantic_analyzers.rs linguist-generated=true text=auto eol=lf
crates/biome_js_analyze/src/analyzers/*.rs linguist-generated=true text=auto eol=lf
crates/biome_js_analyze/src/assists/*.rs linguist-generated=true text=auto eol=lf
crates/biome_js_analyze/src/semantic_analyzers/*.rs linguist-generated=true text=auto eol=lf
crates/biome_js_analyze/src/registry.rs linguist-generated=true text=auto eol=lf
crates/rome_service/src/configuration/linter/rules.rs linguist-generated=true text=auto eol=lf
packages/@biomejs/backend-jsonrpc/src/workspace.ts linguist-generated=true text=auto eol=lf
website/src/pages/lint/rules/**/*.md linguist-generated=true text=auto eol=lf
Expand All @@ -22,6 +22,6 @@ crates/rome_js_formatter/tests/**/*.js.prettier-snap linguist-language=JavaScrip
crates/rome_js_formatter/tests/**/*.ts.snap linguist-language=Markdown
crates/rome_js_formatter/tests/**/*.js.snap linguist-language=Markdown
crates/biome_cli/tests/**/*.snap linguist-language=Markdown
crates/rome_js_analyze/tests/specs/**/*.snap linguist-language=Markdown
crates/biome_js_analyze/tests/specs/**/*.snap linguist-language=Markdown


2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ A-Project:

A-Linter:
- crates/biome_analyze/**
- crates/rome_js_analyze/**
- crates/biome_js_analyze/**
- crates/biome_json_analyze/**

A-Parser:
Expand Down
78 changes: 39 additions & 39 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ biome_flags = { path = "./crates/biome_flags" }
biome_formatter = { version = "0.1.0", path = "./crates/biome_formatter" }
biome_formatter_test = { path = "./crates/biome_formatter_test" }
biome_fs = { path = "./crates/biome_fs" }
biome_js_analyze = { path = "./crates/biome_js_analyze" }
biome_js_factory = { version = "0.2.0", path = "./crates/biome_js_factory" }
biome_js_parser = { path = "./crates/biome_js_parser" }
biome_js_semantic = { path = "./crates/biome_js_semantic" }
Expand All @@ -61,7 +62,6 @@ biome_suppression = { version = "0.2.0", path = "./crates/biome_suppr
biome_test_utils = { path = "./crates/biome_test_utils" }
biome_text_edit = { version = "0.0.1", path = "./crates/biome_text_edit" }
biome_text_size = { version = "0.0.1", path = "./crates/biome_text_size" }
rome_js_analyze = { path = "./crates/rome_js_analyze" }
rome_js_formatter = { path = "./crates/rome_js_formatter" }
rome_service = { path = "./crates/rome_service" }
tests_macros = { path = "./crates/tests_macros" }
Expand Down
6 changes: 3 additions & 3 deletions crates/biome_analyze/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static check.

First, you need to identify the crate where you want to implement the rule.
If the rule is going to be implemented for the JavaScript language (and its super languages),
then the rule will be implemented inside the `rome_js_analyze` crate.
then the rule will be implemented inside the `biome_js_analyze` crate.

Rules are divided by capabilities:

Expand Down Expand Up @@ -77,7 +77,7 @@ Let's say we want to create a new rule called `myRuleName`, which uses the seman
1. Run the command

```shell
just new-lintrule crates/rome_js_analyze/src/semantic_analyzers/nursery myRuleName
just new-lintrule crates/biome_js_analyze/src/semantic_analyzers/nursery myRuleName
```

Rules go in different folders, and the folder depend on the type of query system your rule
Expand Down Expand Up @@ -289,7 +289,7 @@ Stage and commit your changes:

```shell
> git add -A
> git commit -m 'feat(rome_js_analyze): myRuleName'
> git commit -m 'feat(biome_js_analyze): myRuleName'
```

To test if everything is ready, run the following command:
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_aria/src/roles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ impl<'a> AriaRoles {
pub fn get_implicit_role(
&self,
element: &str,
// To generate `attributes`, you can use `rome_js_analyze::aria_services::AriaServices::extract_defined_attributes`
// To generate `attributes`, you can use `biome_js_analyze::aria_services::AriaServices::extract_defined_attributes`
attributes: &HashMap<String, Vec<String>>,
) -> Option<&'static dyn AriaRoleDefinition> {
let result = match element {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors.workspace = true
edition.workspace = true
license.workspace = true
name = "rome_js_analyze"
name = "biome_js_analyze"
repository.workspace = true
version = "0.2.0"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl Case {
/// ### Examples
///
/// ```
/// use rome_js_analyze::utils::case::Case;
/// use biome_js_analyze::utils::case::Case;
///
/// assert_eq!(Case::identify("aHttpServer", /* no effect */ true), Case::Camel);
/// assert_eq!(Case::identify("aHTTPServer", true), Case::Unknown);
Expand Down Expand Up @@ -132,7 +132,7 @@ impl Case {
/// ### Examples
///
/// ```
/// use rome_js_analyze::utils::case::Case;
/// use biome_js_analyze::utils::case::Case;
///
/// assert!(Case::Lower.is_compatible_with(Case::Camel));
/// assert!(Case::Lower.is_compatible_with(Case::Kebab));
Expand Down Expand Up @@ -183,7 +183,7 @@ impl Case {
/// ### Examples
///
/// ```
/// use rome_js_analyze::utils::case::Case;
/// use biome_js_analyze::utils::case::Case;
///
/// assert_eq!(Case::Camel.convert("Http_SERVER"), "httpServer");
/// assert_eq!(Case::Camel.convert("v8-Engine"), "v8Engine");
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: crates/rome_js_analyze/src/utils/rename.rs
source: crates/biome_js_analyze/src/utils/rename.rs
expression: content
---
example.js:1:1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: crates/rome_js_analyze/src/utils/rename.rs
source: crates/biome_js_analyze/src/utils/rename.rs
expression: content
---
example.js ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ fn run_test(input: &'static str, _: &str, _: &str, _: &str) {
if group == "specs" || group == "suppression" {
panic!("the test file must be placed in the {group}/{rule}/<rule-name>/ directory");
}
if rome_js_analyze::metadata().find_rule(group, rule).is_none() {
if biome_js_analyze::metadata()
.find_rule(group, rule)
.is_none()
{
panic!("could not find rule {group}/{rule}");
}

Expand Down Expand Up @@ -103,7 +106,7 @@ pub(crate) fn analyze_and_snap(
let mut code_fixes = Vec::new();
let options = create_analyzer_options(input_file, &mut diagnostics);

let (_, errors) = rome_js_analyze::analyze(&root, filter, &options, source_type, |event| {
let (_, errors) = biome_js_analyze::analyze(&root, filter, &options, source_type, |event| {
if let Some(mut diag) = event.diagnostic() {
for action in event.actions() {
if check_action_type.is_suppression() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: crates/rome_js_analyze/tests/spec_tests.rs
source: crates/biome_js_analyze/tests/spec_tests.rs
expression: invalid.jsx
---
# Input
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: crates/rome_js_analyze/tests/spec_tests.rs
source: crates/biome_js_analyze/tests/spec_tests.rs
expression: valid.jsx
---
# Input
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: crates/rome_js_analyze/tests/spec_tests.rs
source: crates/biome_js_analyze/tests/spec_tests.rs
expression: invalid.jsx
---
# Input
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: crates/rome_js_analyze/tests/spec_tests.rs
source: crates/biome_js_analyze/tests/spec_tests.rs
expression: valid.jsx
---
# Input
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: crates/rome_js_analyze/tests/spec_tests.rs
source: crates/biome_js_analyze/tests/spec_tests.rs
expression: invalid.jsx
---
# Input
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: crates/rome_js_analyze/tests/spec_tests.rs
source: crates/biome_js_analyze/tests/spec_tests.rs
expression: valid.jsx
---
# Input
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: crates/rome_js_analyze/tests/spec_tests.rs
source: crates/biome_js_analyze/tests/spec_tests.rs
expression: invalid.jsx
---
# Input
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: crates/rome_js_analyze/tests/spec_tests.rs
source: crates/biome_js_analyze/tests/spec_tests.rs
expression: invalid.jsx
---
# Input
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: crates/rome_js_analyze/tests/spec_tests.rs
source: crates/biome_js_analyze/tests/spec_tests.rs
expression: valid.jsx
---
# Input
Expand Down
Loading

0 comments on commit d500d10

Please sign in to comment.