Open
Description
Currently, when eslint-plugin-import-x
finds an import, it will resolve the real path of the module (through the eslint import resolvers), read the file, and then parse the module into the AST using the configured parsers (import-x/parser
) or the default parser (ruleContext.parserPath
). Then eslint-plugin-import-x
tried to extract all exports/imports by walking through AST.
Parse any referenced modules are very heavy tasks, resulting eslint-plugin-import-x
being slow. But if we use something like es-module-lexer
or cjs-module-lexer
to scan the imports/exports we skip the entire parsing-into-AST process and significantly improve performance for a few rules.