Skip to content

Commit

Permalink
tsconfig centralization + Update RAC everywhere (#6536)
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh authored Dec 13, 2024
1 parent 4dff6bd commit 086f950
Show file tree
Hide file tree
Showing 27 changed files with 58 additions and 1,850 deletions.
2 changes: 1 addition & 1 deletion apps/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@tanstack/react-query": "^5.59.0",
"next": "14.2.14",
"react": "^18",
"react-aria-components": "^1.4.0",
"react-aria-components": "^1.5.0",
"react-dom": "^18"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion apps/vite-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"axios": "^1.6.5",
"get-port": "^7.0.0",
"react": "^18.2.0",
"react-aria-components": "^1.4.0",
"react-aria-components": "^1.5.0",
"react-dom": "^18.2.0",
"sirv": "^2.0.4"
},
Expand Down
2 changes: 1 addition & 1 deletion apps/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@tanstack/router-devtools": "^1.67.0",
"axios": "^1.6.5",
"react": "^18.2.0",
"react-aria-components": "^1.4.0",
"react-aria-components": "^1.5.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/Image/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BlockViewProps } from '@plone/types';
import type { BlockViewProps } from '@plone/types';
import { usePloneProvider } from '@plone/providers';

const ImageBlockView = (props: BlockViewProps) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/RenderBlocks/BlockWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReactNode } from 'react';
import type { ReactNode } from 'react';
import cx from 'clsx';
import type { RenderBlocksProps } from './RenderBlocks';

Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/Teaser/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BlockViewProps } from '@plone/types';
import type { BlockViewProps } from '@plone/types';
import { Link } from '@plone/components';

const TeaserBlockView = (props: BlockViewProps) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ConfigType } from '@plone/registry';
import type { ConfigType } from '@plone/registry';
import { slate } from './config/slate';
import { blocksConfig } from './config';

Expand Down
1 change: 1 addition & 0 deletions packages/blocks/news/6536.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Centralize `tsconfig`. @sneridagh
2 changes: 2 additions & 0 deletions packages/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
"publishConfig": {
"access": "public"
},
"type": "module",
"main": "index.ts",
"scripts": {
"test": "vitest",
"check-ts": "tsc --project tsconfig.json",
"dry-release": "release-it --dry-run",
"release": "release-it",
"release-major-alpha": "release-it major --preRelease=alpha",
Expand Down
1 change: 1 addition & 0 deletions packages/helpers/news/6536.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Centralize `tsconfig`. @sneridagh
2 changes: 1 addition & 1 deletion packages/helpers/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "tsconfig/react-library.json",
"include": ["src", "src/**/*.js"],
"include": ["src"],
"exclude": [
"node_modules",
"build",
Expand Down
1 change: 1 addition & 0 deletions packages/providers/news/6536.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Centralize `tsconfig`. @sneridagh
23 changes: 1 addition & 22 deletions packages/providers/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
{
"compilerOptions": {
"esModuleInterop": true,
"skipLibCheck": true,
"target": "es2022",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
"isolatedModules": true,
"verbatimModuleSyntax": true,

"strict": true,
"noImplicitOverride": true,

"lib": ["es2022", "dom", "dom.iterable"],
"module": "preserve",
"noEmit": true,

"jsx": "react-jsx",

"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true
},
"extends": "tsconfig/react-library.json",
"include": ["src"],
"exclude": [
"node_modules",
Expand Down
2 changes: 1 addition & 1 deletion packages/slots/components/ContentArea.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import RenderBlocks from '@plone/blocks/RenderBlocks/RenderBlocks';
import { SlotComponentProps } from '../SlotRenderer';
import type { SlotComponentProps } from '../SlotRenderer';
import config from '@plone/registry';

const ContentArea = (props: SlotComponentProps) => {
Expand Down
1 change: 0 additions & 1 deletion packages/slots/components/Logo.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import Logo from './Logo';

import type { Meta, StoryObj } from '@storybook/react';
Expand Down
2 changes: 1 addition & 1 deletion packages/slots/components/Logo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SlotComponentProps } from '../SlotRenderer';
import type { SlotComponentProps } from '../SlotRenderer';
import { Link } from '@plone/components';
import LogoImage from './Logo.svg';
import config from '@plone/registry';
Expand Down
2 changes: 1 addition & 1 deletion packages/slots/components/MainFooter.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SlotComponentProps } from '../SlotRenderer';
import type { SlotComponentProps } from '../SlotRenderer';
import { Container, Link } from '@plone/components';
import Logo from './Logo';

Expand Down
1 change: 0 additions & 1 deletion packages/slots/components/Navigation.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import Navigation from './Navigation';

import type { Meta, StoryObj } from '@storybook/react';
Expand Down
1 change: 1 addition & 0 deletions packages/slots/news/6536.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Centralize `tsconfig`. @sneridagh
4 changes: 3 additions & 1 deletion packages/slots/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
"publishConfig": {
"access": "public"
},
"type": "module",
"main": "index.ts",
"scripts": {
"test": "vitest",
"check-ts": "tsc --project tsconfig.json",
"dry-release": "release-it --dry-run",
"release": "release-it",
"release-major-alpha": "release-it major --preRelease=alpha",
Expand All @@ -52,7 +54,7 @@
"@plone/client": "workspace:*",
"@plone/components": "workspace:*",
"@plone/registry": "workspace:*",
"react-aria-components": "^1.4.0"
"react-aria-components": "^1.5.0"
},
"devDependencies": {
"@plone/types": "workspace:*",
Expand Down
1 change: 1 addition & 0 deletions packages/theming/news/6536.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Centralize `tsconfig`. @sneridagh
36 changes: 2 additions & 34 deletions packages/theming/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,4 @@
{
"compilerOptions": {
"esModuleInterop": true,
"skipLibCheck": true,
"target": "es2022",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
"isolatedModules": true,
"verbatimModuleSyntax": true,

"strict": true,
"noImplicitOverride": true,

"lib": ["es2022", "dom", "dom.iterable"],
"module": "preserve",
"noEmit": true,

"jsx": "react-jsx",

"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,

"paths": {}
},
"include": ["src/index.ts"],
"exclude": [
"node_modules",
"build",
"public",
"coverage",
"src/**/*.test.{js,jsx,ts,tsx}",
"src/**/*.spec.{js,jsx,ts,tsx}",
"src/**/*.stories.{js,jsx,ts,tsx}"
]
"extends": "tsconfig/react-library.json",
"include": ["index.ts"]
}
29 changes: 17 additions & 12 deletions packages/tsconfig/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,27 @@
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Default",
"compilerOptions": {
"target": "ESNext",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"module": "commonjs",
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"strictPropertyInitialization": false,
"moduleResolution": "Node",
"skipLibCheck": true,
"target": "es2022",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
"isolatedModules": true,
"verbatimModuleSyntax": true,

"strict": true,
"noImplicitOverride": true,

"lib": ["es2022", "dom", "dom.iterable"],
"module": "preserve",
"noEmit": true,
"noImplicitAny": false,
"strict": false

"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,

"paths": {}
},
"include": ["src"],
"exclude": ["node_modules"]
"exclude": ["node_modules", "build", "public", "coverage"]
}
39 changes: 0 additions & 39 deletions packages/tsconfig/baseAdobe.json

This file was deleted.

19 changes: 0 additions & 19 deletions packages/tsconfig/baseold.json

This file was deleted.

13 changes: 0 additions & 13 deletions packages/tsconfig/nextjs.json

This file was deleted.

Loading

0 comments on commit 086f950

Please sign in to comment.