2024-04-11 13:51:01 +03:00
|
|
|
{
|
2024-11-26 12:56:35 +03:00
|
|
|
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
|
|
"plugins": ["import", "react", "typescript", "unicorn", "promise"],
|
2024-10-15 06:20:21 +03:00
|
|
|
"categories": {
|
|
|
|
"correctness": "error",
|
|
|
|
"perf": "error"
|
|
|
|
},
|
2024-12-13 13:49:35 +03:00
|
|
|
"ignorePatterns": ["tools/cli/src/webpack/error-handler.js"],
|
2024-04-11 13:51:01 +03:00
|
|
|
"rules": {
|
2024-05-14 08:34:18 +03:00
|
|
|
"import/named": "allow",
|
|
|
|
"no-await-in-loop": "allow",
|
2024-11-26 12:56:35 +03:00
|
|
|
"promise/no-callback-in-promise": "allow",
|
2024-12-14 13:29:04 +03:00
|
|
|
"typescript/ban-types": "allow",
|
2024-12-13 13:49:35 +03:00
|
|
|
|
|
|
|
"array-callback-return": "error",
|
|
|
|
"constructor-super": "error",
|
|
|
|
"eqeqeq": ["error", "smart"],
|
|
|
|
"getter-return": "error",
|
|
|
|
"for-direction": "error",
|
|
|
|
"require-yield": "error",
|
|
|
|
"use-isnan": "error",
|
|
|
|
"valid-typeof": "error",
|
|
|
|
"no-empty-character-class": "error",
|
|
|
|
"no-self-compare": "error",
|
|
|
|
"no-empty": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"allowEmptyCatch": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"no-constant-binary-expression": "error",
|
|
|
|
"no-constructor-return": "error",
|
|
|
|
"no-func-assign": "error",
|
|
|
|
"no-global-assign": "error",
|
|
|
|
"no-unused-vars": "error",
|
|
|
|
"no-ex-assign": "error",
|
|
|
|
"no-loss-of-precision": "error",
|
|
|
|
"no-fallthrough": "error",
|
|
|
|
"no-nonoctal-decimal-escape": "error",
|
|
|
|
"no-irregular-whitespace": "error",
|
|
|
|
"no-control-regex": "error",
|
|
|
|
"no-with": "error",
|
|
|
|
"no-debugger": "error",
|
|
|
|
"no-const-assign": "error",
|
|
|
|
"no-setter-return": "error",
|
|
|
|
"no-obj-calls": "error",
|
|
|
|
"no-unsafe-negation": "error",
|
|
|
|
"no-dupe-class-members": "error",
|
|
|
|
"no-dupe-keys": "error",
|
|
|
|
"no-this-before-super": "error",
|
|
|
|
"no-useless-catch": "error",
|
|
|
|
"no-async-promise-executor": "error",
|
|
|
|
"no-unreachable": "error",
|
|
|
|
"no-duplicate-case": "error",
|
|
|
|
"no-empty-pattern": "error",
|
|
|
|
"no-unused-labels": "error",
|
|
|
|
"no-sparse-arrays": "error",
|
|
|
|
"no-delete-var": "error",
|
|
|
|
"no-compare-neg-zero": "error",
|
|
|
|
"no-redeclare": "error",
|
|
|
|
"no-case-declarations": "error",
|
|
|
|
"no-class-assign": "error",
|
|
|
|
"no-var": "error",
|
|
|
|
"no-self-assign": "error",
|
|
|
|
"no-inner-declarations": "error",
|
|
|
|
"no-dupe-else-if": "error",
|
|
|
|
"no-invalid-regexp": "error",
|
|
|
|
"no-unsafe-finally": "error",
|
|
|
|
"no-prototype-builtins": "error",
|
|
|
|
"no-array-constructor": "error",
|
|
|
|
"no-shadow-restricted-names": "error",
|
|
|
|
"no-constant-condition": "error",
|
|
|
|
"no-useless-escape": "error",
|
|
|
|
"no-unsafe-optional-chaining": "error",
|
|
|
|
"no-extra-boolean-cast": "error",
|
|
|
|
"no-regex-spaces": "error",
|
|
|
|
"react/jsx-no-useless-fragment": "error",
|
|
|
|
"react/jsx-no-undef": "error",
|
|
|
|
"react/no-direct-mutation-state": "error",
|
|
|
|
"react/no-string-refs": "error",
|
|
|
|
"react/no-unknown-property": "error",
|
|
|
|
"react/no-danger-with-children": "error",
|
|
|
|
"react/no-unescaped-entities": "error",
|
|
|
|
"react/require-render-return": "error",
|
|
|
|
"react/jsx-no-duplicate-props": "error",
|
|
|
|
"react/jsx-key": "error",
|
|
|
|
"react/no-is-mounted": "error",
|
|
|
|
"react/no-find-dom-node": "error",
|
|
|
|
"react/no-children-prop": "error",
|
|
|
|
"react/no-render-return-value": "error",
|
|
|
|
"react/jsx-no-target-blank": "error",
|
|
|
|
"react/jsx-no-comment-textnodes": "error",
|
|
|
|
"typescript/consistent-type-imports": "error",
|
|
|
|
"typescript/no-non-null-assertion": "error",
|
|
|
|
"typescript/triple-slash-reference": "error",
|
|
|
|
"typescript/no-non-null-asserted-optional-chain": "error",
|
|
|
|
"typescript/no-duplicate-enum-values": "error",
|
|
|
|
"typescript/no-extra-non-null-assertion": "error",
|
|
|
|
"typescript/no-misused-new": "error",
|
|
|
|
"typescript/prefer-for-of": "error",
|
|
|
|
"typescript/no-unsafe-declaration-merging": "error",
|
|
|
|
"typescript/no-unnecessary-type-constraint": "error",
|
|
|
|
"typescript/no-this-alias": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"allow_destructuring": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"typescript/prefer-as-const": "error",
|
|
|
|
"typescript/no-var-requires": "error",
|
|
|
|
"typescript/no-namespace": "error",
|
|
|
|
"typescript/ban-ts-comment": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"ts-expect-error": "allow-with-description",
|
|
|
|
"ts-ignore": true,
|
|
|
|
"ts-nocheck": true,
|
|
|
|
"ts-check": false
|
|
|
|
}
|
|
|
|
],
|
2024-05-14 08:34:18 +03:00
|
|
|
"unicorn/prefer-array-some": "error",
|
|
|
|
"unicorn/no-useless-promise-resolve-reject": "error",
|
2024-12-13 13:49:35 +03:00
|
|
|
"unicorn/no-unnecessary-await": "error",
|
|
|
|
"unicorn/no-useless-fallback-in-spread": "error",
|
|
|
|
"unicorn/filename-case": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"case": "kebabCase"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"unicorn/prefer-dom-node-dataset": "error",
|
|
|
|
"unicorn/prefer-dom-node-append": "error",
|
|
|
|
"unicorn/prefer-dom-node-remove": "error",
|
|
|
|
"unicorn/prefer-date-now": "error",
|
|
|
|
"unicorn/prefer-blob-reading-methods": "error",
|
|
|
|
"unicorn/no-typeof-undefined": "error",
|
|
|
|
"unicorn/no-new-array": "error",
|
|
|
|
"unicorn/new-for-builtins": "error",
|
|
|
|
"unicorn/prefer-node-protocol": "error",
|
2024-04-11 13:51:01 +03:00
|
|
|
"import/no-cycle": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"ignoreTypes": true
|
|
|
|
}
|
2024-12-10 10:04:57 +03:00
|
|
|
],
|
2024-12-13 13:49:35 +03:00
|
|
|
"import/sort-imports": "error",
|
|
|
|
"import/namespace": "off",
|
|
|
|
"import/no-webpack-loader-syntax": "error",
|
|
|
|
"import/no-duplicates": "error",
|
|
|
|
"import/no-import-assign": "error",
|
|
|
|
"import/no-self-import": "error"
|
2024-11-26 12:56:35 +03:00
|
|
|
},
|
|
|
|
"overrides": [
|
|
|
|
{
|
|
|
|
"files": ["*.stories.tsx"],
|
|
|
|
"rules": {
|
|
|
|
"react/no-array-index-key": "off"
|
|
|
|
}
|
2024-12-13 13:49:35 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"files": ["packages/backend/**/*.ts"],
|
|
|
|
"rules": {
|
|
|
|
"typescript/consistent-type-imports": "off"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"files": [
|
|
|
|
"*.{spec,test,e2e,stories}.{ts,tsx}",
|
|
|
|
"tests/**/*.ts",
|
|
|
|
"packages/backend/server/tests/**/*.ts"
|
|
|
|
],
|
|
|
|
"rules": {
|
|
|
|
"typescript/no-non-null-assertion": "off",
|
|
|
|
"typescript/ban-ts-comment": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"ts-expect-error": false,
|
|
|
|
"ts-ignore": true,
|
|
|
|
"ts-nocheck": true,
|
|
|
|
"ts-check": false
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2024-11-26 12:56:35 +03:00
|
|
|
}
|
|
|
|
]
|
2024-04-11 13:51:01 +03:00
|
|
|
}
|