2022-08-05 21:52:47 +03:00
|
|
|
{
|
|
|
|
"extends": ["plugin:@nrwl/nx/react", "../../../.eslintrc.json"],
|
|
|
|
"ignorePatterns": ["!**/*"],
|
2022-12-16 17:36:11 +03:00
|
|
|
"globals": {
|
|
|
|
"__DEVELOPMENT__": true,
|
|
|
|
"__CLIENT__": true,
|
|
|
|
"__SERVER__": true,
|
|
|
|
"__DISABLE_SSR__": true,
|
|
|
|
"__DEVTOOLS__": true,
|
|
|
|
"socket": true,
|
|
|
|
"webpackIsomorphicTools": true,
|
|
|
|
"CONSOLE_ASSET_VERSION": true
|
|
|
|
},
|
2022-08-05 21:52:47 +03:00
|
|
|
"overrides": [
|
|
|
|
{
|
|
|
|
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
2022-08-18 22:36:39 +03:00
|
|
|
"rules": {
|
2022-10-28 19:21:52 +03:00
|
|
|
"react/forbid-dom-props": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"forbid": [
|
|
|
|
{
|
|
|
|
"propName": "data-analytics-name",
|
|
|
|
"message": "Analytics attributes (data-analytics-name) should be added through the Analytics component/utilities"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"propName": "data-trackid",
|
|
|
|
"message": "Analytics attributes (data-trackid) should be added through the Analytics component/utilities"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"propName": "data-heap-redact-text",
|
|
|
|
"message": "Analytics attributes (data-heap-redact-text) should be added through the Analytics component/utilities"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"propName": "data-heap-redact-attributes",
|
|
|
|
"message": "Analytics attributes (data-heap-redact-attributes) should be added through the Analytics component/utilities"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"react/forbid-component-props": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"forbid": [
|
|
|
|
{
|
|
|
|
"propName": "data-analytics-name",
|
|
|
|
"message": "Analytics attributes (data-analytics-name) should be added through the Analytics component/utilities"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"propName": "data-trackid",
|
|
|
|
"message": "Analytics attributes (data-trackid) should be added through the Analytics component/utilities"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"propName": "data-heap-redact-text",
|
|
|
|
"message": "Analytics attributes (data-heap-redact-text) should be added through the Analytics component/utilities"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"propName": "data-heap-redact-attributes",
|
|
|
|
"message": "Analytics attributes (data-heap-redact-attributes) should be added through the Analytics component/utilities"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2022-12-16 17:36:11 +03:00
|
|
|
],
|
|
|
|
"no-useless-escape": "warn"
|
2022-08-18 22:36:39 +03:00
|
|
|
}
|
2022-08-05 21:52:47 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"files": ["*.ts", "*.tsx"],
|
2022-08-18 22:36:39 +03:00
|
|
|
"rules": {
|
|
|
|
"@typescript-eslint/no-empty-function": "warn",
|
|
|
|
"@typescript-eslint/ban-types": "warn",
|
|
|
|
"@typescript-eslint/no-namespace": "warn",
|
|
|
|
"@typescript-eslint/no-empty-interface": "warn",
|
|
|
|
"@typescript-eslint/no-var-requires": "warn",
|
|
|
|
"no-case-declarations": "warn",
|
|
|
|
"no-unsafe-optional-chaining": "warn",
|
|
|
|
"no-useless-catch": "warn"
|
|
|
|
}
|
2022-08-05 21:52:47 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"files": ["*.js", "*.jsx"],
|
2022-08-18 22:36:39 +03:00
|
|
|
"rules": {
|
|
|
|
"@typescript-eslint/no-empty-function": "warn",
|
|
|
|
"@typescript-eslint/no-empty-interface": "warn",
|
|
|
|
"no-case-declarations": "warn",
|
|
|
|
"import/first": "warn",
|
|
|
|
"no-restricted-globals": "warn",
|
|
|
|
"no-prototype-builtins": "warn",
|
|
|
|
"@typescript-eslint/no-this-alias": "warn",
|
|
|
|
"no-unsafe-optional-chaining": "warn",
|
|
|
|
"no-useless-catch": "warn"
|
|
|
|
}
|
2022-12-16 17:36:11 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"files": [
|
|
|
|
"**/__tests__/**/*.[jt]s?(x)",
|
|
|
|
"**/?(*.)+(spec|test).[jt]s?(x)"
|
|
|
|
],
|
2023-01-25 23:53:48 +03:00
|
|
|
"extends": [
|
|
|
|
"plugin:testing-library/react",
|
|
|
|
"plugin:jest-dom/recommended"
|
|
|
|
],
|
2022-12-16 17:36:11 +03:00
|
|
|
"rules": {
|
|
|
|
"testing-library/no-unnecessary-act": "warn",
|
|
|
|
"testing-library/prefer-query-by-disappearance": "warn",
|
|
|
|
"testing-library/prefer-find-by": "warn",
|
|
|
|
"testing-library/prefer-presence-queries": "warn"
|
|
|
|
}
|
2022-08-05 21:52:47 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|