This is an automated email from the ASF dual-hosted git repository. randall pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit 8e249749f5648fb86f8033aa33b2a4e67e06d9c1 Author: Randall Leeds <[email protected]> AuthorDate: Wed Jul 22 21:37:49 2020 -0700 Get Babel module resolver working with TypeScript preset Only partially load the Babel configuration when configuring the ESLint import plugin's resolver, since the TypeScript preset requires a filename to function and there is no filename available without making a custom resolver. --- .eslintrc.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 3145648..32a4ec9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -24,9 +24,9 @@ const babel = require('@babel/core'); // Use the root babel.config.js for module resolution. // Relevant issue: tleunen/eslint-import-resolver-babel-module#89 -const babelOptions = babel.loadOptions({ cwd: __dirname }); -const babelModuleResolver = babelOptions.plugins.find( - ({ key }) => key === 'module-resolver', +const babelConfig = babel.loadPartialConfig({ cwd: __dirname }); +const babelModuleResolver = babelConfig.options.plugins.find( + item => item.file.request === 'module-resolver', ); module.exports = {
