-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:Budibase/budibase
- Loading branch information
Showing
148 changed files
with
1,172 additions
and
1,466 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,197 @@ | ||
import globals from "globals" | ||
import babelParser from "@babel/eslint-parser" | ||
import svelteParser from "svelte-eslint-parser" | ||
import tsParser from "@typescript-eslint/parser" | ||
|
||
import eslintPluginJest from "eslint-plugin-jest" | ||
import eslintPluginSvelte from "eslint-plugin-svelte" | ||
import eslintPluginLocalRules from "eslint-plugin-local-rules" | ||
import eslintPluginVitest from "@vitest/eslint-plugin" | ||
|
||
import eslint from "@eslint/js" | ||
import tseslint from "typescript-eslint" | ||
|
||
export default [ | ||
eslint.configs.recommended, | ||
{ | ||
ignores: [ | ||
"**/node_modules", | ||
"**/dist", | ||
"**/public", | ||
"**/bundle.js", | ||
"**/coverage", | ||
"packages/server/builder", | ||
"packages/server/client", | ||
"packages/builder/.routify", | ||
"packages/sdk/sdk", | ||
"**/*.ivm.bundle.js", | ||
"packages/server/build/oldClientVersions/**/**/*", | ||
], | ||
}, | ||
{ | ||
plugins: { | ||
"local-rules": eslintPluginLocalRules, | ||
}, | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.jest, | ||
...globals.node, | ||
GeolocationPositionError: true, | ||
}, | ||
|
||
parser: babelParser, | ||
ecmaVersion: 2019, | ||
sourceType: "module", | ||
|
||
parserOptions: { | ||
allowImportExportEverywhere: true, | ||
}, | ||
}, | ||
|
||
rules: { | ||
"no-self-compare": "error", | ||
"no-template-curly-in-string": "error", | ||
"no-unmodified-loop-condition": "error", | ||
"no-unreachable-loop": "error", | ||
"no-implied-eval": "error", | ||
"no-extend-native": "error", | ||
"no-labels": "error", | ||
"no-lone-blocks": "error", | ||
"no-new-wrappers": "error", | ||
"no-octal-escape": "error", | ||
"no-return-assign": "error", | ||
"no-useless-concat": "error", | ||
"no-useless-constructor": "error", | ||
"no-useless-rename": "error", | ||
"no-var": "error", | ||
"no-void": "error", | ||
|
||
"no-unused-vars": [ | ||
"error", | ||
{ | ||
varsIgnorePattern: "^_", | ||
argsIgnorePattern: "^_", | ||
destructuredArrayIgnorePattern: "^_", | ||
ignoreRestSiblings: true, | ||
caughtErrors: "none", | ||
}, | ||
], | ||
}, | ||
}, | ||
...eslintPluginSvelte.configs["flat/recommended"].map(config => ({ | ||
...config, | ||
files: ["**/*.svelte"], | ||
|
||
languageOptions: { | ||
parser: svelteParser, | ||
ecmaVersion: 2019, | ||
sourceType: "script", | ||
|
||
parserOptions: { | ||
parser: "@typescript-eslint/parser", | ||
allowImportExportEverywhere: true, | ||
}, | ||
}, | ||
})), | ||
...tseslint.configs.strict.map(config => ({ | ||
...config, | ||
files: ["**/*.ts"], | ||
|
||
languageOptions: { | ||
globals: { | ||
NodeJS: true, | ||
}, | ||
|
||
parser: tsParser, | ||
}, | ||
|
||
rules: { | ||
"local-rules/no-barrel-imports": "error", | ||
"local-rules/no-budibase-imports": "error", | ||
"local-rules/no-console-error": "error", | ||
|
||
"@typescript-eslint/no-inferrable-types": "error", | ||
"@typescript-eslint/adjacent-overload-signatures": "error", | ||
"@typescript-eslint/class-literal-property-style": "error", | ||
"@typescript-eslint/no-confusing-non-null-assertion": "error", | ||
"@typescript-eslint/no-unnecessary-parameter-property-assignment": | ||
"error", | ||
"@typescript-eslint/no-useless-empty-export": "error", | ||
|
||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
varsIgnorePattern: "^_", | ||
argsIgnorePattern: "^_", | ||
destructuredArrayIgnorePattern: "^_", | ||
ignoreRestSiblings: true, | ||
caughtErrors: "none", | ||
}, | ||
], | ||
|
||
"no-redeclare": "off", | ||
"@typescript-eslint/no-redeclare": "error", | ||
|
||
// @typescript-eslint/no-dupe-class-members supersedes no-dupe-class-members | ||
"no-dupe-class-members": "off", | ||
"@typescript-eslint/no-dupe-class-members": "error", | ||
|
||
"no-useless-constructor": "off", | ||
"@typescript-eslint/no-useless-constructor": "error", | ||
}, | ||
})), | ||
{ | ||
files: ["**/*.spec.ts", "**/*.spec.js"], | ||
|
||
plugins: { | ||
jest: eslintPluginJest, | ||
vitest: eslintPluginVitest, | ||
}, | ||
|
||
languageOptions: { | ||
globals: { | ||
...eslintPluginJest.environments.globals.globals, | ||
...eslintPluginVitest.environments.env.globals, | ||
NodeJS: true, | ||
}, | ||
|
||
parser: tsParser, | ||
}, | ||
|
||
rules: { | ||
...eslintPluginVitest.configs.recommended.rules, | ||
...eslintPluginJest.configs.recommended.rules, | ||
|
||
"no-console": "warn", | ||
|
||
"vitest/expect-expect": "off", | ||
|
||
"jest/expect-expect": "off", | ||
"jest/no-conditional-expect": "off", | ||
"jest/no-disabled-tests": "off", | ||
"jest/no-standalone-expect": "off", | ||
|
||
"local-rules/no-test-com": "error", | ||
"local-rules/email-domain-example-com": "error", | ||
}, | ||
}, | ||
{ | ||
files: [ | ||
"packages/builder/**/*", | ||
"packages/client/**/*", | ||
"packages/frontend-core/**/*", | ||
], | ||
|
||
rules: { | ||
"no-console": [ | ||
"error", | ||
{ | ||
allow: ["warn", "error", "debug"], | ||
}, | ||
], | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,10 +147,12 @@ | |
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" | ||
integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= | ||
|
||
"@types/[email protected]": | ||
version "17.0.21" | ||
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.21.tgz#864b987c0c68d07b4345845c3e63b75edd143644" | ||
integrity sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ== | ||
"@types/node@^20.17.9": | ||
version "20.17.9" | ||
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.17.9.tgz#5f141d4b7ee125cdee5faefe28de095398865bab" | ||
integrity sha512-0JOXkRyLanfGPE2QRCwgxhzlBAvaRdCNMcvbd7jFfpmD4eEXll7LRwy5ymJmyeZqk7Nh7eD2LeUyQ68BbndmXw== | ||
dependencies: | ||
undici-types "~6.19.2" | ||
|
||
"@types/prop-types@*": | ||
version "15.7.4" | ||
|
@@ -1746,10 +1748,10 @@ type-fest@^0.20.2: | |
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" | ||
integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== | ||
|
||
typescript@5.5.2: | ||
version "5.5.2" | ||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.2.tgz#c26f023cb0054e657ce04f72583ea2d85f8d0507" | ||
integrity sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew== | ||
typescript@5.7.2: | ||
version "5.7.2" | ||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6" | ||
integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg== | ||
|
||
unbox-primitive@^1.0.1: | ||
version "1.0.1" | ||
|
@@ -1761,6 +1763,11 @@ unbox-primitive@^1.0.1: | |
has-symbols "^1.0.2" | ||
which-boxed-primitive "^1.0.2" | ||
|
||
undici-types@~6.19.2: | ||
version "6.19.8" | ||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" | ||
integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== | ||
|
||
uri-js@^4.2.2: | ||
version "4.4.1" | ||
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" | ||
|
Oops, something went wrong.