From 40b35d0a1ad6c686038df35a15f8ad9560477e62 Mon Sep 17 00:00:00 2001 From: onemen Date: Mon, 12 Jun 2023 22:24:54 +0300 Subject: [PATCH] add prettier overrides for json files (#167) --- .prettierignore | 1 - .prettierrc.cjs | 8 ++++++ .vscode/extensions.json | 12 ++++---- package.json | 3 +- tsconfig.json | 64 ++++++++++++++++++++--------------------- 5 files changed, 48 insertions(+), 40 deletions(-) diff --git a/.prettierignore b/.prettierignore index 5c34cfb2e..f022d0280 100644 --- a/.prettierignore +++ b/.prettierignore @@ -12,5 +12,4 @@ node_modules /coverage /prisma/migrations -package.json package-lock.json diff --git a/.prettierrc.cjs b/.prettierrc.cjs index ffb76d8ac..c7984e547 100644 --- a/.prettierrc.cjs +++ b/.prettierrc.cjs @@ -17,4 +17,12 @@ module.exports = { tabWidth: 2, trailingComma: 'all', useTabs: true, + overrides: [ + { + files: ['**/*.json'], + options: { + useTabs: false, + }, + }, + ], } diff --git a/.vscode/extensions.json b/.vscode/extensions.json index fe6e3bd0c..248df1372 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,8 +1,8 @@ { - "recommendations": [ - "dbaeumer.vscode-eslint", - "esbenp.prettier-vscode", - "prisma.prisma", - "bradlc.vscode-tailwindcss" - ] + "recommendations": [ + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "prisma.prisma", + "bradlc.vscode-tailwindcss" + ] } diff --git a/package.json b/package.json index 1bef83d95..eebc98ca2 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "build": "run-s build:*", "build:remix": "remix build --sourcemap", "build:server": "tsx ./other/build-server.ts", - "dev": "remix dev -c \"node ./server/dev-server.js\" --no-restart", + "dev": "remix dev -c \"npm run dev:server\" --no-restart", + "dev:server": "cross-env MOCKS=true tsx watch --clear-screen=false --ignore \"app/**\" --ignore \"build/**\" --ignore \"node_modules/**\" --inspect ./index.js", "prisma:studio": "prisma studio", "format": "prettier --write .", "lint": "eslint --cache --cache-location ./node_modules/.cache/eslint .", diff --git a/tsconfig.json b/tsconfig.json index 83cb5bb94..a0551e904 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,35 +1,35 @@ { - "include": [ - "remix.env.d.ts", - "**/*.ts", - "**/*.tsx", - "./tests/setup/setup-test-env.ts" - ], - "compilerOptions": { - "lib": ["DOM", "DOM.Iterable", "ES2022"], - "types": [], - "isolatedModules": true, - "esModuleInterop": true, - "jsx": "react-jsx", - "module": "nodenext", - "moduleResolution": "nodenext", - "resolveJsonModule": true, - "target": "ES2022", - "strict": true, - "noImplicitAny": true, - "allowJs": true, - "forceConsistentCasingInFileNames": true, - "baseUrl": ".", - "paths": { - "~/*": ["./app/*"], - "prisma/*": ["./prisma/*"], - "tests/*": ["./tests/*"] - }, - "skipLibCheck": true, - "allowImportingTsExtensions": true, - "typeRoots": ["./types", "./node_modules/@types"], + "include": [ + "remix.env.d.ts", + "**/*.ts", + "**/*.tsx", + "./tests/setup/setup-test-env.ts" + ], + "compilerOptions": { + "lib": ["DOM", "DOM.Iterable", "ES2022"], + "types": [], + "isolatedModules": true, + "esModuleInterop": true, + "jsx": "react-jsx", + "module": "nodenext", + "moduleResolution": "nodenext", + "resolveJsonModule": true, + "target": "ES2022", + "strict": true, + "noImplicitAny": true, + "allowJs": true, + "forceConsistentCasingInFileNames": true, + "baseUrl": ".", + "paths": { + "~/*": ["./app/*"], + "prisma/*": ["./prisma/*"], + "tests/*": ["./tests/*"] + }, + "skipLibCheck": true, + "allowImportingTsExtensions": true, + "typeRoots": ["./types", "./node_modules/@types"], - // Remix takes care of building everything in `remix build`. - "noEmit": true - } + // Remix takes care of building everything in `remix build`. + "noEmit": true + } }