Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint 某些规则报错位置不准确的修正 #46

Closed
3 tasks
chriswong opened this issue Jan 5, 2015 · 2 comments
Closed
3 tasks

ESLint 某些规则报错位置不准确的修正 #46

chriswong opened this issue Jan 5, 2015 · 2 comments

Comments

@chriswong
Copy link
Member

目前已知的规则有:

  • dot-notation (对应定位节点应为 node.property)
  • space-infix-ops (对应定位节点应为 node.right/node.consequent/node.alternate)
  • no-reserved-keys

需要做的步骤:

  1. 修复后内置,增加 fecs- 前缀;
  2. 去官方报 issues;
  3. 为官方发 PR 或待官方修复发布后移除内置实现,移除配置中相应的 fecs- 前缀。
@zoumiaojiang
Copy link

添加一个触发的rule:
no-reserved-keys

chriswong added a commit that referenced this issue Jan 14, 2015
chriswong added a commit that referenced this issue Jan 14, 2015
chriswong added a commit that referenced this issue Jan 14, 2015
@chriswong
Copy link
Member Author

目前依赖的 eslint 版本为 2.5.1,该版本中,dot-notationspace-infix-ops 的 report 定位问题已经修复,no-reserved-keys 已经移除,被 quote-props 取代,而 quote-propsfecs-properties-quote 行为基本一致,所以在移除 fecs-dot-notationfecs-space-infix-opsfecs-no-reserved-keys,并替换 fecs-properties-quotequote-props 后,issue 可关闭。

补充:由于 quote-props 在设计上同样会导致 report 定位问题,因此保留 fecs-properties-quote,不使用 quote-props

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants