-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: upgrade typescript + prettier + eslint with a single shared linting config #424
Changes from all commits
43e1eec
f1f2fd9
61e2fd7
9210246
18812d2
b9ece78
b4aa386
ef3f6e1
8dd982f
add0c82
2067cd7
5b6d0eb
283bf67
af4ecbc
ad92c5a
f83eab2
d0090c7
efc69ea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
{ | ||
"name": "@oakai/nextjs", | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lovely |
||
"private": true, | ||
"scripts": { | ||
"build": "next build", | ||
"build:dev": "pnpm with-env next build", | ||
"check": "tsc --noEmit", | ||
"clean": "rm -rf .next .turbo node_modules", | ||
"dev": "FORCE_COLOR=1 SENTRY_SUPPRESS_TURBOPACK_WARNING=1 pnpm with-env node scripts/increase-listeners.js next dev --port 2525 --turbo | pino-pretty -C", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice! |
||
"dev:sentry": "FORCE_COLOR=1 pnpm with-env node scripts/increase-listeners.js next dev --port 2525 | pino-pretty -C", | ||
"dev": "FORCE_COLOR=1 SENTRY_SUPPRESS_TURBOPACK_WARNING=1 pnpm with-env next dev --port 2525 --turbo | pino-pretty -C", | ||
"dev:sentry": "FORCE_COLOR=1 pnpm with-env next dev --port 2525 | pino-pretty -C", | ||
"dev-trace-deprecation": "NODE_OPTIONS=\"--trace-deprecation\" next dev --port 2525 | pino-pretty -C", | ||
"lint": "next lint", | ||
"lint": "eslint .", | ||
"lint-fix": "next lint --fix", | ||
"lint-debug": "eslint --debug .", | ||
"start": "next start", | ||
"type-check": "tsc --noEmit", | ||
"test": "pnpm with-env jest --colors --config jest.config.js", | ||
"test:seq": "pnpm with-env jest --colors --config jest.config.js --verbose --runInBand --no-cache", | ||
"test": "pnpm with-env jest --colors --config jest.config.mjs", | ||
"test:seq": "pnpm with-env jest --colors --config jest.config.mjs --verbose --runInBand --no-cache", | ||
"test-e2e": "pnpm with-env playwright test", | ||
"test-e2e-ui": "pnpm with-env playwright test --ui", | ||
"test-e2e-ui-serve": "pnpm build && pnpm start --port 4848 --turbo", | ||
"test-e2e-ui-built": "PORT=4848 pnpm with-env playwright test --ui", | ||
"test-coverage": "COLLECT_TEST_COVERAGE=true pnpm with-env jest --colors --config jest.config.js --coverage", | ||
"test-coverage": "COLLECT_TEST_COVERAGE=true pnpm with-env jest --colors --config jest.config.mjs --coverage", | ||
"with-env": "dotenv -e ../../.env --", | ||
"aila": "tsx scripts/aila-cli.ts", | ||
"storybook": "dotenv -e ../../.env -- storybook dev -p 6006 --no-open", | ||
|
@@ -43,14 +44,15 @@ | |
"@oakai/api": "*", | ||
"@oakai/core": "*", | ||
"@oakai/db": "*", | ||
"@oakai/eslint-config": "*", | ||
"@oakai/exports": "*", | ||
"@oakai/logger": "*", | ||
"@oakai/prettier-config": "*", | ||
"@oaknational/oak-components": "^1.50.0", | ||
"@oaknational/oak-consent-client": "^2.1.0", | ||
"@portabletext/react": "^3.1.0", | ||
"@prisma/client": "5.16.1", | ||
"@prisma/extension-accelerate": "^1.0.0", | ||
"@prisma/client": "^5.16.1", | ||
"@prisma/extension-accelerate": "^1.2.1", | ||
"@radix-ui/react-accordion": "^1.1.2", | ||
"@radix-ui/react-icons": "^1.3.0", | ||
"@radix-ui/react-tooltip": "^1.0.7", | ||
|
@@ -141,26 +143,23 @@ | |
"@storybook/test": "^8.4.1", | ||
"@tailwindcss/typography": "^0.5.10", | ||
"@types/file-saver": "^2.0.6", | ||
"@types/jest": "^29.5.12", | ||
"@types/node": "^18.17.0", | ||
"@types/jest": "^29.5.14", | ||
"@types/node": "^20.9.0", | ||
"@types/react": "^18.2.37", | ||
"@types/react-dom": "^18.2.15", | ||
"@types/styled-components": "^5.1.34", | ||
"autoprefixer": "^10.4.16", | ||
"avo": "^3.2.11", | ||
"concurrently": "^8.2.2", | ||
"dotenv-cli": "^6.0.0", | ||
"eslint": "^8.56.0", | ||
"eslint-config-next": "15.0.1", | ||
"eslint-plugin-storybook": "^0.8.0", | ||
"graphql": "^16.9.0", | ||
"jest": "^29.7.0", | ||
"msw": "^2.6.5", | ||
"msw-storybook-addon": "^2.0.4", | ||
"postcss": "^8.4.32", | ||
"tailwindcss": "^3.3.7", | ||
"ts-jest": "^29.1.4", | ||
"typescript": "5.3.3", | ||
"ts-jest": "^29.2.5", | ||
"typescript": "5.7.2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bumps Typescript to latest |
||
"web-streams-polyfill": "^4.0.0" | ||
}, | ||
"engines": { | ||
|
@@ -171,5 +170,12 @@ | |
"workerDirectory": [ | ||
".storybook/public" | ||
] | ||
}, | ||
"eslintConfig": { | ||
"extends": "@oakai/eslint-config", | ||
"parserOptions": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"rules": {} | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ import { createOpenAIClient } from "@oakai/core/src/llm/openai"; | |
import { aiLogger } from "@oakai/logger"; | ||
import fs from "fs/promises"; | ||
import type OpenAI from "openai"; | ||
import type { ChatCompletionCreateParamsNonStreaming } from "openai/resources"; | ||
import type { ChatCompletionCreateParamsNonStreaming } from "openai/resources/index.mjs"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure why we have to do this now. This has changed a few times |
||
|
||
const log = aiLogger("fixtures"); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// Inspired by Chatbot-UI and modified to fit the needs of this project | ||
// @see https://github.com/mckaywrigley/chatbot-ui/blob/main/components/Chat/ChatMessage.tsx | ||
import type { ReactNode } from "react"; | ||
import type { ReactNode, JSX } from "react"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Global JSX is now deprecated |
||
import { useState } from "react"; | ||
|
||
import type { MessagePart } from "@oakai/aila/src/protocol/jsonPatchProtocol"; | ||
|
@@ -200,7 +200,7 @@ function MessageWrapper({ | |
|
||
function MessageTextWrapper({ children }: Readonly<{ children: ReactNode }>) { | ||
return ( | ||
<div className=" flex w-full flex-col items-start justify-between"> | ||
<div className="flex w-full flex-col items-start justify-between"> | ||
{children} | ||
</div> | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially we could refactor this all to use ESM but this is the minimal change to get this to work with the new requirement to use .cjs extensions for commonjs code