Enable various eslint rules (#1796)

## Description:

Enable enforcement of various eslint style rules.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
This commit is contained in:
Scott Anderson
2025-08-13 00:19:27 -04:00
committed by GitHub
parent af8bb9a218
commit b67b62c826
+11 -2
View File
@@ -91,22 +91,31 @@ export default [
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/prefer-for-of": "error",
"array-bracket-newline": ["error", "consistent"],
"array-bracket-spacing": ["error", "never"],
"array-element-newline": ["error", "consistent"],
"arrow-parens": ["error", "always"],
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": ["error", { before: false, after: true }],
"func-call-spacing": ["error", "never"],
"function-call-argument-newline": ["error", "consistent"],
"max-depth": ["error", { max: 5 }],
// "max-len": ["error", { code: 120 }], // TODO: Enable this rule, https://github.com/openfrontio/OpenFrontIO/issues/1785
"max-lines": ["error", { max: 1065, skipBlankLines: true, skipComments: true }],
"max-lines-per-function": ["error", { max: 561 }],
"object-curly-newline": ["error", { multiline: true, consistent: true }],
"object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
"no-loss-of-precision": "error",
"no-multi-spaces": "error",
"object-curly-newline": ["error", { multiline: true, consistent: true }],
"object-curly-spacing": ["error", "always"],
"object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
// "no-undef": "error", // TODO: Enable this rule, https://github.com/openfrontio/OpenFrontIO/issues/1786
"no-unused-vars": "off", // @typescript-eslint/no-unused-vars
"quote-props": ["error", "consistent-as-needed"],
// 'sort-imports': 'error', // TODO: Enable this rule, https://github.com/openfrontio/OpenFrontIO/issues/1787
"space-before-function-paren": ["error", {
anonymous: "always",
named: "never",
asyncArrow: "always",
}],
"space-infix-ops": "off",
},
},