Skip to content

Instantly share code, notes, and snippets.

@lopezjurip
Last active November 10, 2022 14:55
Show Gist options
  • Save lopezjurip/9cceae76fb274b838f935a7b0c164b65 to your computer and use it in GitHub Desktop.
Save lopezjurip/9cceae76fb274b838f935a7b0c164b65 to your computer and use it in GitHub Desktop.
Easy Rome Tools setup
{
"recommendations": [
"rome.rome",
]
}
{
"typescript.tsdk": "node_modules/typescript/lib",
"editor.defaultFormatter": "rome.rome",
"editor.formatOnSave": true,
}
{
"formatter": {
"enabled": true,
"indentStyle": "space",
"lineWidth": 120,
"ignore": [
"node_modules",
"public",
"generated",
"yarn.lock",
".next",
".vercel",
".git"
]
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"a11y": {
"recommended": true,
"useValidAnchor": "off",
"useAnchorContent": "off",
"useKeyWithClickEvents": "off"
},
"complexity": {
"recommended": true
},
"correctness": {
"recommended": true
},
"nursery": {
"recommended": true
},
"security": {
"recommended": true,
"noDangerouslySetInnerHtml": "warn"
},
"style": {
"recommended": true,
"useOptionalChain": "off"
}
},
"ignore": [
"node_modules",
"public",
"generated",
"yarn.lock",
".next",
".vercel",
".git"
]
}
}
yarn add rome --save-dev
yarn run rome init
# Run both
yarn run rome check . --apply-suggested
yarn run rome format . --write
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment