Closed Bug 1799465 Opened 3 years ago Closed 1 year ago

Change the jsdoc set-up to be an allow list of failing directores in the top-level .eslintrc.js

Categories

(Developer Infrastructure :: Lint and Formatting, task, P3)

Tracking

(firefox126 fixed)

RESOLVED FIXED
Tracking Status
firefox126 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Following on from bug 1510561, we should re-arrange our ESLint configuration for our jsdocs so that it is controlled from the top-level .eslintrc.js file.

The aims of this are:

  • Provide a central location to check where jsdoc is enabled or not.
  • Make it easier to enable on new directories.
  • Make it default to enabled for new directories/components.

Given where these rules currently are enabled, we should split up browser/ and toolkit/ into sub-directories, whereas I think the rest of the top-level directories can be disabled only if they are currently failing, e.g. something along these lines:

    {
      extends: ["plugin:mozilla/valid-jsdoc"],
      files: ["**/**"],
      excludedFiles: [
        "accessible/**",
        "browser/actors/**",
        "browser/base/**",
        "browser/components/aboutlogins/**",
        "layout/**",
        "dom/**",
      ],
    },

Would this be both require-jsdoc and valid-jsdoc or just valid-jsdoc?

(In reply to trickypr from comment #2)

Would this be both require-jsdoc and valid-jsdoc or just valid-jsdoc?

It would be both, but at the moment I'm reconsidering how we want to enable these. For example, it may be better/easier for us to enable some of automatically fixable rules globally to begin with, which I think would mean that we could have less in the exclude list.

I started playing around with this last week, but I still need to look a bit further.

@trickypr: If you're still interested in this, then I think we could change the config as per my original comment. I'm not sure it is worth trying to auto-fix areas at this stage.

Depends on: 1824173
Assignee: nobody → standard8
Status: NEW → ASSIGNED
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/121f10f1e058 Enable require-jsdoc rules by default, disabling on code where there are existing failures. r=frontend-codestyle-reviewers,migration-reviewers,backup-reviewers,mossop,mconley
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: