Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsdoc/no-undefined-types is particularly slow #1334

Open
raineorshine opened this issue Oct 27, 2024 · 0 comments
Open

jsdoc/no-undefined-types is particularly slow #1334

raineorshine opened this issue Oct 27, 2024 · 0 comments

Comments

@raineorshine
Copy link

Reproducible on https://github.com/cybersemics/em. See steps below.

Expected behavior

jsdoc/no-undefined-types should complete within a few seconds.

Actual behavior

jsdoc/no-undefined-types takes 20–40 seconds.

Here is the output of TIMING=1 eslint . with the full eslint config from https://github.com/cybersemics/em:

$ TIMING=1 eslint .
Rule                                        | Time (ms) | Relative
:-------------------------------------------|----------:|--------:
jsdoc/no-undefined-types                    | 34967.171 |    78.0%
prettier/prettier                           |  6415.243 |    14.3%
@typescript-eslint/no-redeclare             |   414.381 |     0.9%
@typescript-eslint/no-unused-vars           |   354.871 |     0.8%
jsdoc/require-description-complete-sentence |   256.207 |     0.6%
jsdoc/check-alignment                       |   217.525 |     0.5%
react/display-name                          |   192.365 |     0.4%
react/no-direct-mutation-state              |   181.148 |     0.4%
jsdoc/check-types                           |   162.873 |     0.4%
jsdoc/check-indentation                     |   159.531 |     0.4%

Here is the output of TIMING=1 eslint . with a minimal eslint config (see below):

Rule                                    | Time (ms) | Relative
:---------------------------------------|----------:|--------:
jsdoc/no-undefined-types                | 20566.286 |    93.8%
@typescript-eslint/no-unused-vars       |   353.893 |     1.6%
react/no-direct-mutation-state          |   203.983 |     0.9%
@typescript-eslint/no-redeclare         |   149.874 |     0.7%
react/no-typos                          |    78.769 |     0.4%
react/require-render-return             |    66.024 |     0.3%
react/jsx-no-target-blank               |    28.896 |     0.1%
no-restricted-globals                   |    26.832 |     0.1%
flowtype/define-flow-type               |    20.690 |     0.1%
@typescript-eslint/no-use-before-define |    19.603 |     0.1%

Steps to Reproduce

  1. git clone https://github.com/cybersemics/em
  2. cd em
  3. yarn
  4. TIMING=1 eslint .

ESLint Config

module.exports = {
  env: {
    browser: true,
    es6: true,
    mocha: true,
    jest: true,
  },
  extends: ['react-app'],
  plugins: ['jsdoc'],
  rules: {
    'jsdoc/no-undefined-types': 2,
  },
}

Environment

  • Node version: v22.0.0
  • ESLint version: v8.57.0
  • eslint-plugin-jsdoc version: v50.4.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants