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 d18eb22219f25c6f66331cb75441b4ebda1d3b96 Author: Randall Leeds <[email protected]> AuthorDate: Sat May 15 13:29:55 2021 -0700 Simplify the ESLint module resolver configuration --- .eslintrc.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 8fa94f9..ec1ae7d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -18,15 +18,6 @@ * under the License. */ -const babel = require('@babel/core'); - -// Use the root babel.config.js for module resolution. -// Relevant issue: tleunen/eslint-import-resolver-babel-module#89 -const babelConfig = babel.loadPartialConfig({ cwd: __dirname }); -const babelModuleResolver = babelConfig.options.plugins.find( - (item) => item.file.request === 'module-resolver', -); - module.exports = { root: true, extends: ['eslint:recommended', 'plugin:import/recommended', 'prettier'], @@ -67,7 +58,11 @@ module.exports = { settings: { 'import/internal-regex': '^@apache-annotator/', 'import/resolver': { - 'babel-module': babelModuleResolver.options, + 'babel-module': { + babelOptions: { + root: __dirname, + }, + }, }, }, overrides: [
