Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,16 @@ license-files = { paths = ["LICENSE"] }
installer = "uv"

[[tool.hatch.build.hooks.build-scripts.scripts]]
# Note: `hatch` can't be called within `build-scripts` when installing packages in editable mode, so we have to write the commands long-form
commands = [
"hatch run javascript:build",
'hatch run "src/build_scripts/copy_dir.py" "src/js/packages/@reactpy/app/dist" "src/reactpy/static/assets"',
'python "src/build_scripts/clean_js_dir.py"',
'bun install --cwd "src/js/packages/event-to-object"',
'bun run --cwd "src/js/packages/event-to-object" build',
'bun install --cwd "src/js/packages/@reactpy/client"',
'bun run --cwd "src/js/packages/@reactpy/client" build',
'bun install --cwd "src/js/packages/@reactpy/app"',
'bun run --cwd "src/js/packages/@reactpy/app" build',
'python "src/build_scripts/copy_dir.py" "src/js/packages/@reactpy/app/dist" "src/reactpy/static/assets"',
]
artifacts = []

Expand Down
31 changes: 0 additions & 31 deletions src/js/.eslintrc.json

This file was deleted.

Binary file modified src/js/bun.lockb
Binary file not shown.
58 changes: 58 additions & 0 deletions src/js/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import react from "eslint-plugin-react";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
...compat.extends(
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
),
{
ignores: ["**/node_modules/", "**/dist/"],
},
{
plugins: {
react,
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
globals: {
...globals.browser,
...globals.node,
},

parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",
},

settings: {
react: {
version: "detect",
},
},

rules: {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-empty-function": "off",
"react/prop-types": "off",
},
},
];
13 changes: 8 additions & 5 deletions src/js/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.58.0",
"@typescript-eslint/parser": "^5.58.0",
"eslint": "^8.38.0",
"eslint-plugin-react": "^7.32.2",
"prettier": "^3.0.0-alpha.6"
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.18.0",
"@typescript-eslint/eslint-plugin": "^8.21.0",
"@typescript-eslint/parser": "^8.21.0",
"eslint": "^9.18.0",
"eslint-plugin-react": "^7.37.4",
"globals": "^15.14.0",
"prettier": "^3.4.2"
},
"license": "MIT",
"scripts": {
Expand Down
19 changes: 0 additions & 19 deletions src/js/packages/@reactpy/app/.eslintrc.json

This file was deleted.

Binary file modified src/js/packages/@reactpy/app/bun.lockb
Binary file not shown.
42 changes: 42 additions & 0 deletions src/js/packages/@reactpy/app/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import react from "eslint-plugin-react";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
...compat.extends(
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
),
{
plugins: {
react,
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
globals: {
...globals.browser,
},

parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",
},

rules: {},
},
];
4 changes: 1 addition & 3 deletions src/js/packages/@reactpy/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
"dependencies": {
"@reactpy/client": "file:../client",
"event-to-object": "file:../../event-to-object",
"preact": "^10.7.0"
"preact": "^10.25.4"
},
"devDependencies": {
"@types/react": "^17.0",
"@types/react-dom": "^17.0",
"typescript": "^5.7.3"
},
"scripts": {
Expand Down
Binary file modified src/js/packages/@reactpy/client/bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion src/js/packages/@reactpy/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"preact": "^10.25.4"
},
"devDependencies": {
"@types/json-pointer": "^1.0.31",
"@types/json-pointer": "^1.0.34",
"@types/react": "^17.0",
"@types/react-dom": "^17.0",
"typescript": "^5.7.3"
Expand Down
Binary file modified src/js/packages/event-to-object/bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions src/js/packages/event-to-object/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"devDependencies": {
"happy-dom": "^8.9.0",
"lodash": "^4.17.21",
"tsm": "^2.0.0",
"tsm": "^2.3.0",
"typescript": "^5.7.3",
"uvu": "^0.5.1"
"uvu": "^0.5.6"
},
"scripts": {
"build": "tsc -b",
Expand Down
Loading