{ "extends": [ "zardoy", "plugin:@stylistic/disable-legacy" ], "ignorePatterns": [ "!*.js" ], "plugins": [ "@stylistic" ], "rules": { // style "@stylistic/space-infix-ops": "error", "@stylistic/no-multi-spaces": "error", "@stylistic/no-trailing-spaces": "error", "@stylistic/space-before-function-paren": "error", "@stylistic/array-bracket-spacing": "error", // would be great to have but breaks TS code like (url?) => ... // "@stylistic/arrow-parens": [ // "error", // "as-needed" // ], "@stylistic/arrow-spacing": "error", "@stylistic/block-spacing": "error", "@typescript-eslint/no-this-alias": "off", "@stylistic/brace-style": [ "error", "1tbs", { "allowSingleLine": true } ], // too annoying to be forced to multi-line, probably should be enforced to never // "@stylistic/comma-dangle": [ // "error", // "always-multiline" // ], "@stylistic/computed-property-spacing": "error", "@stylistic/dot-location": [ "error", "property" ], "@stylistic/eol-last": "error", "@stylistic/function-call-spacing": "error", "@stylistic/function-paren-newline": [ "error", "consistent" ], "@stylistic/generator-star-spacing": "error", "@stylistic/implicit-arrow-linebreak": "error", "@stylistic/indent-binary-ops": [ "error", 2 ], "@stylistic/function-call-argument-newline": [ "error", "consistent" ], "@stylistic/space-in-parens": [ "error", "never" ], "@stylistic/object-curly-spacing": [ "error", "always" ], "@stylistic/comma-spacing": "error", "@stylistic/semi": [ "error", "never" ], "@stylistic/indent": [ "error", 2, { "SwitchCase": 1, "ignoredNodes": [ "TemplateLiteral" ] } ], "@stylistic/quotes": [ "error", "single", { "allowTemplateLiterals": true } ], "@stylistic/key-spacing": "error", "@stylistic/keyword-spacing": "error", // "@stylistic/line-comment-position": "error", // not needed // "@stylistic/lines-around-comment": "error", // also not sure if needed // "@stylistic/max-len": "error", // also not sure if needed // "@stylistic/linebreak-style": "error", // let git decide "@stylistic/max-statements-per-line": [ "error", { "max": 5 } ], // "@stylistic/member-delimiter-style": "error", // "@stylistic/multiline-ternary": "error", // not needed // "@stylistic/newline-per-chained-call": "error", // not sure if needed "@stylistic/new-parens": "error", "@typescript-eslint/class-literal-property-style": "off", "@stylistic/no-confusing-arrow": "error", "@stylistic/wrap-iife": "error", "@stylistic/space-before-blocks": "error", "@stylistic/type-generic-spacing": "error", "@stylistic/template-tag-spacing": "error", "@stylistic/template-curly-spacing": "error", "@stylistic/type-annotation-spacing": "error", "@stylistic/jsx-child-element-spacing": "error", // buggy // "@stylistic/jsx-closing-bracket-location": "error", // "@stylistic/jsx-closing-tag-location": "error", "@stylistic/jsx-curly-brace-presence": "error", "@stylistic/jsx-curly-newline": "error", "@stylistic/jsx-curly-spacing": "error", "@stylistic/jsx-equals-spacing": "error", "@stylistic/jsx-first-prop-new-line": "error", "@stylistic/jsx-function-call-newline": "error", "@stylistic/jsx-max-props-per-line": [ "error", { "maximum": 7 } ], "@stylistic/jsx-pascal-case": "error", "@stylistic/jsx-props-no-multi-spaces": "error", "@stylistic/jsx-self-closing-comp": "error", // "@stylistic/jsx-sort-props": [ // "error", // { // "callbacksLast": false, // "shorthandFirst": true, // "shorthandLast": false, // "multiline": "ignore", // "ignoreCase": true, // "noSortAlphabetically": true, // "reservedFirst": [ // "key", // "className" // ], // "locale": "auto" // } // ], // perf "import/no-deprecated": "off", // --- "@typescript-eslint/prefer-nullish-coalescing": "off", "@typescript-eslint/naming-convention": "off", "prefer-template": "off", // intentional: improve readability in some cases "no-else-return": "off", "@typescript-eslint/padding-line-between-statements": "off", "@typescript-eslint/no-dynamic-delete": "off", "arrow-body-style": "off", "unicorn/prefer-ternary": "off", "unicorn/switch-case-braces": "off", "@typescript-eslint/consistent-type-definitions": "off", "unicorn/explicit-length-check": "off", "unicorn/prefer-dom-node-append": "off", "typescript-eslint/no-confusing-void-expression": "off", "unicorn/no-lonely-if": "off", "no-multi-assign": "off", "sonarjs/no-duplicate-string": "off", "new-cap": "off", "unicorn/consistent-destructuring": "off", "unicorn/no-await-expression-member": "off", "unicorn/prefer-add-event-listener": "off", "unicorn/prefer-top-level-await": "off", "default-case": "off", // I guess it would better to fix "node/prefer-global/buffer": "off", "unicorn/prefer-optional-catch-binding": "off", // still useful for debugging "no-alert": "off", // todo once replaced with ui, enable "@typescript-eslint/restrict-plus-operands": "off", // --- "@typescript-eslint/no-throw-literal": "off", // disabling because of "rule expansion" "no-empty-function": "off", "@typescript-eslint/no-explicit-any": "off", "import/no-extraneous-dependencies": "off", "@typescript-eslint/ban-types": "off", "unicorn/prefer-query-selector": "off", "@typescript-eslint/dot-notation": "off", // trick prop type-checking "@typescript-eslint/consistent-type-imports": "off", "no-negated-condition": "off", "@typescript-eslint/no-require-imports": "off", "unicorn/prefer-number-properties": "off", "@typescript-eslint/no-confusing-void-expression": "off", "unicorn/no-empty-file": "off", "unicorn/prefer-event-target": "off", "@typescript-eslint/member-ordering": "off", // needs to be fixed actually "complexity": "off", "@typescript-eslint/no-floating-promises": "warn", "no-async-promise-executor": "off", "no-bitwise": "off", "unicorn/filename-case": "off", "max-depth": "off", "unicorn/no-typeof-undefined": "off" }, "overrides": [ { "files": [ "*.js" ], "rules": { "@stylistic/space-before-function-paren": [ "error", { "anonymous": "always", "named": "never", "asyncArrow": "always" } ] } } ], "root": true }