From 7e8d937203b47aaafa7eb152421531a9e1ce31ec Mon Sep 17 00:00:00 2001 From: onderonur Date: Sat, 16 Nov 2024 22:15:34 +0300 Subject: [PATCH] simplified script names --- .github/workflows/quality.yml | 6 +++--- .husky/pre-commit | 2 +- CONTRIBUTING.md | 14 +++++++------- package.json | 12 ++++++------ packages/react-infinite-scroll-hook/package.json | 8 ++++---- turbo.json | 6 +++--- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 9586559..a2c911c 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -23,7 +23,7 @@ jobs: - name: Install uses: ./.github/composite-actions/install - name: Run format check - run: npm run format:check + run: npm run format lint: name: Lint @@ -34,7 +34,7 @@ jobs: - name: Install uses: ./.github/composite-actions/install - name: Run lint check - run: npm run lint:check + run: npm run lint typecheck: name: Typecheck @@ -45,7 +45,7 @@ jobs: - name: Install uses: ./.github/composite-actions/install - name: Run type check - run: npm run types:check + run: npm run typecheck build: name: Build diff --git a/.husky/pre-commit b/.husky/pre-commit index 73c4a3d..f3f510d 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,2 +1,2 @@ npx lint-staged -npm run types:check +npm run typecheck diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fafd488..15f3469 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,7 +27,7 @@ All checks are run automatically before committing by using [husky](https://gith The checks can be run manually by running the below command too. ```bash -npm run codequality:check +npm run codequality ``` And the same checks can be run also by enabling fixes for auto-fixable issues. @@ -40,17 +40,17 @@ npm run codequality:fix ```bash # ESLint checks -npm run lint:check +npm run lint # ESLint fixes npm run lint:fix # Prettier checks -npm run format:check +npm run format # Prettier fixes npm run format:fix # TypeScript checks -npm run types:check +npm run typecheck # There is no auto-fix script for TypeScript. ``` @@ -61,7 +61,7 @@ We use `npm-check-updates` package to automatically check if there are newer ver To run it, we can use the below command. It starts an interactive CLI to check the dependencies of all the apps and packages, including the root dependencies. ```bash -npm run updates:check +npm run updates ``` ## Adding Contributors @@ -90,10 +90,10 @@ To be sure the output is OK for ESM and CJS clients, we can run the below comman ```bash # For `publint` -npm run publint:check -w react-infinite-scroll-hook +npm run publint -w react-infinite-scroll-hook # For `Are the Types Wrong` -npm run attw:check -w react-infinite-scroll-hook +npm run attw -w react-infinite-scroll-hook ``` To see the content of the package which can be uploaded to [npm](https://www.npmjs.com/) can be seen by using the below command. It will create a tarball from `react-infinite-scroll-hook` package. diff --git a/package.json b/package.json index 3eff0d9..bffcf8e 100644 --- a/package.json +++ b/package.json @@ -9,18 +9,18 @@ "scripts": { "build": "turbo build", "build:bundle": "turbo build --filter=react-infinite-scroll-hook", - "codequality:check": "npm run format:check && npm run lint:check && npm run types:check", - "codequality:fix": "npm run format:fix && npm run lint:fix && npm run types:check", + "codequality": "npm run format && npm run lint && npm run typecheck", + "codequality:fix": "npm run format:fix && npm run lint:fix && npm run typecheck", "contributors:add": "all-contributors add", "contributors:generate": "all-contributors generate", "dev": "turbo dev", - "format:check": "prettier --check --ignore-unknown .", + "format": "prettier --check --ignore-unknown .", "format:fix": "prettier --write --ignore-unknown .", - "lint:check": "turbo lint:check", + "lint": "turbo lint", "lint:fix": "turbo lint:fix", "prepare": "husky && npm run build:bundle", - "types:check": "turbo types:check", - "updates:check": "npm-check-updates -i -ws --root" + "typecheck": "turbo typecheck", + "updates": "npm-check-updates -i -ws --root" }, "devDependencies": { "all-contributors-cli": "^6.26.1", diff --git a/packages/react-infinite-scroll-hook/package.json b/packages/react-infinite-scroll-hook/package.json index 4827297..5a9e761 100644 --- a/packages/react-infinite-scroll-hook/package.json +++ b/packages/react-infinite-scroll-hook/package.json @@ -37,14 +37,14 @@ "dist" ], "scripts": { - "attw:check": "attw --pack .", + "attw": "attw --pack .", "build": "tsup", "dev": "tsup --watch", - "lint:check": "eslint . --max-warnings 0", + "lint": "eslint . --max-warnings 0", "lint:fix": "eslint . --fix --max-warnings 0", "prepublishOnly": "npm run build", - "publint:check": "publint", - "types:check": "tsc" + "publint": "publint", + "typecheck": "tsc" }, "dependencies": { "react-intersection-observer-hook": "^3.0.0" diff --git a/turbo.json b/turbo.json index 331c827..f70459c 100644 --- a/turbo.json +++ b/turbo.json @@ -10,13 +10,13 @@ "cache": false, "persistent": true }, - "lint:check": { - "dependsOn": ["^build", "^lint:check"] + "lint": { + "dependsOn": ["^build", "^lint"] }, "lint:fix": { "dependsOn": ["^build", "^lint:fix"] }, - "types:check": { + "typecheck": { "dependsOn": ["^build"] } }