From 16c7c1020311c23815c9e00131edccaf717abbe5 Mon Sep 17 00:00:00 2001 From: Artem Zakharchenko Date: Sun, 27 Oct 2024 09:58:35 +0100 Subject: [PATCH] docs: add decision on linting the worker script (#2333) --- decisions/linting-worker-script.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 decisions/linting-worker-script.md diff --git a/decisions/linting-worker-script.md b/decisions/linting-worker-script.md new file mode 100644 index 000000000..c8473ad6b --- /dev/null +++ b/decisions/linting-worker-script.md @@ -0,0 +1,9 @@ +# Linting the worker script + +When linting your application, you may encounter warnings or errors originating from the `mockServiceWorker.js` script. Please refrain from opening pull requests to add the `ignore` pragma comments to the script itself. + +## Solution + +**Make sure that the worker script is ignored by your linting tools**. The worker script isn't a part of your application's code but a static asset. It must be ignored during linting and prettifying in the same way all your static assets in `/public` are ignored. Please configure your tools respectively. + +If there are warnings/errors originating from the worker script, it's likely your public directory is not ignored by your linting tools. You may consider ignoring the entire public directory if that suits your project's conventions.