Skip to content

Commit a361af8

Browse files
committed
chore(fuselage-ui-kit): Review build configuration
1 parent 48953d2 commit a361af8

File tree

13 files changed

+29
-122
lines changed

13 files changed

+29
-122
lines changed

packages/fuselage-ui-kit/.babelrc.json

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 2 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,4 @@
11
{
2-
"extends": [
3-
"plugin:@typescript-eslint/recommended",
4-
"plugin:@typescript-eslint/eslint-recommended",
5-
"@rocket.chat/eslint-config/original",
6-
"@rocket.chat/eslint-config/react",
7-
"prettier",
8-
"plugin:anti-trojan-source/recommended",
9-
"plugin:react/jsx-runtime",
10-
"plugin:storybook/recommended"
11-
],
12-
"parser": "@typescript-eslint/parser",
13-
"plugins": ["@typescript-eslint", "prettier"],
14-
"rules": {
15-
"func-call-spacing": "off",
16-
"import/named": "error",
17-
"import/order": [
18-
"error",
19-
{
20-
"newlines-between": "always",
21-
"groups": ["builtin", "external", "internal", ["parent", "sibling", "index"]],
22-
"alphabetize": {
23-
"order": "asc"
24-
}
25-
}
26-
],
27-
"indent": "off",
28-
"jsx-quotes": ["error", "prefer-single"],
29-
"new-cap": ["error"],
30-
"no-extra-parens": "off",
31-
"no-spaced-func": "off",
32-
"no-undef": "off",
33-
"no-unused-vars": "off",
34-
"no-useless-constructor": "off",
35-
"no-use-before-define": "off",
36-
"prefer-arrow-callback": ["error", { "allowNamedFunctions": true }],
37-
"prettier/prettier": 2
38-
},
39-
"settings": {
40-
"import/resolver": {
41-
"node": {
42-
"extensions": [".js", ".ts", ".tsx"]
43-
}
44-
}
45-
},
46-
"ignorePatterns": ["dist", "storybook-static", "!.storybook"],
47-
"overrides": [
48-
{
49-
"files": ["*.ts", "*.tsx"],
50-
"rules": {
51-
"@typescript-eslint/ban-ts-ignore": "off",
52-
"@typescript-eslint/indent": "off",
53-
"@typescript-eslint/no-extra-parens": "off",
54-
"@typescript-eslint/no-explicit-any": "off",
55-
"@typescript-eslint/no-unused-vars": [
56-
"error",
57-
{
58-
"argsIgnorePattern": "^_"
59-
}
60-
],
61-
"@typescript-eslint/prefer-optional-chain": "warn"
62-
}
63-
}
64-
]
2+
"extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react", "plugin:storybook/recommended"],
3+
"ignorePatterns": ["dist", "storybook-static", "!.storybook"]
654
}

packages/fuselage-ui-kit/.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88
addons: [
99
getAbsolutePath('@storybook/addon-essentials'),
1010
getAbsolutePath('storybook-dark-mode'),
11-
'./webpackAddon',
11+
getAbsolutePath('@storybook/addon-webpack5-compiler-swc'),
1212
getAbsolutePath('@storybook/addon-styling-webpack'),
1313
],
1414

