This was accidentally disabled in bug 1920531 with the re-organisation of how eslint-plugin-mozilla worked.
The rule needs to be (re)enabled after eslint-config-prettier is applied, as eslint-config-prettier turns it off by default.
Differential Revision: https://phabricator.services.mozilla.com/D227621
This provides additional "flat/...." configurations which work with the flat config of ESLint. The changes in recommended.js make it easier to handle the two different types of configuration. The changes in index.js are to ensure that the resultant configurations are correct for legacy or flat configs. The index.js changes also inject the plugin object back into itself, as required by ESLint.
Once we have switched mozilla-central to flat configuration, we can drop support for the legacy config.
Differential Revision: https://phabricator.services.mozilla.com/D225705
This makes it easier for subscribers of eslint-plugin-mozilla to use it more generally as a set of recommended
rules. The only environment definitions are for mozilla-specific file types, where we should be safe to specify
them.
Differential Revision: https://phabricator.services.mozilla.com/D225704
This patch fixes an issue where having `skip-if` defined in the test manifests would prevent perfdocs from finding the test even though it exists.
Differential Revision: https://phabricator.services.mozilla.com/D225696
In addition to upgrding our Stylelint packages, this patch also introduces the @stylistic/stylelint-plugin to preserve a number of rules that were completely removed in v16. It also migrates the code for the custom plugin introduced in bug 1838298 to ES Modules.
Differential Revision: https://phabricator.services.mozilla.com/D224250
This patch turns the various nsIGfxInfo::FEATURE_* constants into macros
that can be included to generate C++ code at runtime. This has been done
to automatically generate the necessary bindings for the downloadable
blocklist. This way we will never miss adding the necessary
prerequisities as we have in the past.
Differential Revision: https://phabricator.services.mozilla.com/D224056
This patch lays the foundation for a Mozilla-specific Stylelint plugin that we can continue to expand on with new rules as needed. For the first rule I've implemented a simple check to ensure our color tokens are being used as intended.
Differential Revision: https://phabricator.services.mozilla.com/D223204
Requiring these in eslint-plugin-mozilla seems a bit unnecessary:
* The html plugin is used as a parser and is only required if a project is parsing html.
* Similary, we use the recommended config for the JSON parser, and it only applies for JSON files.
* The prettier option is only required if a project wants to use prettier. Whilst I think we should have prettier for all Mozilla projects, I don't think we need to enforce/require it here.
Differential Revision: https://phabricator.services.mozilla.com/D222628
Switched to library mode for generating bindings.
Updated our strategy for UniFFI components/fixtures. There's now a
crate for components and a crate for fixtures. These crates are a
dependency of gkrust-shared and also built as standalone libraries which
UniFFI uses to generate the bindings.
One upshot of this is that we no longer need the `crate_name` or
`udl_file` config values. library-mode can figure out the udl paths
automatically.
Differential Revision: https://phabricator.services.mozilla.com/D221824
Prefs files in general are allowed to not be UTF-8, but all the prefs
files in tree are UTF-8, so we can lint them with that assumption.
Differential Revision: https://phabricator.services.mozilla.com/D221878
ESLint v9 doesn't support overrides/file specification in the configurations, so we don't want these
now.
The top-level configuration already strips out the overrides for these and handles them separately, so
there's nothing to add - simply remove the 'removeOverrides' function.
Differential Revision: https://phabricator.services.mozilla.com/D221447
This moves the ESLint rule to apply to jsx, system modules and workers. It is excluded from most system
modules by the roll out, which we can work on later. However, it will be enabled where no-shadow is
already enabled - previously these were hidden due to the order in which ESLint was applying the rules.
Differential Revision: https://phabricator.services.mozilla.com/D221444
ESLint v9 doesn't support overrides/file specification in the configurations, so we don't want these
now.
The top-level configuration already strips out the overrides for these and handles them separately, so
there's nothing to add - simply remove the 'removeOverrides' function.
Differential Revision: https://phabricator.services.mozilla.com/D221447
This moves the ESLint rule to apply to jsx, system modules and workers. It is excluded from most system
modules by the roll out, which we can work on later. However, it will be enabled where no-shadow is
already enabled - previously these were hidden due to the order in which ESLint was applying the rules.
Differential Revision: https://phabricator.services.mozilla.com/D221444
The last actual Firefox user of this less-safe feature was removed in 2022.
Thunderbird's sync server still needs it, but apparently that is a prototype
that isn't really working, so they said it was okay to remove this.
Differential Revision: https://phabricator.services.mozilla.com/D220646