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

🐛 The Rome check command does not output anything to the console #4784

Closed
1 task done
Mauladen opened this issue Aug 27, 2023 · 8 comments
Closed
1 task done

🐛 The Rome check command does not output anything to the console #4784

Mauladen opened this issue Aug 27, 2023 · 8 comments
Labels
S-To triage Status: user report of a possible bug that needs to be triaged

Comments

@Mauladen
Copy link

Environment information

CLI:
  Version:                      12.1.3
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           windows

Environment:
  ROME_LOG_DIR:                 unset
  NO_COLOR:                     unset
  TERM:                         unset
  JS_RUNTIME_VERSION:           "v18.17.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/8.6.12"

Rome Configuration:
  Status:                       unset

Workspace:
  Open Documents:               0

Discovering running Rome servers...

Incompatible Rome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

i Rage discovered this running server using an incompatible version of Rome.

Server:
  Version:                      <=10.0.0

What happened?

Link to the test repository

  1. If you run the command pnpm rome check .\src\App.tsx we have successfully received error information

image

  1. If you run the command 'pnpm rome check .\src\Header.tsx' we won't get information about errors even though they are there

image

The fact that the error is in this file tells us VS Code with the Rome extension installed

image

Expected result

So that rome check shows Header.tsx diagnostics in this case and not just Apple.tsx

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@Mauladen Mauladen added the S-To triage Status: user report of a possible bug that needs to be triaged label Aug 27, 2023
@strager
Copy link
Contributor

strager commented Aug 27, 2023

What are the values of the rome.lspBin and rome.requireConfiguration VS Code settings?

Which version of the Rome VS Code extension do you have installed?

Hypothesis: Your VS Code extension is using a newer version of Rome (nightly?), but your CLI is using an older version of Rome (12.1.3).

@Mauladen
Copy link
Author

What are the values of the rome.lspBin and rome.requireConfiguration VS Code settings?

Which version of the Rome VS Code extension do you have installed?

Hypothesis: Your VS Code extension is using a newer version of Rome (nightly?), but your CLI is using an older version of Rome (12.1.3).

I will be able to provide you with this information later and most likely you will be right, but we are talking about the version of Rome 2.1.3, which is stable at the moment. In this situation, I provided a screenshot with an error that shows me my VS Code with the Rome extension as proof that there is an error in this file that Rome does not show using it in the console

@strager
Copy link
Contributor

strager commented Aug 28, 2023

we are talking about the version of Rome 2.1.3

We might not be. VS Code could be using a different version of Rome.

@Mauladen
Copy link
Author

we are talking about the version of Rome 2.1.3

We might not be. VS Code could be using a different version of Rome.

I understand that he could have used a different version, but I gave him only as proof that there is an error in the Header.tsx file, but at the same time the installed Rome 2.1.3 using the pnpm rome check command does not give this error, I'm talking now only about the problem in Rome 2.1.3 and the pnpm rome check command. I'm not saying that at the moment the VS Code extension uses Rome 2.1.3, it's just proof that there is an error in the file and the pnpm rome check command using the Rome 2.1.3 version does not show anything

@Mauladen
Copy link
Author

I just want the pnpm rome check command to give me the same result that currently shows the Rome extension for VS Code, even if they use different versions of Rome, I want to rely on the stable version of Rome. I can't use the extension in the same WebSorm because it doesn't exist, so let's just solve this problem together. You have already confirmed that this problem has also manifested itself and it does not manifest itself only on the current assembly from the main branch

@strager
Copy link
Contributor

strager commented Aug 28, 2023

I just want the pnpm rome check command to give me the same result that currently shows the Rome extension for VS Code

In general, if the VS Code extension is using a newer Rome than version 12.1.3, and if you want VS Code's diagnostics to match the CLI's diagnostics, you need to upgrade the Rome CLI to that version which is newer than 12.1.3.

I want to rely on the stable version of Rome

The latest stable version of Rome does have the specific lint rule that I think you're talking about (complexity/useLiteralKeys). In Rome version 12.1.3 it is in the nursery thus is disabled by default. (#4752 (not in 12.1.3) enables it by default.) You can enable this lint rule with Rome version 12.1.3 by editing your rome.json config file. Here's an example rome.json:

{
	"$schema": "https://docs.rome.tools/schemas/12.1.3/schema.json",
	"linter": {
		"enabled": true,
		"rules": {
			"recommended": true,
			"nursery": {
				"useLiteralKeys": "warn"
			}
		}
	}
}

@Mauladen
Copy link
Author

I just want the pnpm rome check command to give me the same result that currently shows the Rome extension for VS Code

In general, if the VS Code extension is using a newer Rome than version 12.1.3, and if you want VS Code's diagnostics to match the CLI's diagnostics, you need to upgrade the Rome CLI to that version which is newer than 12.1.3.

I want to rely on the stable version of Rome

The latest stable version of Rome does have the specific lint rule that I think you're talking about (complexity/useLiteralKeys). In Rome version 12.1.3 it is in the nursery thus is disabled by default. (#4752 (not in 12.1.3) enables it by default.) You can enable this lint rule with Rome version 12.1.3 by editing your rome.json config file. Here's an example rome.json:

{
	"$schema": "https://docs.rome.tools/schemas/12.1.3/schema.json",
	"linter": {
		"enabled": true,
		"rules": {
			"recommended": true,
			"nursery": {
				"useLiteralKeys": "warn"
			}
		}
	}
}

Thank you so much for your help, like everyone else, I will definitely give feedback, but a little later

@Mauladen
Copy link
Author

Hello @strager, I checked everything that you wrote and it really works as you said, thank you very much for your help, as well as everyone else who tried to help

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S-To triage Status: user report of a possible bug that needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants