Skip to content

Commit c34f7d6

Browse files
Bump scaffold (#69)
* Bump scaffold * Revert * Rectify * Add eslint-import-resolver-* * Fix ESLint * Extends react --------- Co-authored-by: @compulim <@compulim> Co-authored-by: William Wong <compulim@hotmail.com>
1 parent 35ff2d2 commit c34f7d6

38 files changed

+248
-67
lines changed

.eslintrc.jest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ rules:
88
react/display-name: off
99
# Disable for convenience
1010
react/prop-types: off
11+
'@typescript-eslint/no-require-imports': off

.eslintrc.production.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,17 @@ rules:
2424
import/exports-last: error
2525
import/extensions:
2626
- error
27-
- always
27+
- ignorePackages # eslint-plugin-import does not understand named import
2828
import/first: error
2929
import/newline-after-import: error
3030
import/no-anonymous-default-export: error
3131
import/no-duplicates: error
3232
import/no-namespace: error
33-
import/no-unassigned-import: error
33+
import/no-unassigned-import:
34+
- error
35+
- allow:
36+
- '**/*.css'
37+
- dotenv/config
3438
settings:
3539
import/extensions:
3640
- .cjs
@@ -41,3 +45,6 @@ settings:
4145
- .mts
4246
- .ts
4347
- .tsx
48+
import/resolver:
49+
node: true
50+
typescript: true

.eslintrc.typescript.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ parser: '@typescript-eslint/parser'
44
plugins:
55
- '@typescript-eslint'
66
rules:
7+
# Shortening if-statement into &&, ||, or ternary operators.
8+
'@typescript-eslint/no-unused-expressions': off
9+
710
'@typescript-eslint/no-unused-vars':
811
- error
912
- argsIgnorePattern: ^_

.eslintrc.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
env:
2-
browser: true
31
extends:
42
- eslint:recommended
53
overrides:

.github/workflows/prepare-release.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
name: Prepare release
22

33
on:
4-
workflow_dispatch: {}
4+
workflow_dispatch:
5+
inputs:
6+
version-to-bump:
7+
default: patch
8+
description: Version to bump
9+
options:
10+
- major
11+
- minor
12+
- patch
13+
required: true
14+
type: choice
515

616
jobs:
717
call-workflow:
@@ -10,3 +20,5 @@ jobs:
1020
id-token: write
1121
secrets: inherit
1222
uses: compulim/workflows/.github/workflows/prepare-release.yml@main
23+
with:
24+
version-to-bump: ${{ inputs.version-to-bump }}

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
### Breaking changes
10+
### Removed
1111

12-
- Removed named exports, please import the defaults instead
12+
- 💢 Removed named exports, please import the defaults instead
1313
- Use `import { createChainOfResponsibility } from 'react-chain-of-responsibility'` instead
1414
- `import { createChainOfResponsibilityForFluentUI } from 'react-chain-of-responsibility/fluentUI'` for Fluent UI renderer function
15-
- Moved build tools from Babel to tsup/esbuild
16-
- Outside of `<Provider>`, when `useBuildComponentCallback` and `<Proxy>` is used with `fallbackComponent`, they will render the fallback component and no longer throwing exception
1715

1816
### Added
1917

@@ -24,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2422

2523
### Changed
2624

25+
- 💢 Moved build tools from Babel to tsup/esbuild
26+
- 💢 Outside of `<Provider>`, when `useBuildComponentCallback` and `<Proxy>` is used with `fallbackComponent`, they will render the fallback component and no longer throwing exception
2727
- Bumped dependencies, by [@compulim](https://github.com/compulim), in PR [#49](https://github.com/compulim/react-chain-of-responsibility/pull/49), [#58](https://github.com/compulim/react-chain-of-responsibility/pull/58), [#63](https://github.com/compulim/react-chain-of-responsibility/pull/63), and [#67](https://github.com/compulim/react-chain-of-responsibility/pull/67)
2828
- Production dependencies
2929
- [`@babel/runtime-corejs3@7.24.6`](https://npmjs.com/package/@babel/runtime-corejs3)

package-lock.json

Lines changed: 117 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
],
1313
"scripts": {
1414
"build": "npm run build --if-present --workspaces",
15-
"bump": "npm run bump:prod && npm run bump:dev && npm run bump:auditfix && npm run bump:packages && npm run bump:eslintrc",
16-
"bump:auditfix": "npm audit fix || exit 0",
15+
"bump": "npm run bump:prod && npm run bump:dev && npm run bump:packages && npm run bump:eslintrc",
1716
"bump:dev": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '(.pinDependencies // {}) as $P | (.localPeerDependencies // {}) as $L | (.devDependencies // {}) | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@\" + ($P[.key] // [\"latest\"])[0]) | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true",
1817
"bump:eslintrc": "if [ -f node_modules/react/package.json ]; then docker run -e VERSION=$(cat node_modules/react/package.json | jq -r '.version') -i --rm mikefarah/yq '.settings.react.version = strenv(VERSION)' < ./.eslintrc.react.yml | tee /tmp/output.tmp && mv /tmp/output.tmp ./.eslintrc.react.yml; fi",
1918
"bump:packages": "npm run bump --if-present --workspaces",
@@ -31,6 +30,8 @@
3130
"@typescript-eslint/eslint-plugin": "^7.4.0",
3231
"@typescript-eslint/parser": "^7.4.0",
3332
"eslint": "^8.57.0",
33+
"eslint-import-resolver-node": "^0.3.9",
34+
"eslint-import-resolver-typescript": "^3.6.3",
3435
"eslint-plugin-import": "^2.31.0",
3536
"eslint-plugin-prettier": "^5.1.3",
3637
"eslint-plugin-react": "^7.34.1",
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
env:
2+
browser: true
3+
extends:
4+
- ../../.eslintrc.react.yml
5+
rules:
6+
# Disable for convenience
7+
react/display-name: off
8+
# Disable for convenience
9+
react/prop-types: off
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
extends:
2-
- ../../.eslintrc.react.yml
3-
- ../../.eslintrc.jest.yml
2+
- ./.eslintrc.custom.yml

0 commit comments

Comments
 (0)