diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6e485ccc..b45ed2d4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -28,5 +28,9 @@ jobs:
run: node common/scripts/install-run-rush.js install
- name: Rush build
run: node common/scripts/install-run-rush.js build
+ # - name: Check Lint
+ # run: node common/scripts/install-run-rush.js lint
+ - name: Check TS
+ run: node common/scripts/install-run-rush.js ts-check
- name: Test (coverage)
run: node common/scripts/install-run-rush.js test:cov
diff --git a/apps/demo-fixed-layout-simple/src/app.tsx b/apps/demo-fixed-layout-simple/src/app.tsx
index 1e792a75..150c56b5 100644
--- a/apps/demo-fixed-layout-simple/src/app.tsx
+++ b/apps/demo-fixed-layout-simple/src/app.tsx
@@ -1,5 +1,7 @@
-import ReactDOM from 'react-dom';
-import { Editor } from './editor'
+import { createRoot } from 'react-dom/client';
+import { Editor } from './editor';
-ReactDOM.render(, document.getElementById('root'));
+const app = createRoot(document.getElementById('root')!);
+
+app.render();
diff --git a/apps/demo-fixed-layout-simple/src/components/branch-adder.tsx b/apps/demo-fixed-layout-simple/src/components/branch-adder.tsx
index 9f236d67..022dce25 100644
--- a/apps/demo-fixed-layout-simple/src/components/branch-adder.tsx
+++ b/apps/demo-fixed-layout-simple/src/components/branch-adder.tsx
@@ -1,14 +1,12 @@
+import { nanoid } from 'nanoid';
import { type FlowNodeEntity, useClientContext } from '@flowgram.ai/fixed-layout-editor';
import { IconPlus } from '@douyinfe/semi-icons';
-import { nanoid } from 'nanoid';
-
interface PropsType {
activated?: boolean;
node: FlowNodeEntity;
}
-
export function BranchAdder(props: PropsType) {
const { activated, node } = props;
const nodeData = node.firstChild!.renderData;
@@ -22,8 +20,8 @@ export function BranchAdder(props: PropsType) {
type: 'block',
data: {
title: 'New Branch',
- content: ''
- }
+ content: '',
+ },
});
setTimeout(() => {
@@ -38,7 +36,7 @@ export function BranchAdder(props: PropsType) {
const className = [
'demo-fixed-adder',
isVertical ? '' : 'isHorizontal',
- activated ? 'activated' : ''
+ activated ? 'activated' : '',
].join(' ');
return (
diff --git a/apps/demo-fixed-layout/src/plugins/group-plugin/icons/index.tsx b/apps/demo-fixed-layout/src/plugins/group-plugin/icons/index.tsx
index 6f3e6a02..80150198 100644
--- a/apps/demo-fixed-layout/src/plugins/group-plugin/icons/index.tsx
+++ b/apps/demo-fixed-layout/src/plugins/group-plugin/icons/index.tsx
@@ -29,6 +29,7 @@ const SvgUngroup = () => (
);
const IconFactory = (svg: ReactNode) =>
+ // eslint-disable-next-line react/display-name
forwardRef((props: Omit, ref: Ref) => (
));
diff --git a/apps/docs/package.json b/apps/docs/package.json
index 7c4e4009..76e69363 100644
--- a/apps/docs/package.json
+++ b/apps/docs/package.json
@@ -6,7 +6,7 @@
"build": "rm -rf ./doc_build && rspress build",
"docs": "sucrase-node ./scripts/auto-generate.ts",
"dev": "rspress dev",
- "lint": "eslint .",
+ "lint": "eslint ./components --cache",
"preview": "rspress preview"
},
"dependencies": {
diff --git a/common/config/rush/command-line.json b/common/config/rush/command-line.json
index fae5aee1..ef6d8786 100644
--- a/common/config/rush/command-line.json
+++ b/common/config/rush/command-line.json
@@ -235,6 +235,22 @@
"safeForSimultaneousRushProcesses": true,
"shellCommand": "concurrently --kill-others --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/docs\" \"cd apps/docs && rushx dev\""
},
+ {
+ "name": "ts-check",
+ "commandKind": "bulk",
+ "summary": "⭐️️ Run ts check in packages",
+ "ignoreMissingScript": true,
+ "enableParallelism": true,
+ "safeForSimultaneousRushProcesses": true
+ },
+ {
+ "name": "lint",
+ "commandKind": "bulk",
+ "summary": "⭐️️ Run eslint check in packages",
+ "ignoreMissingScript": true,
+ "enableParallelism": true,
+ "safeForSimultaneousRushProcesses": true
+ },
{
"name": "dev:demo-fixed-layout",
"commandKind": "global",
diff --git a/config/eslint-config/.eslintrc.base.js b/config/eslint-config/.eslintrc.base.js
index aa42056d..e75326ab 100644
--- a/config/eslint-config/.eslintrc.base.js
+++ b/config/eslint-config/.eslintrc.base.js
@@ -62,7 +62,11 @@ module.exports = {
},
},
},
- extends: ['plugin:prettier/recommended', 'plugin:react/recommended'],
+ extends: [
+ 'plugin:prettier/recommended',
+ 'plugin:react/recommended',
+ 'plugin:react/jsx-runtime',
+ ],
plugins: ['@typescript-eslint', 'import'],
parserOptions: {
diff --git a/config/eslint-config/package.json b/config/eslint-config/package.json
index 8985426c..8497687e 100644
--- a/config/eslint-config/package.json
+++ b/config/eslint-config/package.json
@@ -7,7 +7,7 @@
"scripts": {
"build": "tsc -b --force",
"dev": "npm run build -- -w",
- "lint": "eslint ./ --cache --quiet",
+ "lint": "eslint ./src --cache",
"lint:fix": "eslint --fix ../../packages",
"test": "exit",
"test:cov": "exit"
diff --git a/packages/node-engine/form-core/__tests__/form.test.ts b/packages/node-engine/form-core/__tests__/form.test.ts
index 7368d4aa..73bb60a9 100644
--- a/packages/node-engine/form-core/__tests__/form.test.ts
+++ b/packages/node-engine/form-core/__tests__/form.test.ts
@@ -2,6 +2,7 @@ import { beforeEach, describe, expect, it } from 'vitest';
describe('form test', () => {
it('form test', () => {
+ // eslint-disable-next-line no-console
console.log('form test');
});
});