mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
lint everything, disable some setup steps for jest (#8423)
This commit is contained in:
parent
d4cc843662
commit
2369d13ca2
3
backend/.eslintignore
Normal file
3
backend/.eslintignore
Normal file
@ -0,0 +1,3 @@
|
||||
node_modules/
|
||||
build/
|
||||
coverage/
|
||||
@ -12,7 +12,7 @@
|
||||
"build": "tsc && tsc-alias && ./scripts/build.copy.files.sh",
|
||||
"dev": "nodemon --exec ts-node --require tsconfig-paths/register src/ -e js,ts,gql",
|
||||
"dev:debug": "nodemon --exec babel-node --inspect=0.0.0.0:9229 src/ -e js,ts,gql",
|
||||
"lint": "eslint --max-warnings=0 --ext .js,.ts ./src",
|
||||
"lint": "eslint --max-warnings=0 --ext .js,.ts .",
|
||||
"test": "cross-env NODE_ENV=test NODE_OPTIONS=--max-old-space-size=8192 jest --runInBand --coverage --forceExit --detectOpenHandles",
|
||||
"db:reset": "ts-node --require tsconfig-paths/register src/db/reset.ts",
|
||||
"db:reset:withmigrations": "ts-node --require tsconfig-paths/register src/db/reset-with-migrations.ts",
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
// Polyfill missing encoders in jsdom
|
||||
// https://stackoverflow.com/questions/68468203/why-am-i-getting-textencoder-is-not-defined-in-jest
|
||||
import { TextEncoder, TextDecoder } from 'util'
|
||||
global.TextEncoder = TextEncoder
|
||||
global.TextDecoder = TextDecoder as any
|
||||
// import { TextEncoder, TextDecoder } from 'util'
|
||||
|
||||
// global.TextEncoder = TextEncoder
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
// global.TextDecoder = TextDecoder as any
|
||||
|
||||
// Metascraper takes longer nowadays, double time
|
||||
jest.setTimeout(10000)
|
||||
// jest.setTimeout(10000)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user