mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-27 06:52:44 +00:00
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:
+11
-2
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user