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

website(docs): Enhance the documentation for the config-path option #4294

Merged
merged 2 commits into from
Mar 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions website/src/pages/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ The maximum allowed size for source code files in bytes.

### `--config-path`

Tell Rome in which path to find the configuration file `rome.json`.

> **Warning**: when passing `--config-path`, the auto discovery of the `rome.json` file is disabled.
Set a directory where to read the `rome.json` configuration file from.
Rome will try to read a `rome.json` configuration file from the specified directory.
This is optional. Rome will try to auto discover a `rome.json` configuration file by default.

> **Important**: when passing `--config-path`, the auto discovery of the `rome.json` configuration file is disabled.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something that I wanted to highlight, was also the fact that when this option is passed, Rome will abort if the configuration is not found. This is different from the default behaviour.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I highlighted the auto discovery feature in the introduction header of the configuration page too. Please take a lookm and I updated the introduction text so that it starts with talking about what configuration is first (Rome has a default configuration) and then mentions the rome.json configuration file in the second paragraph.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the wording to Important: ... primarily because using the --config-path option is not bad per-se (a warning is bad).


## Global Options

Expand Down
5 changes: 3 additions & 2 deletions website/src/pages/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ import CodeBlockHeader from "/components/CodeBlockHeader.astro";

# Configuration

The configuration file is considered **optional**, Rome has good defaults. Use the configuration
file to change those defaults.
Using configuration is considered **optional**, Rome has good defaults. Use the configuration to change those defaults.

The Rome configuration file is named `rome.json` and should be placed in the root directory of your project. The root
directory is usually the directory containing your project's `package.json`.

Rome will try to auto discover a `rome.json` configuration file by default, you do not need to set a path to it.

Here's an example:

<CodeBlockHeader filename="rome.json" />
Expand Down