From 4bd3d6764bfd48c881d9722825309ddb5956c758 Mon Sep 17 00:00:00 2001 From: MCMXC <16797721+mcmxcdev@users.noreply.github.com> Date: Tue, 25 Jul 2023 09:20:43 -0600 Subject: style: reformat all files properly - remove .json from .eslintignore - add type intellisense to .prettierrc.js - install missing @jest/types which is used in jest.config.js - split up typecheck and lint into two separate commands - remove --require-pragma flag from reformat-files which leads to unformatted files - install suggested @types/prop-types and @types/react-loader dependencies - add @ts-expect-error to Loader usages - reformat all scss files automatically with reformat-files command --- package.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'package.json') diff --git a/package.json b/package.json index 049bb69ee..7a950caf7 100644 --- a/package.json +++ b/package.json @@ -30,15 +30,16 @@ "dev": "node esbuild.mjs --watch", "test": "jest", "test:watch": "jest --watch", - "lint": "tsc --noEmit && eslint \"{src,test,scripts}/**/*.{js,jsx,mjs,ts,tsx}\"", + "typecheck": "tsc --noEmit", + "lint": "eslint \"{src,test,scripts}/**/*.{js,jsx,mjs,ts,tsx}\"", "lint:fix": "eslint --fix \"{src,test,scripts}/**/*.{js,jsx,mjs,ts,tsx}\"", "extract": "formatjs extract \"src/**/*.{js,jsx,mjs,ts,tsx}\" --ignore=\"**/*.d.ts\" --out-file temp.json --flatten --id-interpolation-pattern '[sha512:contenthash:base64:6]' --preserve-whitespace", "compile": "formatjs compile \"temp.json\" --out-file src/i18n/locales/en-US.json", "manage-translations": "pnpm extract && pnpm compile && rimraf temp.json", "build": "preval-build-info-cli && node esbuild.mjs && electron-builder", "contributors": "all-contributors", - "reformat-files": "prettier --ignore-path .eslintignore --write --require-pragma \"**/*.{js,jsx,mjs,ts,tsx,scss}\"", - "prepare-code": "pnpm lint:fix && pnpm reformat-files && pnpm manage-translations", + "reformat-files": "prettier --ignore-path .eslintignore --write \"**/*.{js,jsx,mjs,ts,tsx,scss}\"", + "prepare-code": "pnpm typecheck && pnpm lint:fix && pnpm reformat-files && pnpm manage-translations", "link-readme": "ts-node scripts/link-readme.ts", "minify-images": "./scripts/minify-images.sh", "start:server": "ts-node src/internal-server/test.ts", @@ -133,6 +134,7 @@ "@commitlint/config-conventional": "17.6.7", "@electron/notarize": "1.2.3", "@formatjs/cli": "6.1.3", + "@jest/types": "29.6.1", "@types/color": "3.0.3", "@types/expect.js": "0.3.29", "@types/fs-extra": "11.0.1", @@ -140,8 +142,10 @@ "@types/lodash": "4.14.195", "@types/ms": "0.7.31", "@types/node": "18.15.3", + "@types/prop-types": "15.7.5", "@types/react": "18.2.12", "@types/react-dom": "18.2.5", + "@types/react-loader": "2.4.5", "@types/react-transition-group": "4.4.6", "@types/route-parser": "0.1.4", "@types/tar": "6.1.5", -- cgit v1.2.3-70-g09d2