[IMP] web: enable prefer-const and curly rules in eslint config
The prefer-const rule disallows using const on variables that are never reassigned, this improves readability by allowing the reader to know in advance that all variables that are declared with const are never reassigned and all variables declared with let will eventually be reassigned. The curly rule disallows braceless if/else, for and while which is a rule we have thus far been enforcing by hand. Part-of: odoo/odoo#97286
This commit is contained in:
@@ -19,7 +19,9 @@
|
||||
"no-unsafe-negation": ["error"],
|
||||
"no-duplicate-imports": ["error"],
|
||||
"valid-typeof": ["error"],
|
||||
"no-unused-vars": ["error", { "vars": "all", "args": "none", "ignoreRestSiblings": false, "caughtErrors": "all", "caughtErrorsIgnorePattern": "^_" }]
|
||||
"no-unused-vars": ["error", { "vars": "all", "args": "none", "ignoreRestSiblings": false, "caughtErrors": "all", "caughtErrorsIgnorePattern": "^_" }],
|
||||
"curly": ["error", "all"],
|
||||
"prefer-const": ["error"]
|
||||
},
|
||||
"globals": {
|
||||
"owl": "readonly",
|
||||
|
||||
Reference in New Issue
Block a user