Skip to content

xo is slow on eslint-plugin-unicorn project #510

@fisker

Description

@fisker

I've locate problems, it's because

xo/index.js

Lines 100 to 105 in 0ec4b8c

const configFiles = (await Promise.all(
(await globby(
CONFIG_FILES.map(configFile => `**/${configFile}`),
{ignore: DEFAULT_IGNORES, gitignore: true, cwd: options.cwd}
)).map(async configFile => configExplorer.load(path.resolve(options.cwd, configFile)))
)).filter(Boolean);

searching xo config files, and eslint-plugin-unicorn has many files in test/integration/fixtures dir, and we can't set config search ignore dirs.

Questions:

  1. Why are we searching config files inside dirs? Shouldn't config file in cwd or above?
  2. Why don't we use cosmiconfig.search? Because it don't know how to mergeOptions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions