Skip to content

Commit

Permalink
simplified script names
Browse files Browse the repository at this point in the history
  • Loading branch information
onderonur committed Nov 16, 2024
1 parent 032711e commit 7e8d937
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
npx lint-staged
npm run types:check
npm run typecheck
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
```

Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions packages/react-infinite-scroll-hook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
}
Expand Down

0 comments on commit 7e8d937

Please sign in to comment.