From ae0d7c4aa72a64852f93cae0fa1ae2f8657c0a93 Mon Sep 17 00:00:00 2001 From: hristijankeitaro Date: Fri, 20 Dec 2024 14:16:24 +0100 Subject: [PATCH 1/2] Add vite config --- vite.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vite.config.js b/vite.config.js index a64146a..cc71fe4 100644 --- a/vite.config.js +++ b/vite.config.js @@ -7,6 +7,10 @@ const ReactCompilerConfig = { }; export default defineConfig({ + build: { + outDir: 'build', + emptyOutDir: true, // also necessary + }, plugins: [ react({ babel: { From 4f13a63d18b860656a526f16491a59193dfb9d37 Mon Sep 17 00:00:00 2001 From: hristijankeitaro Date: Fri, 20 Dec 2024 14:21:34 +0100 Subject: [PATCH 2/2] Fix lint errors --- .eslintrc.cjs | 26 +++++++++++----------- index.html | 60 +++++++++++++++++++++++++++++--------------------- package.json | 2 +- vite.config.js | 2 +- 4 files changed, 50 insertions(+), 40 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index ce4d64c..2921956 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -2,21 +2,21 @@ module.exports = { root: true, env: { browser: true, es2020: true }, extends: [ - 'eslint:recommended', - 'plugin:react/recommended', - 'plugin:react/jsx-runtime', - 'plugin:react-hooks/recommended', + "eslint:recommended", + "plugin:react/recommended", + "plugin:react/jsx-runtime", + "plugin:react-hooks/recommended", ], - ignorePatterns: ['dist', '.eslintrc.cjs'], - parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, - settings: { react: { version: '18.2' } }, - plugins: ['eslint-plugin-react-compiler','react-refresh'], + ignorePatterns: ["dist", ".eslintrc.cjs"], + parserOptions: { ecmaVersion: "latest", sourceType: "module" }, + settings: { react: { version: "18.2" } }, + plugins: ["eslint-plugin-react-compiler", "react-refresh"], rules: { - 'react-compiler/react-compiler': "error", - 'react/jsx-no-target-blank': 'off', - 'react-refresh/only-export-components': [ - 'warn', + "react-compiler/react-compiler": "error", + "react/jsx-no-target-blank": "off", + "react-refresh/only-export-components": [ + "warn", { allowConstantExport: true }, ], }, -} +}; diff --git a/index.html b/index.html index 4f7b153..6cac8ef 100644 --- a/index.html +++ b/index.html @@ -1,28 +1,38 @@ + + + + + + + + + + + + + + + + Blog Image Generator by Keitaro + - - - - - - - - - - - - - - - - Blog Image Generator by Keitaro - - - -
- - - - \ No newline at end of file + +
+ + + diff --git a/package.json b/package.json index 048f2da..a636af1 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "dev": "vite", "build": "vite build", - "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", + "lint": "npx prettier -cw . '!**/*.{png,txt,ico}'", "preview": "vite preview", "test": "jest" }, diff --git a/vite.config.js b/vite.config.js index cc71fe4..a415743 100644 --- a/vite.config.js +++ b/vite.config.js @@ -8,7 +8,7 @@ const ReactCompilerConfig = { export default defineConfig({ build: { - outDir: 'build', + outDir: "build", emptyOutDir: true, // also necessary }, plugins: [