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

🐛 Formatted don't reach file inside specific folder name #4550

Open
1 task done
lu-zen opened this issue Jun 1, 2023 · 4 comments
Open
1 task done

🐛 Formatted don't reach file inside specific folder name #4550

lu-zen opened this issue Jun 1, 2023 · 4 comments
Labels
S-To triage Status: user report of a possible bug that needs to be triaged

Comments

@lu-zen
Copy link

lu-zen commented Jun 1, 2023

Environment information

Hey.

I have a folder named [...next]in my project, for some reason rome is not able to found a .ts file inside this folder.
[...nex] works
[...next] doesn't

Error:

$ node_modules/.bin/rome format \[...next\]/route.ts

$ node_modules/.bin/rome format '[...next]/route.ts'
Compared 0 file(s) in 103µs
internalError/io ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ No files were processed in the specified paths.
  

rome rage

❯ ./node_modules/.bin/rome rage
CLI:
  Version:                      12.1.3
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  ROME_LOG_DIR:                 unset
  NO_COLOR:                     unset
  TERM:                         "xterm-kitty"
  JS_RUNTIME_VERSION:           "v18.16.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "null"

Rome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    true
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Discovering running Rome servers...

rome.json

{
  "$schema": "./node_modules/rome/configuration_schema.json",
  "files": {
    "ignore": [
      "node_modules",
      ".next",
      ".vscode"
    ]
  },
  "organizeImports": {
    "enabled": false
  },
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true
    }
  }
}

What happened?

  1. A .ts file inside a folder named [...next] is not reached by the formatter;

I'm sure the bug is related to the two last entries of the files.ignore prop value of rome.json;

Expected result

File inside the folder to be formatted.

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@lu-zen lu-zen added the S-To triage Status: user report of a possible bug that needs to be triaged label Jun 1, 2023
@ematipico
Copy link
Contributor

That's interesting. Are you able to create a minimal reproduction?

@lu-zen
Copy link
Author

lu-zen commented Jun 13, 2023

@lu-zen
Copy link
Author

lu-zen commented Jun 13, 2023

Looks like the entry ".next" in ignored files makes it ignore [...next] folder, appending a slash solves the issue.

@ematipico
Copy link
Contributor

Going to look after it

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