Skip to content

tools: strange workaround in doctools #20685

@vsemozhetbyt

Description

@vsemozhetbyt
  1. tools/doc/package.json requires "js-yaml": "^3.5.2":

"js-yaml": "^3.5.2"

  1. tools/doc/node_modules/js-yaml contains only dummy index.js with reexport of js-yaml from ESLint dependency (so the version from the above-mentioned requirement cannot be checked anyway?):

const realJSYaml = path.resolve(
__dirname, '..', '..', '..', // tools/
'node_modules',
'eslint',
'node_modules',
'js-yaml'
);

Why not delete js-yaml from tools/doc/package.json, then delete tools/doc/node_modules/js-yaml and then require js-yaml straight from the ESLint dependency? It is only required here:

const yaml = require('js-yaml');

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.questionIssues that look for answers.toolsIssues and PRs related to the tools directory.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions