diff --git a/pages/app/index.tsx b/pages/app/index.tsx index a5b0b16aaa..f6ea0d8b87 100644 --- a/pages/app/index.tsx +++ b/pages/app/index.tsx @@ -24,8 +24,7 @@ function App() { urlParams: { density, motionDisabled }, } = useContext(AppContext); - const isAppLayout = - pageId !== undefined && (pageId.indexOf('app-layout') > -1 || pageId.indexOf('content-layout') > -1); + const isAppLayout = pageId !== undefined && (pageId.includes('app-layout') || pageId.includes('content-layout')); // AppLayout already contains
// Also, AppLayout pages should resemble the ConsoleNav 2.0 styles const ContentTag = isAppLayout ? 'div' : 'main'; diff --git a/pages/cards/selection.page.tsx b/pages/cards/selection.page.tsx index 0c699f0ccc..3ec389b931 100644 --- a/pages/cards/selection.page.tsx +++ b/pages/cards/selection.page.tsx @@ -13,7 +13,7 @@ interface Item { const ariaLabels: CardsProps['ariaLabels'] = { selectionGroupLabel: 'group label', itemSelectionLabel: ({ selectedItems }, item) => - `${item.text} is ${selectedItems.indexOf(item) < 0 ? 'not ' : ''}selected`, + `${item.text} is ${!selectedItems.includes(item) ? 'not ' : ''}selected`, }; function createSimpleItems(count: number) { diff --git a/pages/tsconfig.json b/pages/tsconfig.json index edf008d36e..5c14178b3d 100644 --- a/pages/tsconfig.json +++ b/pages/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "lib": ["ES2015", "DOM"], + "lib": ["ES2020", "DOM"], "target": "ES2015", "declaration": false, "declarationMap": false, diff --git a/src/test-utils/tsconfig.json b/src/test-utils/tsconfig.json index 3fbd14e166..8a751a4639 100644 --- a/src/test-utils/tsconfig.json +++ b/src/test-utils/tsconfig.json @@ -4,7 +4,7 @@ "incremental": true, "module": "CommonJS", "target": "ES2015", - "lib": ["ES2015", "DOM"], + "lib": ["ES2020", "DOM"], "declaration": true, "allowSyntheticDefaultImports": true, "outDir": "../../lib/components/test-utils", diff --git a/tsconfig.integ.json b/tsconfig.integ.json index a71a0b8918..9eca090158 100644 --- a/tsconfig.integ.json +++ b/tsconfig.integ.json @@ -1,8 +1,6 @@ { + "extends": "@tsconfig/node16/tsconfig.json", "compilerOptions": { - "module": "commonjs", - "target": "es2017", - "lib": ["es2017", "dom"], "types": ["jest"], "noEmit": true, "strict": true, diff --git a/tsconfig.json b/tsconfig.json index 5fbd373394..6fa37ece67 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "lib": ["ES2015", "ES2017.Intl", "ES2018.Intl", "ES2020.Intl", "DOM"], + "lib": ["ES2020", "DOM"], "target": "ES2015", "types": [], "module": "ES2015", diff --git a/tsconfig.unit.json b/tsconfig.unit.json index 61d5d5420a..8b2c7d5258 100644 --- a/tsconfig.unit.json +++ b/tsconfig.unit.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "es2018", - "lib": ["es2018", "dom"], + "lib": ["es2020", "dom"], "types": ["node", "jest", "@testing-library/jest-dom"], "moduleResolution": "node", "downlevelIteration": true,