-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add experimentalECMAScriptMoudlesExtension: boolean #10451
Comments
Hi @achun, thanks for the issue. It looks like there's not enough information for us to know how to help you. If you're reporting a bug, please be sure to include:
Requesting a new rule? Please see Proposing a New Rule for instructions. Requesting a rule change? Please see Proposing a Rule Change for instructions. If it's something else, please just provide as much additional information as possible. Thanks! |
needs info??????? Well, I give up this proposal. |
not very sure what you were proposing here, just want to point out |
@aladdin-add 谢谢, 早知道我直接用中文写了, 我英文太差, 长篇的写肯定写崩了. 另外, ECMAScript Modules 这个 .mjs 扩展名(也就是不使用 require, 只使用 import,export) 竟然是实验性的. eslint 的选择,,, 我也是没法儿评论对错了 |
You can run ESLint to search for mjs files:
Or:
And you can also run on both extensions if needed:
Hope this helps! |
@platinumazure Thanks first. I know that way. I need to get support in the configuration. In some environments, using the command line is an obstacle. Such as VS code. 先感谢你, 命令行的方法我是知道的, 我的需求是在配置中得到支持, 有些时候无法方便的使用命令行, 比如在 vs code 中只能通过配置文件来让 eslint 工作. 另外, 还是那个,,,,, 这本应该是标准啊, 现在却难堪的变成了实验性的,,,,, |
@achun You could use glob-based configuration to add specific configuration for .mjs files. |
@platinumazure Thanks. eslint is work for '*.mjs' The configuration .eslintrc.js module.exports = {
"env": {
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"never"
]
}
}; |
The developer chose to use ".mjs" as the extension, indicating that he is very clear that this is experimental and that he is using experimental features.
We know that ecmaFeatures has the experimentalObjectRestSpread option, to follow...
Proposal: add an option in env
The text was updated successfully, but these errors were encountered: