diff options
author | Profpatsch <mail@profpatsch.de> | 2024-10-01T01·54+0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2024-10-05T13·49+0000 |
commit | ad711b15a06be8c3f6146f14454621f4a56997ba (patch) | |
tree | 152478301796624f72d976faee435bfe2c7347f9 /users/Profpatsch/lyric/eslint.config.mjs | |
parent | 102c9b30a7ca3b41b0cfcd48f52bdf6c06f259ff (diff) |
chore(users/Profpatsch/lyric): add typescript linting rules r/8766
Change-Id: I9ab0336450519648f7a8edeec94bd64b78e2f05b Reviewed-on: https://cl.tvl.fyi/c/depot/+/12554 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'users/Profpatsch/lyric/eslint.config.mjs')
-rw-r--r-- | users/Profpatsch/lyric/eslint.config.mjs | 91 |
1 files changed, 60 insertions, 31 deletions
diff --git a/users/Profpatsch/lyric/eslint.config.mjs b/users/Profpatsch/lyric/eslint.config.mjs index 189efbd9be4c..1bb60bf639d6 100644 --- a/users/Profpatsch/lyric/eslint.config.mjs +++ b/users/Profpatsch/lyric/eslint.config.mjs @@ -1,6 +1,6 @@ -import tseslint from "typescript-eslint"; -import tsplugin from "@typescript-eslint/eslint-plugin"; -import parser from "@typescript-eslint/parser"; +import tseslint from 'typescript-eslint'; +import tsplugin from '@typescript-eslint/eslint-plugin'; +import parser from '@typescript-eslint/parser'; export default tseslint.config(tseslint.configs.eslintRecommended, { languageOptions: { @@ -9,34 +9,63 @@ export default tseslint.config(tseslint.configs.eslintRecommended, { projectService: true, }, }, - ignores: ["node_modules/", "eslint.config.mjs"], - plugins: { "@typescript-eslint": tsplugin }, + ignores: ['node_modules/', 'eslint.config.mjs'], + plugins: { '@typescript-eslint': tsplugin }, rules: { - "prettier/prettier": "off", - "prefer-const": "warn", - "@typescript-eslint/ban-ts-comment": "warn", - "no-array-constructor": "off", - "@typescript-eslint/no-array-constructor": "warn", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "@typescript-eslint/no-empty-object-type": "warn", - "@typescript-eslint/no-explicit-any": "warn", - "@typescript-eslint/no-extra-non-null-assertion": "warn", - "@typescript-eslint/no-misused-new": "warn", - "@typescript-eslint/no-namespace": "warn", - "@typescript-eslint/no-non-null-asserted-optional-chain": "warn", - "@typescript-eslint/no-require-imports": "warn", - "@typescript-eslint/no-this-alias": "warn", - "@typescript-eslint/no-unnecessary-type-constraint": "warn", - "@typescript-eslint/no-unsafe-declaration-merging": "warn", - "@typescript-eslint/no-unsafe-function-type": "warn", - "@typescript-eslint/strict-boolean-expressions": ["warn"], - "no-unused-expressions": "off", - "@typescript-eslint/no-unused-expressions": "warn", - "no-unused-vars": "off", - "@typescript-eslint/no-unused-vars": "warn", - "@typescript-eslint/no-wrapper-object-types": "warn", - "@typescript-eslint/prefer-as-const": "warn", - "@typescript-eslint/prefer-namespace-keyword": "warn", - "@typescript-eslint/triple-slash-reference": "warn", + 'prettier/prettier': 'off', + 'prefer-const': 'warn', + '@typescript-eslint/ban-ts-comment': 'warn', + 'no-array-constructor': 'off', + '@typescript-eslint/no-array-constructor': 'warn', + '@typescript-eslint/no-duplicate-enum-values': 'warn', + '@typescript-eslint/no-empty-object-type': 'warn', + '@typescript-eslint/no-explicit-any': 'warn', + '@typescript-eslint/no-extra-non-null-assertion': 'warn', + '@typescript-eslint/no-misused-new': 'warn', + '@typescript-eslint/no-namespace': 'warn', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'warn', + '@typescript-eslint/no-require-imports': 'warn', + '@typescript-eslint/no-this-alias': 'warn', + '@typescript-eslint/no-unnecessary-type-constraint': 'warn', + '@typescript-eslint/no-unsafe-declaration-merging': 'warn', + '@typescript-eslint/no-unsafe-function-type': 'warn', + '@typescript-eslint/strict-boolean-expressions': ['warn'], + 'no-unused-expressions': 'off', + '@typescript-eslint/no-unused-expressions': 'warn', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], + '@typescript-eslint/no-wrapper-object-types': 'warn', + '@typescript-eslint/prefer-as-const': 'warn', + '@typescript-eslint/prefer-namespace-keyword': 'warn', + '@typescript-eslint/triple-slash-reference': 'warn', + + '@typescript-eslint/await-thenable': 'warn', + 'no-array-constructor': 'off', + '@typescript-eslint/no-array-delete': 'warn', + '@typescript-eslint/no-base-to-string': 'warn', + '@typescript-eslint/no-duplicate-type-constituents': 'warn', + '@typescript-eslint/no-floating-promises': 'warn', + '@typescript-eslint/no-for-in-array': 'warn', + 'no-implied-eval': 'off', + '@typescript-eslint/no-implied-eval': 'warn', + '@typescript-eslint/no-misused-promises': 'warn', + '@typescript-eslint/no-redundant-type-constituents': 'warn', + '@typescript-eslint/no-unnecessary-type-assertion': 'warn', + '@typescript-eslint/no-unsafe-argument': 'warn', + '@typescript-eslint/no-unsafe-assignment': 'warn', + '@typescript-eslint/no-unsafe-call': 'warn', + '@typescript-eslint/no-unsafe-enum-comparison': 'warn', + '@typescript-eslint/no-unsafe-member-access': 'warn', + '@typescript-eslint/no-unsafe-return': 'warn', + '@typescript-eslint/no-unsafe-unary-minus': 'warn', + 'no-throw-literal': 'off', + '@typescript-eslint/only-throw-error': 'warn', + 'prefer-promise-reject-errors': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'warn', + 'require-await': 'off', + '@typescript-eslint/require-await': 'warn', + '@typescript-eslint/restrict-plus-operands': 'warn', + '@typescript-eslint/restrict-template-expressions': 'warn', + '@typescript-eslint/unbound-method': 'warn', }, }); |