2019-02-16 00:25:55 +00:00
|
|
|
{
|
2020-11-21 18:06:46 +00:00
|
|
|
"env": {
|
2021-03-10 19:01:46 +00:00
|
|
|
"es6": true,
|
|
|
|
"browser": true,
|
|
|
|
"mocha": true,
|
2021-06-20 07:14:42 +00:00
|
|
|
"node": true,
|
|
|
|
"jest": true
|
2019-02-18 22:43:11 +00:00
|
|
|
},
|
2023-06-06 15:58:27 +00:00
|
|
|
"parser": "@babel/eslint-parser",
|
|
|
|
"parserOptions": {
|
|
|
|
"babelOptions": {
|
|
|
|
"presets": ["@babel/preset-react"]
|
|
|
|
}
|
|
|
|
},
|
2020-11-21 18:06:46 +00:00
|
|
|
"root": true,
|
2021-03-10 19:01:46 +00:00
|
|
|
"extends": [
|
2021-12-02 00:01:12 +00:00
|
|
|
"eslint:recommended",
|
|
|
|
"plugin:react/recommended",
|
|
|
|
"plugin:react-hooks/recommended",
|
|
|
|
"plugin:import/recommended",
|
2021-10-06 15:32:21 +00:00
|
|
|
"plugin:jsx-a11y/recommended",
|
|
|
|
"prettier"
|
2021-03-10 19:01:46 +00:00
|
|
|
],
|
2023-01-25 04:51:57 +00:00
|
|
|
"plugins": ["no-only-tests", "filenames-simple"],
|
2020-11-21 18:06:46 +00:00
|
|
|
"globals": {
|
2021-03-10 19:01:46 +00:00
|
|
|
"Promise": true,
|
|
|
|
"window": true,
|
|
|
|
"$": true,
|
|
|
|
"ga": true,
|
|
|
|
"jQuery": true,
|
|
|
|
"router": true
|
|
|
|
},
|
2019-02-16 00:25:55 +00:00
|
|
|
"settings": {
|
|
|
|
"react": {
|
2021-12-02 00:01:12 +00:00
|
|
|
"version": "16.4.2"
|
2023-07-24 20:12:47 +00:00
|
|
|
},
|
|
|
|
"import/resolver": {
|
|
|
|
"typescript": true,
|
|
|
|
"node": true
|
2021-12-02 00:01:12 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"rules": {
|
2023-07-24 20:12:47 +00:00
|
|
|
"import/no-unresolved": [2, { "commonjs": true }],
|
2022-06-21 16:08:20 +00:00
|
|
|
"import/named": "error",
|
|
|
|
"import/no-named-as-default": "off",
|
|
|
|
"import/no-named-as-default-member": "off",
|
|
|
|
"import/order": "error",
|
2022-10-05 17:08:40 +00:00
|
|
|
"import/no-cycle": [2, { "maxDepth": 2 }],
|
2022-06-21 16:08:20 +00:00
|
|
|
"react/prop-types": "off",
|
2022-11-04 05:13:46 +00:00
|
|
|
"no-only-tests/no-only-tests": "error",
|
|
|
|
"no-unused-vars": "off",
|
|
|
|
"@typescript-eslint/no-unused-vars": [
|
|
|
|
"warn",
|
|
|
|
{
|
|
|
|
"argsIgnorePattern": "^_",
|
|
|
|
"varsIgnorePattern": "^_",
|
|
|
|
"caughtErrorsIgnorePattern": "^_"
|
|
|
|
}
|
2023-01-25 04:51:57 +00:00
|
|
|
],
|
|
|
|
"filenames-simple/naming-convention": ["warn"]
|
2021-05-17 18:53:41 +00:00
|
|
|
},
|
2021-07-10 20:06:47 +00:00
|
|
|
"overrides": [
|
|
|
|
{
|
|
|
|
"files": ["**/*.ts?(x)"],
|
|
|
|
"parser": "@typescript-eslint/parser",
|
|
|
|
"parserOptions": {
|
|
|
|
"project": [
|
2023-03-02 18:17:44 +00:00
|
|
|
"./client/tsconfig.json",
|
2021-11-19 14:19:40 +00:00
|
|
|
"./tsconfig.json",
|
2023-02-13 11:17:55 +00:00
|
|
|
"./api/tsconfig.json",
|
2023-09-07 17:36:01 +00:00
|
|
|
"./shared/tsconfig.json",
|
2023-07-28 05:36:25 +00:00
|
|
|
"./tools/client-plugins/browser-scripts/tsconfig.json",
|
2023-08-11 08:40:10 +00:00
|
|
|
"./e2e/tsconfig.json"
|
2021-07-10 20:06:47 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
"extends": [
|
|
|
|
"plugin:@typescript-eslint/recommended",
|
2023-07-24 20:12:47 +00:00
|
|
|
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
|
|
|
"plugin:import/typescript"
|
2021-07-10 20:06:47 +00:00
|
|
|
],
|
2021-11-11 18:09:50 +00:00
|
|
|
"plugins": ["@typescript-eslint"],
|
|
|
|
"rules": {
|
2023-07-24 20:12:47 +00:00
|
|
|
"import/no-unresolved": "off",
|
2021-12-02 00:01:12 +00:00
|
|
|
"import/named": 0,
|
2023-09-30 13:23:39 +00:00
|
|
|
"@typescript-eslint/naming-convention": "off"
|
2021-11-11 18:09:50 +00:00
|
|
|
}
|
2021-07-10 20:06:47 +00:00
|
|
|
},
|
|
|
|
{
|
2024-04-08 17:35:30 +00:00
|
|
|
"files": ["./client/**/*.test.[jt]s?(x)"],
|
2021-12-02 00:01:12 +00:00
|
|
|
"extends": [
|
|
|
|
"plugin:testing-library/react",
|
|
|
|
"plugin:jest-dom/recommended"
|
|
|
|
],
|
|
|
|
"rules": { "import/named": 2 }
|
2021-08-24 14:29:00 +00:00
|
|
|
},
|
2023-08-11 08:40:10 +00:00
|
|
|
{
|
|
|
|
"files": ["e2e/*.ts"],
|
|
|
|
"rules": {
|
|
|
|
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
|
|
"@typescript-eslint/no-unsafe-call": "off",
|
|
|
|
"@typescript-eslint/no-unsafe-assignment": "off"
|
|
|
|
}
|
|
|
|
},
|
2023-01-25 04:51:57 +00:00
|
|
|
{
|
|
|
|
"files": ["**/api-server/**/*", "**/404.*"],
|
|
|
|
"rules": {
|
|
|
|
"filenames-simple/naming-convention": "off"
|
|
|
|
}
|
2023-08-03 16:20:54 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"files": ["**/api/src/**/*.ts"],
|
|
|
|
"plugins": ["jsdoc"],
|
|
|
|
"extends": ["plugin:jsdoc/recommended-typescript-error"],
|
|
|
|
"rules": {
|
|
|
|
"jsdoc/require-jsdoc": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"require": {
|
|
|
|
"ArrowFunctionExpression": true,
|
|
|
|
"ClassDeclaration": true,
|
|
|
|
"ClassExpression": true,
|
|
|
|
"FunctionDeclaration": true,
|
|
|
|
"FunctionExpression": true,
|
|
|
|
"MethodDefinition": true
|
|
|
|
},
|
|
|
|
"publicOnly": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"jsdoc/require-description-complete-sentence": "warn",
|
|
|
|
"jsdoc/tag-lines": "off"
|
|
|
|
}
|
2021-07-10 20:06:47 +00:00
|
|
|
}
|
|
|
|
]
|
2021-05-17 18:53:41 +00:00
|
|
|
}
|