2020-01-31 15:23:16 +01:00
|
|
|
{
|
2024-05-02 13:55:51 +02:00
|
|
|
"root": true,
|
2020-01-31 15:23:16 +01:00
|
|
|
"env": {
|
|
|
|
"browser": true,
|
|
|
|
"es6": true,
|
2020-02-03 10:24:25 +01:00
|
|
|
"jest": true,
|
|
|
|
"node": true
|
2020-01-31 15:23:16 +01:00
|
|
|
},
|
2023-07-05 19:00:50 +02:00
|
|
|
"parser": "@babel/eslint-parser",
|
2020-01-31 15:23:16 +01:00
|
|
|
"parserOptions": {
|
|
|
|
"ecmaVersion": 2019,
|
2020-02-25 16:21:23 +01:00
|
|
|
"sourceType": "module",
|
|
|
|
"allowImportExportEverywhere": true
|
2020-01-31 15:23:16 +01:00
|
|
|
},
|
2021-06-15 13:42:50 +02:00
|
|
|
"ignorePatterns": [
|
|
|
|
"node_modules",
|
|
|
|
"dist",
|
|
|
|
"public",
|
|
|
|
"*.spec.js",
|
2023-06-26 16:04:13 +02:00
|
|
|
"bundle.js"
|
2021-06-15 13:42:50 +02:00
|
|
|
],
|
2020-01-31 15:23:16 +01:00
|
|
|
"extends": ["eslint:recommended"],
|
2023-11-17 14:39:52 +01:00
|
|
|
"plugins": ["import", "eslint-plugin-local-rules"],
|
2020-01-31 15:23:16 +01:00
|
|
|
"overrides": [
|
|
|
|
{
|
2023-07-05 19:00:50 +02:00
|
|
|
"files": ["**/*.svelte"],
|
|
|
|
"extends": "plugin:svelte/recommended",
|
|
|
|
"parser": "svelte-eslint-parser",
|
|
|
|
"parserOptions": {
|
|
|
|
"parser": "@babel/eslint-parser",
|
|
|
|
"ecmaVersion": 2019,
|
|
|
|
"sourceType": "module",
|
|
|
|
"allowImportExportEverywhere": true
|
|
|
|
}
|
2022-03-25 12:17:58 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"files": ["**/*.ts"],
|
|
|
|
"parser": "@typescript-eslint/parser",
|
2024-03-20 12:46:39 +01:00
|
|
|
"plugins": ["@typescript-eslint"],
|
2023-06-26 16:04:13 +02:00
|
|
|
"extends": ["eslint:recommended"],
|
2024-03-19 18:47:39 +01:00
|
|
|
"globals": {
|
|
|
|
"NodeJS": true
|
|
|
|
},
|
2022-03-25 12:17:58 +01:00
|
|
|
"rules": {
|
|
|
|
"no-unused-vars": "off",
|
2024-04-10 18:27:15 +02:00
|
|
|
"local-rules/no-budibase-imports": "error",
|
2024-04-19 14:29:21 +02:00
|
|
|
"local-rules/no-console-error": "error",
|
2024-04-16 17:02:58 +02:00
|
|
|
"@typescript-eslint/no-unused-vars": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"varsIgnorePattern": "^_",
|
|
|
|
"argsIgnorePattern": "^_",
|
|
|
|
"destructuredArrayIgnorePattern": "^_",
|
|
|
|
"ignoreRestSiblings": true
|
|
|
|
}
|
|
|
|
],
|
2024-04-25 16:40:13 +02:00
|
|
|
"no-redeclare": "off",
|
2024-05-16 14:39:16 +02:00
|
|
|
"@typescript-eslint/no-redeclare": "error",
|
|
|
|
// have to turn this off to allow function overloading in typescript
|
|
|
|
"no-dupe-class-members": "off"
|
2024-03-18 11:04:02 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"files": ["**/*.spec.ts"],
|
|
|
|
"parser": "@typescript-eslint/parser",
|
2024-03-20 12:46:39 +01:00
|
|
|
"plugins": ["jest", "@typescript-eslint"],
|
2024-03-19 10:45:38 +01:00
|
|
|
"extends": ["eslint:recommended", "plugin:jest/recommended"],
|
|
|
|
"env": {
|
|
|
|
"jest/globals": true
|
|
|
|
},
|
2024-03-19 18:47:39 +01:00
|
|
|
"globals": {
|
|
|
|
"NodeJS": true
|
|
|
|
},
|
2024-03-18 11:04:02 +01:00
|
|
|
"rules": {
|
2024-03-18 11:13:25 +01:00
|
|
|
"no-unused-vars": "off",
|
2024-04-16 17:02:58 +02:00
|
|
|
"@typescript-eslint/no-unused-vars": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"varsIgnorePattern": "^_",
|
|
|
|
"argsIgnorePattern": "^_",
|
|
|
|
"destructuredArrayIgnorePattern": "^_",
|
|
|
|
"ignoreRestSiblings": true
|
|
|
|
}
|
|
|
|
],
|
2024-02-21 12:30:22 +01:00
|
|
|
"local-rules/no-test-com": "error",
|
2024-03-18 11:04:02 +01:00
|
|
|
"local-rules/email-domain-example-com": "error",
|
2024-03-19 11:46:59 +01:00
|
|
|
"no-console": "warn",
|
|
|
|
// We have a lot of tests that don't have assertions, they use our test
|
|
|
|
// API client that does the assertions for them
|
|
|
|
"jest/expect-expect": "off",
|
|
|
|
// We do this in some tests where the behaviour of internal tables
|
|
|
|
// differs to external, but the API is broadly the same
|
2024-05-16 14:39:16 +02:00
|
|
|
"jest/no-conditional-expect": "off",
|
|
|
|
// have to turn this off to allow function overloading in typescript
|
2024-06-18 14:45:58 +02:00
|
|
|
"no-dupe-class-members": "off",
|
|
|
|
"no-redeclare": "off"
|
2022-03-25 12:17:58 +01:00
|
|
|
}
|
2024-01-31 14:47:27 +01:00
|
|
|
},
|
|
|
|
{
|
2024-01-31 14:53:53 +01:00
|
|
|
"files": [
|
|
|
|
"packages/builder/**/*",
|
|
|
|
"packages/client/**/*",
|
|
|
|
"packages/frontend-core/**/*"
|
|
|
|
],
|
2024-01-31 14:47:27 +01:00
|
|
|
"rules": {
|
2024-02-08 17:32:14 +01:00
|
|
|
"no-console": ["error", { "allow": ["warn", "error", "debug"] }]
|
2024-01-31 14:47:27 +01:00
|
|
|
}
|
2020-01-31 15:23:16 +01:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"rules": {
|
2023-07-05 19:00:50 +02:00
|
|
|
"no-self-assign": "off",
|
2023-11-17 13:03:28 +01:00
|
|
|
"no-unused-vars": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"varsIgnorePattern": "^_",
|
|
|
|
"argsIgnorePattern": "^_",
|
2024-04-16 17:02:58 +02:00
|
|
|
"destructuredArrayIgnorePattern": "^_",
|
|
|
|
"ignoreRestSiblings": true
|
2023-11-17 13:03:28 +01:00
|
|
|
}
|
|
|
|
],
|
2023-11-20 15:46:24 +01:00
|
|
|
"import/no-relative-packages": "error",
|
2023-11-20 16:15:43 +01:00
|
|
|
"import/export": "error",
|
2023-11-20 21:52:29 +01:00
|
|
|
"import/no-duplicates": "error",
|
|
|
|
"import/newline-after-import": "error"
|
2022-03-08 17:41:21 +01:00
|
|
|
},
|
|
|
|
"globals": {
|
|
|
|
"GeolocationPositionError": true
|
2020-01-31 15:23:16 +01:00
|
|
|
}
|
2021-06-15 13:42:50 +02:00
|
|
|
}
|