waterwolf-oauth-core/.eslintrc.js
2024-08-02 14:34:31 -04:00

82 lines
3 KiB
JavaScript

module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
"curly": "error",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"eqeqeq": "warn",
"no-lonely-if": "error",
"no-multi-assign": "error",
"@typescript-eslint/no-shadow": "warn",
"no-useless-return": "error",
"no-useless-rename": "error",
"object-shorthand": "error",
"one-var-declaration-per-line": "error",
"prefer-object-spread": "error",
"no-unreachable-loop": "error",
"no-template-curly-in-string": "error",
"default-case-last": "error",
"no-array-constructor": "error",
"no-else-return": "error",
"no-negated-condition": "error",
"array-callback-return": "error",
"@typescript-eslint/consistent-type-definitions": "error",
"no-type-assertion/no-type-assertion": "warn",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/no-extraneous-class": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/require-await": "warn",
"@typescript-eslint/restrict-plus-operands": "warn",
"@typescript-eslint/no-non-null-asserted-optional-chain": "warn",
"@typescript-eslint/no-misused-promises": [
"warn",
{
"checksVoidReturn": {
"attributes": false
}
}
],
"@typescript-eslint/await-thenable": "warn",
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-condition": "warn",
"@typescript-eslint/non-nullable-type-assertion-style": "warn",
"@typescript-eslint/no-confusing-void-expression": "warn",
"@typescript-eslint/no-redundant-type-constituents": "warn",
"@typescript-eslint/no-invalid-void-type": "warn",
"@typescript-eslint/dot-notation": "warn",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/no-meaningless-void-operator": "warn",
"@typescript-eslint/no-unnecessary-type-arguments": "warn",
"@typescript-eslint/consistent-indexed-object-style": "warn",
"unused-imports/no-unused-imports": "error"
},
};