import-js/eslint-plugin-import

`namespaces` rule doesn't respect scopes

开放

#1,167 创建于 2018年9月10日

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

仓库指标

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

描述

repro:

import React from 'react'
import * as wizards from './wizards'

// `wizards` redefined in local scope
function ComponentX({ wizards, submitWizard }) {
  return (
    <div>
      { shouldShowWizard && !isEmpty(wizards)
        // unable to validate computed reference report here at `wizards[0]`
        ? <WizardZero {...wizards[0]} onSubmit={submitWizard} /> 
        : <WhateverElse />
      }
    </div>
  )
}

pretty corner-y case but just making a note

贡献者指南