Re-enable prettier for self-hosted code
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox114 | --- | affected |
People
(Reporter: standard8, Unassigned)
References
(Blocks 1 open bug)
Details
I've been working on separating the running of ESLint and Prettier into separate processes (bug 1809497). We need to do this for various reasons, and I'm hoping to land it this week, so that I can then have time to prepare for the next stage ready for the 115 cycle.
Unfortunately, I didn't realise that we had done specific work to get prettier enabled for the self-hosted code (bug 1782273). Due to the separation of ESLint & Prettier, the preprocessor will no longer work for the self-hosted code.
I think there's a couple of options here:
-
See if we can get a Prettier plugin working, we might be able to re-use some of the code from the ESlint plugin.
-
I have no knowledge about where the code comes from or how it is constructed, but would it be possible to avoid the preprocessing for most of the files, by doing something similar to AppConstants? This would avoid needing to do extra work in future, but maybe there is something preventing this?
Comment 1•2 years ago
|
||
(In reply to Mark Banner (:standard8) from comment #0)
- I have no knowledge about where the code comes from or how it is constructed, but would it be possible to avoid the preprocessing for most of the files, by doing something similar to AppConstants? This would avoid needing to do extra work in future, but maybe there is something preventing this?
No, it's not possible to avoid the preprocessor directives in self-hosted code. They're used to ifdef-out parts we don't ship in release (debug or nightly-only features), macros are used for assertions, RegExp codes #include
s other files, etc.
Updated•2 years ago
|
Description
•