I cannot properly configure sublime-build “file_regex” for relative file path in the CLI output.
This is the case when I use npm/yarn script react-scripts start
from create-react-app.
For example, the project path is ~/projects/projectOne
, and the build output is:
src/subfolder1/model/file1.ts
Line 66:19: The object literal notation {} is preferrable no-new-object
src/subfolder2/pages/subfolder3/file2.tsx
Line 18:5: 'myConsent' is assigned a value but never used @typescript-eslint/no-unused-vars
Line 80:7: 'MyConsent' is assigned a value but never used @typescript-eslint/no-unused-vars
Double click on src/subfolder1/model/file1.ts
does nothing. Probably because
only part of the full file path (~/projects/projectOne/src/subfolder1/model/file1.ts
)
is displayed (src/subfolder1/model/file1.ts
).
This is a build config I use:
{
"name": "yarn dev",
"target": "terminus_exec",
"cancel": "terminus_cancel_build",
"shell_cmd": "yarn dev",
"working_dir": "$project_path",
"file_regex": "^(\\S+)\\W+Line (\\d+)\\:(\\d+): ([^\\n]+)",
"line_regex": "^ Line (\\d+)\\:(\\d+): ([^\\n]+)"
}
Any hint how to prefix file path with $project_path
for double click or F4 in build output?
Thank you, Mario