76 строки
2.0 KiB
Plaintext
76 строки
2.0 KiB
Plaintext
{
|
|
"plugins": ["@typescript-eslint"],
|
|
"extends": [
|
|
"plugin:@typescript-eslint/eslint-recommended",
|
|
"plugin:@typescript-eslint/recommended"
|
|
],
|
|
"rules": {
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
"@typescript-eslint/no-parameter-properties": "off",
|
|
"@typescript-eslint/explicit-member-accessibility": ["error"],
|
|
"@typescript-eslint/explicit-function-return-type": "error",
|
|
"@typescript-eslint/explicit-module-boundary-types": "warn",
|
|
"@typescript-eslint/array-type": [
|
|
"error",
|
|
{
|
|
"default": "array-simple"
|
|
}
|
|
],
|
|
"@typescript-eslint/member-ordering": ["error"],
|
|
"@typescript-eslint/no-unused-vars": "error",
|
|
"@typescript-eslint/no-for-in-array": "error",
|
|
"@typescript-eslint/no-non-null-assertion": "error",
|
|
"@typescript-eslint/unbound-method": "error",
|
|
"@typescript-eslint/naming-convention": [
|
|
"error",
|
|
{
|
|
"selector": "parameter",
|
|
"format": ["camelCase"],
|
|
"leadingUnderscore": "allow"
|
|
},
|
|
{
|
|
"selector": "interface",
|
|
"format": ["PascalCase"],
|
|
"prefix": ["I"]
|
|
},
|
|
{
|
|
"selector": "typeParameter",
|
|
"format": ["PascalCase"],
|
|
"prefix": ["T"]
|
|
},
|
|
{
|
|
"selector": ["typeLike", "enumMember"],
|
|
"format": ["PascalCase"]
|
|
},
|
|
{
|
|
"selector": ["variable", "function"],
|
|
"format": ["camelCase", "PascalCase"],
|
|
"filter": {
|
|
"regex": "^(.*Styles)$",
|
|
"match": false
|
|
}
|
|
}
|
|
],
|
|
"@typescript-eslint/consistent-type-assertions": "error",
|
|
"@typescript-eslint/no-array-constructor": "error",
|
|
"@typescript-eslint/no-namespace": "error",
|
|
"@typescript-eslint/no-use-before-define": [
|
|
"error",
|
|
{
|
|
"functions": false,
|
|
"classes": false,
|
|
"variables": true,
|
|
"typedefs": false
|
|
}
|
|
]
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": ["*.js"],
|
|
"rules": {
|
|
"@typescript-eslint/explicit-function-return-type": "off"
|
|
}
|
|
}
|
|
]
|
|
}
|