mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-05-24 02:09:17 +00:00
Merge c02d50249e
into 24712230a7
This commit is contained in:
commit
0dd2d9c81e
@ -1,22 +0,0 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: { browser: true, es2020: true },
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"plugin:react/recommended",
|
||||
"plugin:react/jsx-runtime",
|
||||
"plugin:react-hooks/recommended",
|
||||
"prettier"
|
||||
],
|
||||
ignorePatterns: ["dist", ".eslintrc.cjs"],
|
||||
parserOptions: { ecmaVersion: "latest", sourceType: "module" },
|
||||
settings: { react: { version: "18.2" } },
|
||||
plugins: ["react-refresh"],
|
||||
rules: {
|
||||
"react-refresh/only-export-components": [
|
||||
"warn",
|
||||
{ allowConstantExport: true },
|
||||
],
|
||||
"react/prop-types": 0,
|
||||
},
|
||||
};
|
39
eslint.config.js
Normal file
39
eslint.config.js
Normal file
@ -0,0 +1,39 @@
|
||||
import js from "@eslint/js";
|
||||
import { defineConfig, globalIgnores } from "eslint/config";
|
||||
import react from "eslint-plugin-react";
|
||||
import globals from "globals";
|
||||
import reactHooks from "eslint-plugin-react-hooks";
|
||||
import reactRefresh from "eslint-plugin-react-refresh";
|
||||
import prettier from "eslint-config-prettier/flat";
|
||||
|
||||
export default defineConfig([
|
||||
globalIgnores(["dist/"]),
|
||||
reactHooks.configs["recommended-latest"],
|
||||
reactRefresh.configs.vite,
|
||||
{
|
||||
plugins: { js, react },
|
||||
files: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
|
||||
extends: [js.configs.recommended],
|
||||
rules: {
|
||||
...react.configs.recommended.rules,
|
||||
...react.configs["jsx-runtime"].rules,
|
||||
"react-refresh/only-export-components": [
|
||||
"warn",
|
||||
{ allowConstantExport: true },
|
||||
],
|
||||
"react/prop-types": 0,
|
||||
},
|
||||
settings: { react: { version: "18.2" } },
|
||||
languageOptions: {
|
||||
parserOptions: { ecmaFeatures: { jsx: true } },
|
||||
globals: { ...globals.browser, ...globals.es2020 },
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["**/context/**/*.jsx", "**/context/**/*.tsx"],
|
||||
rules: {
|
||||
"react-refresh/only-export-components": "off",
|
||||
},
|
||||
},
|
||||
prettier,
|
||||
]);
|
2704
package-lock.json
generated
2704
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
@ -45,17 +45,17 @@
|
||||
"usehooks-ts": "^3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/postcss": "^4.0.14",
|
||||
"@tailwindcss/vite": "^4.1.4",
|
||||
"@types/react": "^18.2.43",
|
||||
"@types/react-dom": "^18.2.17",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"eslint": "^8.55.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-react": "^7.33.2",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.5",
|
||||
"postcss": "^8.4.32",
|
||||
"prettier": "3.2.5",
|
||||
"eslint": "^9.25.1",
|
||||
"eslint-config-prettier": "^10.1.2",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.20",
|
||||
"globals": "^16.0.0",
|
||||
"prettier": "^3.5.3",
|
||||
"tailwindcss": "^4.0.14",
|
||||
"vite": "^6.3.4"
|
||||
},
|
||||
|
@ -1,5 +0,0 @@
|
||||
export default {
|
||||
plugins: {
|
||||
'@tailwindcss/postcss': {},
|
||||
},
|
||||
}
|
@ -661,7 +661,7 @@ export default function ControlPanel({
|
||||
let obj = null;
|
||||
try {
|
||||
obj = JSON.parse(text);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
const v = new Validator();
|
||||
|
@ -42,7 +42,7 @@ export default function ImportDiagram({
|
||||
let jsonObject = null;
|
||||
try {
|
||||
jsonObject = JSON.parse(e.target.result);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
setError({
|
||||
type: STATUS.ERROR,
|
||||
message: "The file contains an error.",
|
||||
|
@ -26,6 +26,7 @@ import { isRtl } from "../i18n/utils/rtl";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { get } from "../api/gists";
|
||||
|
||||
// eslint-disable-next-line react-refresh/only-export-components
|
||||
export const IdContext = createContext({ gistId: "", setGistId: () => {} });
|
||||
|
||||
const SIDEPANEL_MIN_WIDTH = 384;
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
})
|
||||
plugins: [tailwindcss(), react()],
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user