diff --git a/.eslintrc.json b/.eslintrc.json index 318a020..76b508e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,20 +1,31 @@ { - "root": true, + "env": { + "browser": true, + "es2021": true, + "node": true + }, "extends": [ "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:@typescript-eslint/recommended-requiring-type-checking" + "plugin:react/recommended", + "plugin:@typescript-eslint/recommended" ], + "overrides": [], + "parser": "@typescript-eslint/parser", "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module", "project": "./tsconfig.json" }, + "settings": { + "react": { + "version": "detect" + } + }, + "plugins": ["react", "@typescript-eslint"], "rules": { "@typescript-eslint/no-unsafe-argument": "warn", "@typescript-eslint/no-unsafe-assignment": "warn", "@typescript-eslint/unbound-method": "warn" }, - "overrides": [], - "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint"], "ignorePatterns": ["node_modules", "build", "webpack**", "src/public/"] } diff --git a/.gitignore b/.gitignore index c0b2358..e3fbd98 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ build -dist node_modules diff --git a/tsconfig.json b/tsconfig.json index 2a0103a..2fcb20f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "outDir": "./build/", + "outDir": "./build/util", "noImplicitAny": false, "module": "commonjs", "target": "es6", diff --git a/webpack.config.js b/webpack.config.js index 555227d..1ba3bc5 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -32,7 +32,20 @@ module.exports = { new CopyPlugin({ patterns: [ { + // Copy utility files from: "./src/util", + to: "../util", + globOptions: { + ignore: ["**/*.ts", "**/*.tsx"], + }, + }, + { + // Copy public files + from: "./src/public", + to: "./", + globOptions: { + ignore: ["**/*.ts", "**/*.tsx"], + }, }, ], }),