Dot Mozilla Reference

This linter is to help ensure that new code that adds references to “.mozilla” does not do so without ensuring that X Desktop Group (XDG) configuration path handling is taken care of.

The XDG Base Directory Specification provides a set of environment variables as well as directories that applications should follow to store their data: configurations, states, caches etc.

Firefox originally used $HOME/.mozilla but after Firefox 143 (bug 259356), it will prefer the environment variables over the legacy location.

If you are adding a path that would reference .mozilla, then you should:

If you are adding code that uses .mozilla for something other than referencing the data path, then you may:

Run Locally

The mozlint integration of codespell can be run using mach:

$ mach lint --linter dot-mozilla-reference <file paths>

Configuration

This linter is enabled on the whole code base. See the description above for details on handling exclusions.

Sources