mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-03-07 10:43:38 +00:00
style: some minor style improvements
This commit is contained in:
@@ -27,21 +27,26 @@ export default tseslint.config(
|
||||
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
|
||||
|
||||
// imports
|
||||
"simple-import-sort/imports": "error",
|
||||
"simple-import-sort/exports": "error",
|
||||
"simple-import-sort/imports": "error",
|
||||
|
||||
// brackets
|
||||
// core
|
||||
"curly": "error",
|
||||
"@stylistic/brace-style": ["error", "1tbs"],
|
||||
"eqeqeq": "error",
|
||||
"no-console": "error",
|
||||
"no-eval": "error",
|
||||
|
||||
// stylistic
|
||||
"@stylistic/array-bracket-spacing": ["error", "never"],
|
||||
"@stylistic/arrow-parens": ["error", "as-needed"],
|
||||
"@stylistic/brace-style": ["error", "1tbs"],
|
||||
"@stylistic/comma-dangle": ["error", "always-multiline"],
|
||||
"@stylistic/comma-spacing": ["error", { before: false, after: true }],
|
||||
"@stylistic/eol-last": ["error", "always"],
|
||||
"@stylistic/indent": ["error", 4],
|
||||
"@stylistic/jsx-curly-brace-presence": ["error", { props: "never", children: "never" }],
|
||||
"@stylistic/jsx-quotes": ["error", "prefer-double"],
|
||||
"@stylistic/jsx-self-closing-comp": ["error", { component: true, html: true }],
|
||||
"@stylistic/max-len": ["error", {
|
||||
code: 120,
|
||||
ignoreComments: true,
|
||||
@@ -49,6 +54,7 @@ export default tseslint.config(
|
||||
ignoreTemplateLiterals: true,
|
||||
ignoreUrls: true,
|
||||
}],
|
||||
"@stylistic/member-delimiter-style": ["error", { multiline: { delimiter: "semi" }, singleline: { delimiter: "semi" } }],
|
||||
"@stylistic/no-extra-parens": ["error", "all"],
|
||||
"@stylistic/no-multi-spaces": "error",
|
||||
"@stylistic/no-multiple-empty-lines": ["error", { max: 1 }],
|
||||
@@ -58,10 +64,14 @@ export default tseslint.config(
|
||||
"@stylistic/semi": ["error", "always"],
|
||||
|
||||
// typescript
|
||||
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
|
||||
"@typescript-eslint/consistent-type-imports": ["error", { prefer: "type-imports" }],
|
||||
"@typescript-eslint/explicit-function-return-type": ["error", { allowExpressions: true }],
|
||||
"@typescript-eslint/no-deprecated": "error",
|
||||
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
||||
"@typescript-eslint/prefer-nullish-coalescing": "error",
|
||||
"@typescript-eslint/prefer-optional-chain": "error",
|
||||
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user