2022-10-19 12:44:26 +02:00
|
|
|
{
|
|
|
|
"env": {
|
|
|
|
"es6": true,
|
|
|
|
"amd": true,
|
|
|
|
"browser": true
|
|
|
|
},
|
|
|
|
|
|
|
|
"root": true,
|
|
|
|
"ignorePatterns": ["docs/", "dist/", "out/", "rethinkdb_data/", "node_modules/", "bulmaselect/"],
|
|
|
|
|
|
|
|
"parserOptions": {
|
|
|
|
"sourceType": "module",
|
|
|
|
"ecmaVersion": 2020
|
|
|
|
},
|
|
|
|
|
|
|
|
"extends": ["eslint:recommended"],
|
|
|
|
|
|
|
|
"rules": {
|
|
|
|
"arrow-parens": [1, "always"],
|
|
|
|
"block-spacing": [1, "always"],
|
|
|
|
"brace-style": [1, "1tbs", { "allowSingleLine": true }],
|
|
|
|
"comma-dangle": [1, "always-multiline"],
|
|
|
|
"comma-spacing": [1, { "before": false, "after": true }],
|
|
|
|
"comma-style": [1, "last"],
|
|
|
|
"computed-property-spacing": [1, "never"],
|
|
|
|
"consistent-this": [1, "self"],
|
|
|
|
"eol-last": 1,
|
|
|
|
"eqeqeq": [1, "smart"],
|
|
|
|
"no-inline-comments": 1,
|
|
|
|
"jsx-quotes": [1, "prefer-double"],
|
|
|
|
"lines-around-comment": [1, { "beforeBlockComment": false }],
|
|
|
|
"max-depth": [1, 8],
|
|
|
|
"max-nested-callbacks": [1, 8],
|
|
|
|
"new-parens": 1,
|
|
|
|
"no-array-constructor": 1,
|
|
|
|
"no-lonely-if": 1,
|
|
|
|
"no-mixed-spaces-and-tabs": 1,
|
|
|
|
"no-multiple-empty-lines": 1,
|
|
|
|
"no-new-object": 1,
|
|
|
|
"no-spaced-func": 1,
|
|
|
|
"no-trailing-spaces": 1,
|
|
|
|
"no-return-await": 1,
|
|
|
|
"no-undef": 0,
|
|
|
|
"no-unneeded-ternary": 1,
|
|
|
|
"no-var": 1,
|
|
|
|
"object-curly-spacing": [1, "always"],
|
|
|
|
"operator-linebreak": [1, "after"],
|
|
|
|
"padded-blocks": [1, "never"],
|
|
|
|
"prefer-const": ["error", { "destructuring": "any", "ignoreReadBeforeAssign": false }],
|
|
|
|
"prettier/prettier": 1,
|
|
|
|
"quotes": [1, "double", { "avoidEscape": true, "allowTemplateLiterals": false }],
|
|
|
|
"quote-props": [1, "consistent-as-needed"],
|
|
|
|
"semi": [1, "always"],
|
|
|
|
"semi-spacing": [1, { "before": false, "after": true }],
|
|
|
|
"space-before-blocks": [1, "always"],
|
|
|
|
"space-in-parens": [1, "never"],
|
|
|
|
"space-infix-ops": [1, { "int32Hint": true }],
|
|
|
|
"spaced-comment": [1, "always"],
|
|
|
|
"sort-imports": [
|
|
|
|
"warn",
|
|
|
|
{
|
|
|
|
"ignoreCase": false,
|
|
|
|
"ignoreDeclarationSort": true,
|
|
|
|
"ignoreMemberSort": false,
|
|
|
|
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"],
|
|
|
|
"allowSeparatedGroups": false
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
|
|
|
|
// Typescript overrides
|
|
|
|
"overrides": [
|
|
|
|
{
|
|
|
|
"files": ["*.ts", "*.tsx"],
|
|
|
|
"parser": "@typescript-eslint/parser",
|
|
|
|
"plugins": ["@typescript-eslint"],
|
|
|
|
"extends": [
|
|
|
|
"eslint:recommended",
|
|
|
|
"plugin:@typescript-eslint/eslint-recommended",
|
2022-10-19 12:45:23 +02:00
|
|
|
"plugin:@typescript-eslint/recommended"
|
2022-10-19 12:44:26 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
// Enable if you need jsx support
|
|
|
|
// "parserOptions": {
|
|
|
|
// "ecmaFeatures": { "jsx": true }
|
|
|
|
// },
|
|
|
|
|
|
|
|
"rules": {
|
|
|
|
"semi": "off",
|
|
|
|
"@typescript-eslint/no-unused-vars": "error",
|
|
|
|
"@typescript-eslint/member-delimiter-style": "error",
|
|
|
|
"@typescript-eslint/member-ordering": "error",
|
|
|
|
"@typescript-eslint/type-annotation-spacing": "error",
|
|
|
|
"@typescript-eslint/semi": [1, "always"],
|
|
|
|
"@typescript-eslint/no-explicit-any": 0,
|
|
|
|
"@typescript-eslint/no-var-requires": 0,
|
|
|
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
|
|
"@typescript-eslint/ban-ts-comment": "off",
|
|
|
|
"@typescript-eslint/no-empty-function": "off",
|
|
|
|
"@typescript-eslint/naming-convention": [
|
|
|
|
"warn",
|
|
|
|
{ "selector": "default", "format": ["camelCase"] },
|
|
|
|
{ "selector": "variableLike", "format": ["camelCase"] },
|
|
|
|
{ "selector": "variable", "format": ["camelCase", "UPPER_CASE", "PascalCase"] },
|
|
|
|
{ "selector": "parameter", "format": ["camelCase"], "leadingUnderscore": "allow" },
|
|
|
|
{ "selector": "memberLike", "format": ["camelCase"] },
|
|
|
|
{ "selector": "memberLike", "modifiers": ["private"], "format": ["camelCase"], "leadingUnderscore": "require" },
|
|
|
|
{ "selector": "typeLike", "format": null },
|
|
|
|
{ "selector": "typeAlias", "format": null },
|
|
|
|
{ "selector": "typeProperty", "format": null },
|
|
|
|
{ "selector": "typeParameter", "format": ["PascalCase"], "prefix": ["T"] },
|
|
|
|
{ "selector": "interface", "format": ["PascalCase"], "custom": { "regex": "^I[A-Z]", "match": false } },
|
|
|
|
{ "selector": "objectLiteralProperty", "format": null },
|
|
|
|
{ "selector": "enumMember", "format": ["UPPER_CASE"] }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|