Skip to content

Commit

Permalink
chore: update tsconfig.json to allow latest EcmaScript version
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Aug 8, 2023
1 parent 6175fce commit b955d2c
Show file tree
Hide file tree
Showing 37 changed files with 79 additions and 83 deletions.
2 changes: 1 addition & 1 deletion docs/guides/migrating-react-router-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ If you are using TypeScript, you likely already have a `tsconfig.json` in your p
{
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2019"],
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ Remix has TypeScript type definitions built-in as well. The starter templates cr
{
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2019"],
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"moduleResolution": "node",
"resolveJsonModule": true,
"target": "ES2019",
"target": "ES2022",
"strict": true,
"allowJs": true,
"forceConsistentCasingInFileNames": true,
Expand Down
4 changes: 2 additions & 2 deletions integration/helpers/cf-template/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2019"],
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"moduleResolution": "node",
"resolveJsonModule": true,
"target": "ES2019",
"target": "ES2022",
"strict": true,
"allowJs": true,
"forceConsistentCasingInFileNames": true,
Expand Down
4 changes: 2 additions & 2 deletions integration/helpers/node-template/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2019"],
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"moduleResolution": "node",
"resolveJsonModule": true,
"target": "ES2019",
"target": "ES2022",
"strict": true,
"allowJs": true,
"forceConsistentCasingInFileNames": true,
Expand Down
4 changes: 2 additions & 2 deletions integration/path-mapping-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ test.beforeAll(async () => {
"tsconfig.json": json({
include: ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
compilerOptions: {
lib: ["DOM", "DOM.Iterable", "ES2019"],
lib: ["DOM", "DOM.Iterable", "ES2022"],
isolatedModules: true,
esModuleInterop: true,
jsx: "react-jsx",
moduleResolution: "node",
resolveJsonModule: true,
target: "ES2019",
target: "ES2022",
strict: true,
baseUrl: ".",
paths: {
Expand Down
6 changes: 3 additions & 3 deletions integration/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"include": ["**/*.ts"],
"exclude": ["helpers/*-template"],
"compilerOptions": {
"lib": ["ES2019", "DOM", "DOM.Iterable"],
"target": "ES2019",
"module": "CommonJS",
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"target": "ES2022",
"module": "ES2022",
"skipLibCheck": true,

"moduleResolution": "node",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-remix/__tests__/fixtures/stack/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"compilerOptions": {
"allowJs": true,
"forceConsistentCasingInFileNames": true,
"lib": ["DOM", "DOM.Iterable", "ES2019"],
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"moduleResolution": "node",
"resolveJsonModule": true,
"target": "ES2019",
"target": "ES2022",
"strict": true,
"baseUrl": ".",
"paths": {
Expand Down
6 changes: 3 additions & 3 deletions packages/create-remix/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"include": ["**/*.ts", "./package.json"],
"exclude": ["dist", "**/node_modules/**", "__tests__"],
"compilerOptions": {
"lib": ["ES2019", "DOM", "DOM.Iterable"],
"target": "ES2019",
"module": "CommonJS",
"lib": ["ES2022"],
"target": "ES2022",
"module": "ES2022",
"skipLibCheck": true,
"composite": true,

Expand Down
4 changes: 2 additions & 2 deletions packages/remix-architect/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"include": ["**/*.ts"],
"exclude": ["dist", "__tests__", "node_modules"],
"compilerOptions": {
"lib": ["ES2019", "DOM.Iterable"],
"target": "ES2019",
"lib": ["ES2022", "DOM.Iterable"],
"target": "ES2022",
"skipLibCheck": true,
"composite": true,

Expand Down
4 changes: 2 additions & 2 deletions packages/remix-cloudflare-pages/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"include": ["**/*.ts"],
"exclude": ["dist", "__tests__", "node_modules"],
"compilerOptions": {
"lib": ["ES2019"],
"target": "ES2019",
"lib": ["ES2022"],
"target": "ES2022",
"types": ["@cloudflare/workers-types"],
"composite": true,

Expand Down
4 changes: 2 additions & 2 deletions packages/remix-cloudflare-workers/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"include": ["**/*.ts"],
"exclude": ["dist", "__tests__", "node_modules"],
"compilerOptions": {
"lib": ["ES2019"],
"target": "ES2019",
"lib": ["ES2022"],
"target": "ES2022",
"types": ["@cloudflare/workers-types"],
"composite": true,

Expand Down
4 changes: 2 additions & 2 deletions packages/remix-cloudflare/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"include": ["**/*.ts"],
"exclude": ["dist", "__tests__", "node_modules"],
"compilerOptions": {
"lib": ["ES2019"],
"target": "ES2019",
"lib": ["ES2022"],
"target": "ES2022",
"types": ["@cloudflare/workers-types"],
"composite": true,

Expand Down
6 changes: 3 additions & 3 deletions packages/remix-css-bundle/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"include": ["**/*.ts"],
"exclude": ["dist", "__tests__", "node_modules"],
"compilerOptions": {
"lib": ["ES2019", "DOM.Iterable"],
"target": "ES2019",
"module": "CommonJS",
"lib": ["ES2022"],
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"strict": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2019"],
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"moduleResolution": "node",
"resolveJsonModule": true,
"target": "ES2019",
"target": "ES2022",
"strict": true,
"allowJs": true,
"forceConsistentCasingInFileNames": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"exclude": ["./cypress", "./cypress.config.ts"],
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2019"],
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"types": ["vitest/globals"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"module": "CommonJS",
"module": "ES2022",
"moduleResolution": "node",
"resolveJsonModule": true,
"target": "ES2019",
"target": "ES2022",
"strict": true,
"allowJs": true,
"forceConsistentCasingInFileNames": true,
Expand Down
4 changes: 2 additions & 2 deletions packages/remix-dev/__tests__/fixtures/node/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2019"],
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"moduleResolution": "node",
"resolveJsonModule": true,
"target": "ES2019",
"target": "ES2022",
"strict": true,
"allowJs": true,
"forceConsistentCasingInFileNames": true,
Expand Down
4 changes: 2 additions & 2 deletions packages/remix-dev/__tests__/fixtures/stack/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"compilerOptions": {
"allowJs": true,
"forceConsistentCasingInFileNames": true,
"lib": ["DOM", "DOM.Iterable", "ES2019"],
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"moduleResolution": "node",
"resolveJsonModule": true,
"target": "ES2019",
"target": "ES2022",
"strict": true,
"baseUrl": ".",
"paths": {
Expand Down
4 changes: 0 additions & 4 deletions packages/remix-dev/cli/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,11 @@ let clientEntries = ["entry.client.tsx", "entry.client.js", "entry.client.jsx"];
let serverEntries = ["entry.server.tsx", "entry.server.js", "entry.server.jsx"];
let entries = ["entry.client", "entry.server"];

// @ts-expect-error available in node 12+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat#browser_compatibility
let conjunctionListFormat = new Intl.ListFormat("en", {
style: "long",
type: "conjunction",
});

// @ts-expect-error available in node 12+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat#browser_compatibility
let disjunctionListFormat = new Intl.ListFormat("en", {
style: "long",
type: "disjunction",
Expand Down
6 changes: 3 additions & 3 deletions packages/remix-dev/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"include": ["**/*.ts", "package.json"],
"exclude": ["dist", "__tests__", "node_modules"],
"compilerOptions": {
"lib": ["ES2019", "DOM.Iterable"],
"target": "ES2019",
"module": "CommonJS",
"lib": ["ES2022"],
"target": "ES2022",
"module": "ES2022",
"composite": true,

"moduleResolution": "node",
Expand Down
4 changes: 2 additions & 2 deletions packages/remix-express/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"include": ["**/*.ts"],
"exclude": ["dist", "__tests__", "node_modules"],
"compilerOptions": {
"lib": ["ES2019", "DOM.Iterable"],
"target": "ES2019",
"lib": ["ES2022", "DOM.Iterable"],
"target": "ES2022",
"skipLibCheck": true,
"composite": true,

Expand Down
4 changes: 2 additions & 2 deletions packages/remix-netlify/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"exclude": ["dist", "__tests__", "node_modules"],
"compilerOptions": {
"lib": ["ES2019", "DOM.Iterable"],
"target": "ES2019",
"lib": ["ES2022", "DOM.Iterable"],
"target": "ES2022",
"skipLibCheck": true,
"composite": true,

Expand Down
4 changes: 2 additions & 2 deletions packages/remix-node/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"include": ["**/*.ts"],
"exclude": ["dist", "__tests__", "node_modules"],
"compilerOptions": {
"lib": ["ES2019", "DOM.Iterable"],
"target": "ES2019",
"lib": ["ES2022"],
"target": "ES2022",
"composite": true,

"moduleResolution": "node",
Expand Down
6 changes: 3 additions & 3 deletions packages/remix-react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"include": ["**/*.ts", "**/*.tsx"],
"exclude": ["dist", "__tests__", "node_modules"],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2020"],
"target": "ES2020",
"module": "ES2020",
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"target": "ES2022",
"module": "ES2022",
"skipLibCheck": true,
"composite": true,

Expand Down
4 changes: 2 additions & 2 deletions packages/remix-serve/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"include": ["**/*.ts"],
"exclude": ["dist", "__tests__", "node_modules"],
"compilerOptions": {
"lib": ["ES2019", "DOM.Iterable"],
"target": "ES2019",
"lib": ["ES2022"],
"target": "ES2022",
"skipLibCheck": true,
"composite": true,

Expand Down
4 changes: 2 additions & 2 deletions packages/remix-server-runtime/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"include": ["**/*.ts"],
"exclude": ["dist", "__tests__", "node_modules"],
"compilerOptions": {
"lib": ["ES2019", "DOM", "DOM.Iterable"],
"target": "ES2019",
"lib": ["ES2022"],
"target": "ES2022",
"composite": true,

"moduleResolution": "node",
Expand Down
6 changes: 3 additions & 3 deletions packages/remix-testing/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"include": ["**/*.ts", "**/*.tsx"],
"exclude": ["dist", "__tests__", "node_modules"],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2020"],
"target": "ES2020",
"module": "ES2020",
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"target": "ES2022",
"module": "ES2022",
"skipLibCheck": true,
"composite": true,

Expand Down
4 changes: 2 additions & 2 deletions packages/remix-vercel/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"include": ["**/*.ts"],
"exclude": ["dist", "__tests__", "node_modules"],
"compilerOptions": {
"lib": ["ES2019", "DOM.Iterable"],
"target": "ES2019",
"lib": ["ES2022", "DOM.Iterable"],
"target": "ES2022",
"skipLibCheck": true,
"composite": true,

Expand Down
6 changes: 3 additions & 3 deletions packages/remix/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"include": ["**/*.ts"],
"exclude": ["dist", "__tests__", "node_modules"],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2020"],
"target": "ES2020",
"module": "ES2020",
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"target": "ES2022",
"module": "ES2022",
"skipLibCheck": true,
"composite": true,

Expand Down
2 changes: 1 addition & 1 deletion scripts/deployment-test/cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"esModuleInterop": true,
"jsx": "react",
"moduleResolution": "node",
"target": "es2019",
"target": "ES2022",
"strict": true,
"skipLibCheck": true,
"resolveJsonModule": true,
Expand Down
Loading

0 comments on commit b955d2c

Please sign in to comment.