2024-05-07 20:26:54 +02:00
|
|
|
{
|
2024-05-27 15:08:21 +02:00
|
|
|
"parserOptions": {
|
|
|
|
"project": "./tsconfig.strictNullChecks.json"
|
|
|
|
},
|
2024-05-07 20:26:54 +02:00
|
|
|
"extends": [
|
|
|
|
"plugin:@typescript-eslint/recommended",
|
|
|
|
"plugin:@stylistic/recommended-extends",
|
|
|
|
"plugin:import/recommended",
|
2024-05-16 10:41:05 +02:00
|
|
|
"plugin:import/typescript",
|
|
|
|
"prettier"
|
2024-05-07 20:26:54 +02:00
|
|
|
],
|
2024-05-27 15:08:21 +02:00
|
|
|
"plugins": ["@typescript-eslint", "@stylistic", "import", "unused-imports", "switch-allman", "strict-null-checks"],
|
2024-05-07 20:26:54 +02:00
|
|
|
"settings": {
|
|
|
|
"import/resolver": {
|
|
|
|
"typescript": {
|
|
|
|
"project": "tsconfig.json"
|
|
|
|
},
|
|
|
|
"node": {
|
|
|
|
"extensions": [".ts", ".mjs"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"rules": {
|
|
|
|
"@typescript-eslint/no-explicit-any": "off",
|
|
|
|
"@typescript-eslint/no-dynamic-delete": "off",
|
|
|
|
"@typescript-eslint/no-unused-vars": "off",
|
|
|
|
"@typescript-eslint/no-empty-interface": "off",
|
|
|
|
"@typescript-eslint/no-var-requires": "error",
|
2024-05-16 10:41:05 +02:00
|
|
|
"@typescript-eslint/explicit-module-boundary-types": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"allowArgumentsExplicitlyTypedAsAny": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"@typescript-eslint/naming-convention": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"selector": "default",
|
|
|
|
"format": ["camelCase"],
|
|
|
|
"leadingUnderscore": "allow"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"selector": "typeLike",
|
|
|
|
"format": ["PascalCase"]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"selector": "objectLiteralProperty",
|
|
|
|
"format": ["PascalCase", "camelCase", "snake_case"],
|
|
|
|
"leadingUnderscore": "allow"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"selector": "typeProperty",
|
|
|
|
"format": ["PascalCase", "camelCase"],
|
|
|
|
"leadingUnderscore": "allow"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"selector": "enumMember",
|
|
|
|
"format": ["UPPER_CASE"]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"selector": "property",
|
|
|
|
"modifiers": ["readonly", "static"],
|
|
|
|
"format": ["UPPER_CASE"]
|
|
|
|
}
|
|
|
|
],
|
2024-05-07 20:26:54 +02:00
|
|
|
"@stylistic/indent": ["error", 4, { "MemberExpression": 1, "SwitchCase": 1 }],
|
|
|
|
"@stylistic/brace-style": ["error", "allman", { "allowSingleLine": false }],
|
|
|
|
"@stylistic/semi": ["error", "always"],
|
|
|
|
"@stylistic/quotes": ["error", "double", { "avoidEscape": true }],
|
2024-05-16 10:41:05 +02:00
|
|
|
"@stylistic/operator-linebreak": ["error", "before"],
|
|
|
|
"@stylistic/arrow-parens": ["error", "always"],
|
|
|
|
"@stylistic/max-len": [
|
|
|
|
"warn",
|
|
|
|
{
|
|
|
|
"code": 121, // +1 to prevent conflicts with Prettier rule.
|
|
|
|
"tabWidth": 4,
|
|
|
|
"ignoreComments": true,
|
|
|
|
"ignoreTrailingComments": true,
|
|
|
|
"ignoreUrls": true,
|
|
|
|
"ignoreStrings": true,
|
|
|
|
"ignoreTemplateLiterals": true,
|
|
|
|
"ignoreRegExpLiterals": true
|
|
|
|
}
|
|
|
|
],
|
2024-05-07 20:26:54 +02:00
|
|
|
"@stylistic/multiline-ternary": ["error", "always-multiline"],
|
2024-05-16 10:41:05 +02:00
|
|
|
"import/order": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
|
|
|
|
"pathGroups": [
|
|
|
|
{
|
|
|
|
"pattern": "tsyringe",
|
|
|
|
"group": "builtin",
|
|
|
|
"position": "before"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"newlines-between": "never",
|
|
|
|
"alphabetize": {
|
|
|
|
"order": "asc",
|
|
|
|
"caseInsensitive": true
|
2024-05-07 20:26:54 +02:00
|
|
|
}
|
|
|
|
}
|
2024-05-16 10:41:05 +02:00
|
|
|
],
|
|
|
|
"unused-imports/no-unused-imports-ts": "error",
|
2024-05-27 15:08:21 +02:00
|
|
|
"switch-allman/case-allman": "error",
|
|
|
|
"strict-null-checks/all": "warn"
|
2024-05-07 20:26:54 +02:00
|
|
|
},
|
|
|
|
"overrides": [
|
|
|
|
{
|
|
|
|
"files": ["src/di/**/*.ts"],
|
|
|
|
"rules": {
|
|
|
|
"@typescript-eslint/no-extraneous-class": "off"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"files": ["src/loaders/**/*.ts"],
|
|
|
|
"rules": {
|
|
|
|
"@typescript-eslint/no-var-requires": "off"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|