This unifies the current set of two dedicated scripts for running ESLint
and stylelint into a single script, with a single npm run-script
command. We need to migrate the Infra and devtools-internal before we
can fully remove the old scripts.
Bug: 360832181
Change-Id: Ifb98d882d951fb3e1c9d7ff8aae22c8d844ced55
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5796886
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Currently calculating the path to chromium's root directory returns an empty string on Windows because the path used to compare against the executable path is not normalized.
```
PATH_TO_EXECUTED_FILE.indexOf(devtoolsPath)
```
Becomes
```
'D:\\drive\chromium\src\third_party\devtool-frontend\src\...'.indexOf('src/third_party/devtools-frontend'); -> -1 on Windows
```
The fix is to use the normalizedPath variable to return the correct substring.
Change-Id: Ia12232f3746466f3257975d652342ac8b9ed2578
Bug: none
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3703315
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: John Emau <John.Emau@microsoft.com>
I use the standalone devtools-frontend checkout process like most people
working on devtools, however I placed this repo inside chromium here:
D:\dev\chromium\devtools\devtools-frontend
This way I have both src and devtools-frontend side by side.
I just realized that this prevented me from running the css linter.
Indeed, run_lint_check_css.js tries to find the path to stylelint exe
file based on whether devtools is standalone or integrated in
chromium.src.
If it sees a directory named chromium inside the path, it assumes
devtools is integrated in chromium.src which, in my case, is wrong.
The change attempts to make this logic a little bit more safe by
checking a longer part of the path.
This resolves my issue.
Bug: 1198532
Change-Id: I872429da0751280bef5a4ec68602001421f55056
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2821855
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Brandon Walderman <brwalder@microsoft.com>
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
This CL lands the initial new run_test_suite.js that can take its
configuration from a config JSON file, or from flags.
This new script is only used to run `npm run auto-interactionstest`
and nothing more; I want to roll it out slowly and ensure that
everyone is aware of it before removing the old Python script. I will
create a doc with all the various steps, and required documentation,
as I've taken the chance to rename some options to make them clearer.
Bug: chromium:1186163
Change-Id: I5a199f82ac7ab0f323988acacaa7aae2d64e6349
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2763866
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
As part of the work to move more scripts to Node, not Python, over time,
picked this one as the starting point. I changed its API slightly to
allow more flags to be taken in, as we'll need that to do a stylelint
pass against TypeScript files, but I will do that in a subsequent CL.
I had to make quite a few changes to devtools_paths.js, but I think it's
now calculating paths correctly. It took a bit of messing to get the
equivalent of Python's path.abspath(__file__), as you'll see from the
large comment that tries to explain what's going on!
Bug: chromium:1166108, chromium:1166572
Change-Id: Ia0b19ff8956b2ede2447530be57876a88046887e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2631113
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
This is not complete in that it doesn't expose all the same paths, but
I'd rather have people add to them as they go. I've defined the main
paths we'll need - third_party, node and devtools root.
I tested this locally by having it print out the paths and I updated the Python
equivalent to do the same. I ran the commands both locally in my devtools repo
and from the Chromium repository.
Bug: chromium:1166572
Change-Id: Ia0403b9b861d5cf58234bcf16d7ad247184233a4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2626301
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>