eslint: Bug report: Comma dangle always throw error
Tell us about your environment
- ESLint Version: v3.12.2
- Node Version: v6.9.1
- npm Version: 4.0.5
What parser (default, Babel-ESLint, etc.) are you using?
default
Please show your full configuration:
{
"globals": {},
"env": {},
"rules": {
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "always-multiline"
}
]
},
"parserOptions": {}
}
What did you do? Please include the actual source code causing the issue.
console.log(
'a'
);
What did you expect to happen?
$> eslint a.js
# No error
What actually happened? Please include the actual, raw output from ESLint.
mondwan@mondwan-All-Series:~/Documents/codeTest/babelEslint$ eslint --print-config .
{
"globals": {},
"env": {},
"rules": {
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "always-multiline"
}
]
},
"parserOptions": {}
}
mondwan@mondwan-All-Series:~/Documents/codeTest/babelEslint$ cat a.js
console.log(
'a'
);
mondwan@mondwan-All-Series:~/Documents/codeTest/babelEslint$ eslint a.js
/home/mondwan/Documents/codeTest/babelEslint/a.js
2:5 error Missing trailing comma comma-dangle
โ 1 problem (1 error, 0 warnings)
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 27 (19 by maintainers)
Commits related to this issue
- Docs: State that functions option only applies in ES2017 (fixes #7809) Add documentation for the comma-dangle rule that states that requiring trailing commas in parameter lists may cause errors in pr... — committed to thenaesh/eslint by thenaesh 7 years ago
- Docs: State that functions option only applies in ES2017 (fixes #7809) Add documentation for the comma-dangle rule that states that requiring trailing commas in parameter lists may cause errors in pr... — committed to thenaesh/eslint by thenaesh 7 years ago
- Docs: State that functions option only applies in ES2017 (fixes #7809) Add documentation for the comma-dangle rule that states that requiring trailing commas in parameter lists may cause errors in pr... — committed to thenaesh/eslint by thenaesh 7 years ago
- Docs: State that functions option only applies in ES2017 (fixes #7809) Add documentation for the comma-dangle rule that states that requiring trailing commas in parameter lists may cause errors in pr... — committed to thenaesh/eslint by thenaesh 7 years ago
- Docs: State that functions option only applies in ES2017 (fixes #7809) Add documentation for the comma-dangle rule that states that requiring trailing commas in parameter lists may cause errors in pr... — committed to thenaesh/eslint by thenaesh 7 years ago
- Docs: State that functions option only applies in ES2017 (fixes #7809) Add documentation for the comma-dangle rule that states that requiring trailing commas in parameter lists may cause errors in pr... — committed to thenaesh/eslint by thenaesh 7 years ago
- Docs: State that functions option only applies in ES2017 (fixes #7809) Add documentation for the comma-dangle rule that states that requiring trailing commas in parameter lists may cause errors in pr... — committed to thenaesh/eslint by thenaesh 7 years ago
I donโt have a position (yet) on attempting to parse. I was only trying to clarify what I was asking @not-an-aardvark the whole time ๐
I could get behind a messaging change that mentions when dangling commas in functions are actually valid. @not-an-aardvark Thoughts?