Skip to content

Commit

Permalink
chore: Upgrade tsconfigs
Browse files Browse the repository at this point in the history
  • Loading branch information
just-boris committed Aug 7, 2023
1 parent d87a49a commit dc2d596
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 10 deletions.
3 changes: 1 addition & 2 deletions pages/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <main>
// Also, AppLayout pages should resemble the ConsoleNav 2.0 styles
const ContentTag = isAppLayout ? 'div' : 'main';
Expand Down
2 changes: 1 addition & 1 deletion pages/cards/selection.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface Item {
const ariaLabels: CardsProps<Item>['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) {
Expand Down
2 changes: 1 addition & 1 deletion pages/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"lib": ["ES2015", "DOM"],
"lib": ["ES2020", "DOM"],
"target": "ES2015",
"declaration": false,
"declarationMap": false,
Expand Down
2 changes: 1 addition & 1 deletion src/test-utils/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 1 addition & 3 deletions tsconfig.integ.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"extends": "@tsconfig/node16/tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"target": "es2017",
"lib": ["es2017", "dom"],
"types": ["jest"],
"noEmit": true,
"strict": true,
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"lib": ["ES2015", "ES2017.Intl", "ES2018.Intl", "ES2020.Intl", "DOM"],
"lib": ["ES2020", "DOM"],
"target": "ES2015",
"types": [],
"module": "ES2015",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.unit.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "es2018",
"lib": ["es2018", "dom"],
"lib": ["es2020", "dom"],
"types": ["node", "jest", "@testing-library/jest-dom"],
"moduleResolution": "node",
"downlevelIteration": true,
Expand Down

0 comments on commit dc2d596

Please sign in to comment.