From f7aa26a985c3541d33ccd87f13f766821ba0db62 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Thu, 21 Mar 2024 16:58:52 -0300 Subject: [PATCH] Update build environment --- .husky/pre-commit | 14 ---------- package-lock.json | 65 ----------------------------------------------- package.json | 6 ++--- webpack.common.js | 5 +++- 4 files changed, 6 insertions(+), 84 deletions(-) delete mode 100755 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index 8abc52a..0000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env sh - -pattern="\.ts|\.tsx|\.js$" -files=$(git --no-pager diff --cached --name-only | grep -E -e "${pattern}") -if [ "$?" = "0" ]; then - npm run prettier -- ${files} || exit 1 - npm run eslint -- --fix --exit-on-fatal-error ${files} || exit 1 - for f in $files; do - git add "${f}" - done - exit 0 -else - exit 0 -fi diff --git a/package-lock.json b/package-lock.json index d3e9826..3a2297f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,8 +19,6 @@ "@types/react-dom": "^18.0.6", "eslint": "^8.26.0", "eslint-config-prettier": "^8.5.0", - "husky": "^8.0.0", - "is-ci": "^3.0.1", "prettier": "^2.7.1", "ts-loader": "^9.3.1", "ts-standard": "^12.0.1", @@ -963,21 +961,6 @@ "node": ">=6.0" } }, - "node_modules/ci-info": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, "node_modules/classnames": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", @@ -2248,21 +2231,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/husky": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", - "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", - "dev": true, - "bin": { - "husky": "lib/bin.js" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/typicode" - } - }, "node_modules/ignore": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", @@ -2412,18 +2380,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-ci": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", - "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", - "dev": true, - "dependencies": { - "ci-info": "^3.2.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, "node_modules/is-core-module": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", @@ -5131,12 +5087,6 @@ "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", "dev": true }, - "ci-info": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", - "dev": true - }, "classnames": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", @@ -6043,12 +5993,6 @@ "has-symbols": "^1.0.2" } }, - "husky": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", - "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", - "dev": true - }, "ignore": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", @@ -6153,15 +6097,6 @@ "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true }, - "is-ci": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", - "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", - "dev": true, - "requires": { - "ci-info": "^3.2.0" - } - }, "is-core-module": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", diff --git a/package.json b/package.json index f90d48c..9678d17 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,9 @@ "./packages/typescript/*" ], "scripts": { + "tsc": "tsc --noEmit", "eslint": "npm exec eslint -- --fix src/js/", - "prettier": "npm exec prettier -- --write src/js/", - "prepare": "is-ci || husky install" + "prettier": "npm exec prettier -- --write src/js/" }, "dependencies": { "classnames": "^2.3.2", @@ -19,8 +19,6 @@ "@types/react-dom": "^18.0.6", "eslint": "^8.26.0", "eslint-config-prettier": "^8.5.0", - "husky": "^8.0.0", - "is-ci": "^3.0.1", "prettier": "^2.7.1", "ts-loader": "^9.3.1", "ts-standard": "^12.0.1", diff --git a/webpack.common.js b/webpack.common.js index 4cba40a..c72a5a8 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -14,7 +14,10 @@ module.exports = { rules: [ { test: /\.tsx?$/, - use: "ts-loader", + use: [{ + loader: "ts-loader", + options: {transpileOnly: true, onlyCompileBundledFiles: true} + }], exclude: /node_modules/, }, ],