How can I configure eslint or prettier to stop break useState and object lines? It is ok if it will break the line when the line is too long, but it keeps doing it event if there is a short useState or a small object as you can see at my examples.
from this
const {
movie: { backToListLabel },
} = dictionary
to this
const { movie: { backToListLabel }} = dictionary
eslintrc.json
{
"env": {
"browser": true,
"es2021": true,
"jest": true
},
"extends": [
"plugin:react/recommended",
"standard-with-typescript",
"plugin:prettier/recommended"
],
"overrides": [],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["react", "@typescript-eslint", "prettier"],
"rules": {
"prettier/prettier": "error",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-unused-vars": "warn"
},
"settings": {
"react": {
"version": "detect"
}
}
}
.prettierrc file
{
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
"singleAttributePerLine": true
}