mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
cad58e0c43
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9132 Co-authored-by: Divi <32202683+imperfect-fourth@users.noreply.github.com> Co-authored-by: Nicolas Inchauspe <710410+nicoinch@users.noreply.github.com> GitOrigin-RevId: c92295b98c8db2b0ecc6f964b02f49820db4d77d
127 lines
4.2 KiB
JSON
127 lines
4.2 KiB
JSON
{
|
|
"extends": ["plugin:@nrwl/nx/react", "../../../.eslintrc.json"],
|
|
"ignorePatterns": ["!**/*"],
|
|
"globals": {
|
|
"__DEVELOPMENT__": true,
|
|
"__CLIENT__": true,
|
|
"__SERVER__": true,
|
|
"__DISABLE_SSR__": true,
|
|
"__DEVTOOLS__": true,
|
|
"socket": true,
|
|
"webpackIsomorphicTools": true,
|
|
"CONSOLE_ASSET_VERSION": true
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
"rules": {
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"no-useless-escape": "warn"
|
|
}
|
|
},
|
|
{
|
|
"files": ["*.ts", "*.tsx"],
|
|
"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"
|
|
}
|
|
},
|
|
{
|
|
"files": ["*.js", "*.jsx"],
|
|
"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"
|
|
}
|
|
},
|
|
{
|
|
"files": [
|
|
"**/__tests__/**/*.[jt]s?(x)",
|
|
"**/?(*.)+(spec|test).[jt]s?(x)"
|
|
],
|
|
"extends": [
|
|
"plugin:testing-library/react",
|
|
"plugin:jest-dom/recommended"
|
|
],
|
|
"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"
|
|
}
|
|
},
|
|
{
|
|
"files": [
|
|
"*.stories.@(ts|tsx|js|jsx|mjs|cjs)",
|
|
"*.story.@(ts|tsx|js|jsx|mjs|cjs)"
|
|
],
|
|
"parserOptions": {
|
|
"project": [
|
|
"libs/console/legacy-ce/tsconfig.*?.json",
|
|
"libs/console/legacy-ce/.storybook/tsconfig.json"
|
|
]
|
|
},
|
|
"rules": {
|
|
"@typescript-eslint/no-floating-promises": "error"
|
|
}
|
|
}
|
|
]
|
|
}
|