mirror of
https://github.com/microsoft/pyright.git
synced 2024-11-09 13:35:59 +03:00
446a9bdb63
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Co-authored-by: Rich Chiodo <rchiodo@users.noreply.github.com>
130 lines
3.8 KiB
JSON
130 lines
3.8 KiB
JSON
{
|
|
"extends": [
|
|
"eslint:recommended",
|
|
"prettier",
|
|
"plugin:@typescript-eslint/recommended"
|
|
],
|
|
"env": {
|
|
"node": true
|
|
},
|
|
"parser": "@typescript-eslint/parser",
|
|
"parserOptions": {
|
|
"ecmaVersion": 2019,
|
|
"sourceType": "module"
|
|
},
|
|
"plugins": [
|
|
"@typescript-eslint/eslint-plugin",
|
|
"simple-import-sort"
|
|
],
|
|
"root": true,
|
|
"rules": {
|
|
"eqeqeq": "error",
|
|
"no-constant-condition": 0,
|
|
"no-inner-declarations": 0,
|
|
"no-unused-vars": "off",
|
|
"no-undef": 0,
|
|
"simple-import-sort/imports": [
|
|
"error",
|
|
{
|
|
"groups": [
|
|
// Defaults from simple-import-sort, but with local packages between third-party and relative imports.
|
|
[
|
|
"^\\u0000"
|
|
],
|
|
[
|
|
"^@?\\w"
|
|
],
|
|
[
|
|
"^[^.]"
|
|
],
|
|
[
|
|
"^pyright"
|
|
],
|
|
[
|
|
"^\\."
|
|
]
|
|
]
|
|
}
|
|
],
|
|
"simple-import-sort/exports": "error",
|
|
"@typescript-eslint/explicit-function-return-type": 0,
|
|
"@typescript-eslint/explicit-module-boundary-types": 0,
|
|
"@typescript-eslint/ban-types": 0,
|
|
"@typescript-eslint/camelcase": 0,
|
|
"@typescript-eslint/no-empty-interface": 0,
|
|
"@typescript-eslint/no-explicit-any": 0,
|
|
"@typescript-eslint/no-namespace": 0,
|
|
"@typescript-eslint/no-non-null-assertion": 0,
|
|
"@typescript-eslint/no-this-alias": 0,
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"error",
|
|
{
|
|
"args": "none"
|
|
}
|
|
],
|
|
"@typescript-eslint/no-use-before-define": 0,
|
|
"@typescript-eslint/naming-convention": [
|
|
"error",
|
|
{
|
|
"selector": [
|
|
"classProperty",
|
|
"typeProperty",
|
|
"parameterProperty",
|
|
"classMethod",
|
|
"typeMethod",
|
|
"accessor"
|
|
],
|
|
"modifiers": ["private"],
|
|
"leadingUnderscore": "require",
|
|
"format": ["camelCase"],
|
|
"filter": {
|
|
"regex": "^(test_| )",
|
|
"match": false
|
|
}
|
|
},
|
|
{
|
|
"selector": [
|
|
"classProperty",
|
|
"typeProperty",
|
|
"parameterProperty",
|
|
"classMethod",
|
|
"typeMethod",
|
|
"accessor"
|
|
],
|
|
"modifiers": ["protected"],
|
|
"leadingUnderscore": "allow",
|
|
"format": ["camelCase"],
|
|
"filter": {
|
|
"regex": "^(test_| )",
|
|
"match": false
|
|
}
|
|
},
|
|
{
|
|
"selector": [
|
|
"classProperty",
|
|
"typeProperty",
|
|
"parameterProperty",
|
|
"classMethod",
|
|
"typeMethod",
|
|
"accessor"
|
|
],
|
|
"modifiers": ["public"],
|
|
"leadingUnderscore": "forbid",
|
|
"format": ["camelCase"],
|
|
"filter": {
|
|
"regex": "^(test_| )",
|
|
"match": false
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": ["**/*.js"],
|
|
"rules": {
|
|
"@typescript-eslint/no-var-requires": 0
|
|
}
|
|
}
|
|
]
|
|
}
|