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

[request] using browser-compat-data #6483

Closed
lv7777 opened this issue Jun 20, 2016 · 5 comments
Closed

[request] using browser-compat-data #6483

lv7777 opened this issue Jun 20, 2016 · 5 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion core Relates to ESLint's core APIs and features enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion

Comments

@lv7777
Copy link

lv7777 commented Jun 20, 2016

  1. The version of ESLint you are using.

eslint 2.13.0

  1. The problem you want to solve.

I want to embedding https://github.com/mdn/browser-compat-data

I think this feature provide two effect.

  • more clarity to internal.

I don't know with regard to eslint.(I serched internal of eslint to find where file was exsist that defined webextensions global values,but i cant find.)
but, I think divide file to browser-compat-data.json can be more clarity.

  • currently, eslint has "webextensions" config option on "env" key, this feature can indicate more specific.

e.g.

"env":{
"webextensions":true
}

to

"environment":{
"webextensions":["chrome","firefox","edge"]
}
//or
"environment":{
"chromeextension":true,
"webextension":true
}

  1. The version of ESLint you are using.

eslint 2.13.0

  1. The problem you want to solve.

I want to embedding https://github.com/mdn/browser-compat-data

これを行うことによって2つの効果が見込めます

  • 内部でわかりやすくなる

私はeslintの内部がどうなっているのかわかりません(eslintの内部を調べましたがどこに設定をdefineしたファイルがあるのか、grepしても分かりませんでした。)
しかし、こういう風にファイルを分割して他から読み込むことでわかりやすくなると思います。

  • 現在、environmentに"webextensions"というvalueがあるが、それをもっと詳細に分割できる。
    例、
"env":{
"webextensions":true
}

to

"environment":{
"webextensions":["chrome","firefox","edge"]
}
//or
"environment":{
"chromeextension":true,
"webextension":true
}
@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Jun 20, 2016
@mysticatea mysticatea added enhancement This change enhances an existing feature of ESLint core Relates to ESLint's core APIs and features evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Jun 20, 2016
@mysticatea
Copy link
Member

Thank you for this issue!

In fact, ESLint is importing the values of environments from an external package -- globals
This request is a thing about specific platforms, so I think it's proper as a plugin rather than we add it to core.

実は、ESLint は外部パッケージ (globals) から env の定義をインポートしています。
このリクエストは特定のプラットフォームに関するものなので、私はコアに追加するよりも、プラグインを作る方が適切であると思います。

@lv7777
Copy link
Author

lv7777 commented Jun 20, 2016

実は、ESLint は外部パッケージ (globals) から env の定義をインポートしています。

なるほど。だとするとgrobalesのほうに投げたほうがよかったですかね?

特定のプラットフォーム

ここでいうプラットフォームっていうのはブラウザのことですよね?
ブラウザなら一般的に周知されているし特定というほどではない気がします。
envの"node"も一応プラットフォームに関することですし。

@mysticatea
Copy link
Member

ここでいうプラットフォームっていうのはブラウザのことですよね?

Nope. This request is more specific for each product. Granted, ESLint has env's values for specific products. But unfortunately, we don't want to add more things for specific products into core. Instead, we are recommending making a plugin. (e.g., we didn't accept a Node-specific rule before: #6146)
Plugins are the system to make diversity as preventing the increase of core's responsibility and maintenance cost.

なるほど。だとするとgrobalesのほうに投げたほうがよかったですかね?

Similarly, globals package seems to be not accepting new environment values. (please see README of the package)

@lv7777
Copy link
Author

lv7777 commented Jun 21, 2016

we didn't accept a Node-specific rule before: #6146

I saw that and understand concept of the repo and consent your plan.
So I closing the issue and investigate how to produce eslint plagin.

thanks.

@lv7777
Copy link
Author

lv7777 commented Jun 21, 2016

@lv7777 lv7777 closed this as completed Jun 21, 2016
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion core Relates to ESLint's core APIs and features enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion
Projects
None yet
Development

No branches or pull requests

3 participants