.eslintrc.json
{
"env": {
"commonjs": true,
"es6": true,
"node": true
},
"extends": ["prettier", "airbnb-base"],
"plugins": ["prettier"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
"prettier/prettier": "error"
}
}
.prettierrc.json
{
"printWidth": 80,
"singleQuote": true,
"trailingComma": "es5"
}
When formatting the code, prettier adds a trailing comma, but it also gives me an error saying that it should be removed. Even if we remove the trailing comma, eslint tells me the opposite, that it should be added. Please tell me the solution to the problem
I also tried changing the eslint rule "prettier / prettier": ["error", {"endOfLine": "auto"}] and it didn't work