ESLint Rule: Prefer const
Enforce const for variables that are never reassigned
{
"rules": {
"prefer-const": ["error", {
"destructuring": "any",
"ignoreReadBeforeAssign": false
}]
}
}
RAG for when the codes aren't vibing.
Share and discover code style preferences. Reduce formatting inconsistencies with community-driven style snippets.
Share your preferred code style rules, linting configs, and formatting preferences
Curate collections of snips for your projects or team standards
Fork existing snips and hucks to customize them for your needs
Enforce const for variables that are never reassigned
{
"rules": {
"prefer-const": ["error", {
"destructuring": "any",
"ignoreReadBeforeAssign": false
}]
}
}
Use 2 spaces for indentation
{
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true
}