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

Commit

Permalink
chore: update VScode section
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Jun 14, 2023
1 parent 171bc0f commit b3340e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
14 changes: 0 additions & 14 deletions website/src/pages/vscode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,3 @@ Enables Rome to handle renames in the workspace (experimental).

Disables formatting, linting, and syntax errors for projects without a `rome.json` file. Requires Rome 12 or newer.
Enabled by default.

## Known limitations

### Configuration per sub-directory

Rome doesn’t yet support loading the `rome.json` file from a directory other than the workspace root ([issue 3576](https://github.com/rome/tools/issues/3576), [issue 3289](https://github.com/rome/tools/issues/3289)). That means it is currently impossible to enable Rome only for a specific sub-folder or to use different configurations for different folders.

### Configuration resolution for multi-root workspaces

Rome isn't yet able to pick up the `rome.json` configuration in [multi-root workspaces](https://code.visualstudio.com/docs/editor/multi-root-workspaces) if the configuration isn't in the first root folder ([issue 3538](https://github.com/rome/tools/issues/3538)). You can work around this limitation by making the folder with the configuration the first root folder of the workspace (drag it to the top).

### Disable Rome for workspaces without a `rome.json` configuration

You can set Rome's [`rome.requireConfiguration`](#romerequireconfiguration) setting to `true` to disable Rome's formatter, linter, and syntax errors for projects without a `rome.json` file.
11 changes: 5 additions & 6 deletions xtask/codegen/src/generate_website.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ export function get() {

/// Generates
pub(crate) fn generate_files() -> Result<()> {
let readme = fs::read_to_string(project_root().join("editors/vscode/README.md"))?;
fs::remove_file(project_root().join("website/src/pages/vscode.mdx")).ok();
let page = format!("{FRONTMATTER}{readme}");
fs::write(project_root().join("website/src/pages/vscode.mdx"), page)?;

if VERSION != "0.0.0" {
let schema_root_folder = project_root().join("website/src/pages/schemas");
let schema_version_folder = schema_root_folder.join(VERSION);
Expand All @@ -40,12 +45,6 @@ pub(crate) fn generate_files() -> Result<()> {
fs::create_dir(schema_version_folder.clone())?;
fs::write(schema_js_file.clone(), SCHEMA_TEMPLATE)?;
}
fs::remove_file(project_root().join("website/src/pages/vscode.mdx")).ok();
let readme = fs::read_to_string(project_root().join("editors/vscode/README.md"))?;

let page = format!("{FRONTMATTER}{readme}");

fs::write(project_root().join("website/src/pages/vscode.mdx"), page)?;

Ok(())
}

0 comments on commit b3340e4

Please sign in to comment.