import-js/eslint-plugin-import

Alias definition in Babel module resolver causes no-relative-parent-imports since v2.15.0

开放

#1,299 创建于 2019年3月11日

 (10 条评论) (2 个反应) (0 位负责人)JavaScript (1,549 个派生)batch import
help wanted

仓库指标

星标
 (5,940 个星标)
PR 合并指标
 (平均合并 138天 22小时) (30 天内合并 3 个 PR)

描述

Since eslint-plugin-import 2.15.0 the following Eslint configuration

settings: {
    'import/resolver': {
      'babel-module': {
        cwd: __dirname,
        alias: {
          $shared: '../shared',
          '~': '.'
        }
      }
    }
  }

causes

  ×   8:38  Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move cli.js to same directory as $shared/kiosk-ui-message-file-reader or consider making $shared/kiosk-ui-message-file-reader a package.    import/no-relative-parent-imports

Is this new behavior intended?

贡献者指南