packages/fuselage-ui-kit/.storybook/webpackAddon.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/fuselage-ui-kit/package.json

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,19 @@
1717
"name": "Rocket.Chat",
1818
"url": "https://rocket.chat/"
1919
},
20-
"main": "dist/cjs/index.js",
21-
"module": "dist/esm/index.js",
22-
"types": "dist/esm/index.d.ts",
20+
"main": "dist/index.js",
21+
"types": "dist/index.d.ts",
2322
"files": [
2423
"/dist"
2524
],
2625
"scripts": {
2726
".:build-preview-move": "mkdir -p ../../.preview/ && cp -r ./storybook-static ../../.preview/fuselage-ui-kit",
28-
".:build:cjs": "tsc -p tsconfig.cjs.json",
2927
".:build:clean": "rimraf dist",
30-
".:build:esm": "tsc -p tsconfig.esm.json",
31-
"build": "run-s .:build:clean .:build:esm .:build:cjs",
28+
".:build:tsc": "tsc -p tsconfig.build.json",
29+
"build": "run-s .:build:clean .:build:tsc",
3230
"build-preview": "yarn build-storybook",
3331
"build-storybook": "NODE_ENV=production storybook build",
34-
"dev": "tsc --watch --preserveWatchOutput -p tsconfig.esm.json",
32+
"dev": "tsc --watch --preserveWatchOutput -p tsconfig.build.json",
3533
"docs": "cross-env NODE_ENV=production storybook build -o ../../static/fuselage-ui-kit",
3634
"lint": "eslint --ext .js,.jsx,.ts,.tsx .",
3735
"storybook": "storybook dev -p 6006 --no-version-updates",
@@ -45,10 +43,6 @@
4543
"@rocket.chat/ui-kit": "workspace:~"
4644
},
4745
"devDependencies": {
48-
"@babel/core": "~7.28.5",
49-
"@babel/preset-env": "~7.28.5",
50-
"@babel/preset-react": "~7.27.1",
51-
"@babel/preset-typescript": "~7.27.1",
5246
"@rocket.chat/apps-engine": "workspace:^",
5347
"@rocket.chat/core-typings": "workspace:^",
5448
"@rocket.chat/emitter": "~0.31.25",
@@ -67,7 +61,7 @@
6761
"@rocket.chat/ui-video-conf": "workspace:^",
6862
"@storybook/addon-essentials": "^8.6.14",
6963
"@storybook/addon-styling-webpack": "^1.0.1",
70-
"@storybook/addon-webpack5-compiler-babel": "^3.0.6",
64+
"@storybook/addon-webpack5-compiler-swc": "~3.0.0",
7165
"@storybook/blocks": "^8.6.14",
7266
"@storybook/react": "^8.6.14",
7367
"@storybook/react-webpack5": "^8.6.14",
@@ -78,7 +72,6 @@
7872
"@testing-library/user-event": "~14.6.1",
7973
"@types/react": "~18.3.26",
8074
"@types/react-dom": "~18.3.7",
81-
"babel-loader": "~10.0.0",
8275
"cross-env": "^7.0.3",
8376
"eslint": "~8.45.0",
8477
"eslint-plugin-storybook": "~0.11.6",

packages/fuselage-ui-kit/src/elements/IconButtonElement.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IconButton } from '@rocket.chat/fuselage';
2-
import * as UiKit from '@rocket.chat/ui-kit';
2+
import type * as UiKit from '@rocket.chat/ui-kit';
33
import type { MouseEventHandler, ReactElement } from 'react';
44

55
import { useUiKitState } from '../hooks/useUiKitState';

packages/fuselage-ui-kit/src/elements/IconElement.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Icon } from '@rocket.chat/fuselage';
2-
import * as UiKit from '@rocket.chat/ui-kit';
2+
import type * as UiKit from '@rocket.chat/ui-kit';
33
import type { ReactElement } from 'react';
44

5-
import { BlockProps } from '../utils/BlockProps';
5+
import type { BlockProps } from '../utils/BlockProps';
66

77
type IconElementProps = BlockProps<UiKit.IconElement>;
88

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"module": "ESNext",
5+
"rootDir": "./src",
6+
"outDir": "./dist"
7+
},
8+
"include": ["src"],
9+
"exclude": ["node_modules", "dist", "src/**/*.stories.tsx", ".storybook/**/*", "./src/**/*.spec.ts", "./src/**/*.spec.tsx"]
10+
}

packages/fuselage-ui-kit/tsconfig.cjs.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

packages/fuselage-ui-kit/tsconfig.esm.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)