Skip to content

Commit 67d7d0d

Browse files
authored
build: Bump eslint-related dependencies and fix errors (#982)
* chore(deps): Bump eslint-related dependencies * Update doist eslint-config preset name * Disable no-restricted-imports as we aren't using React 17+'s jsx runtime * Run prettify * Colocate storybook tsconfig with its modules * Add @doist/eslint-config/simple-import-sort preset * Update autosorted imports/exports * Fix setState synchronously during effect error * Fix unbound-method error * Fix and suppress react-hooks/refs * Early return when there's no handler in KeyCapturer
1 parent e04c4e9 commit 67d7d0d

File tree

139 files changed

+1540
-1240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+1540
-1240
lines changed

.eslintrc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"plugins": ["jest", "jsx-a11y"],
33
"extends": [
4-
"@doist/eslint-config/recommended-requiring-type-checking",
4+
"@doist/eslint-config/recommended-type-checked",
55
"@doist/eslint-config/react",
6-
"plugin:jest/recommended"
6+
"plugin:jest/recommended",
7+
"@doist/eslint-config/simple-import-sort"
78
],
89
"parser": "@typescript-eslint/parser",
910
"parserOptions": {
@@ -12,7 +13,7 @@
1213
"impliedStrict": true
1314
},
1415
"sourceType": "module",
15-
"project": ["tsconfig.json", "tsconfig.stories.json"]
16+
"project": ["tsconfig.json", "stories/tsconfig.json"]
1617
},
1718
"ignorePatterns": [
1819
"dist/**",
@@ -28,7 +29,12 @@
2829
"import/no-default-export": "off", // Legacy API.
2930
"react/no-find-dom-node": "off",
3031
"@typescript-eslint/explicit-module-boundary-types": "off",
31-
"@typescript-eslint/ban-ts-comment": "off"
32+
"@typescript-eslint/ban-ts-comment": "off",
33+
34+
// Resolving jsx-runtime mismatched versions of React (e.g. v17 vs v18)
35+
// See https://github.com/Doist/reactist/pull/979
36+
"no-restricted-imports": "off"
37+
3238
},
3339
"overrides": [
3440
{

.github/CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ Our [README](../README.md) should contain all information to get you started. If
1010

1111
Do you want to work on an existing issue?
1212

13-
- Leave a comment on the issue saying that you start working on it.
13+
- Leave a comment on the issue saying that you start working on it.
1414

1515
Do you want to add a new component?
1616

17-
- Create an issue describing the component and we'll tell you whether it's a good fit for Reactist (most of them will be so don't be shy 😊). After that you can start working on it.
17+
- Create an issue describing the component and we'll tell you whether it's a good fit for Reactist (most of them will be so don't be shy 😊). After that you can start working on it.
1818

1919
Did you find a bug or a component not behaving as expected?
2020

21-
- Create an issue describing the problem. Either we will fix this or give you the opportunity (and help) to fix it yourself.
21+
- Create an issue describing the problem. Either we will fix this or give you the opportunity (and help) to fix it yourself.
2222

2323
Any other question / feedback?
2424

25-
- Open an issue and let us know :)
25+
- Open an issue and let us know :)
2626

2727
## Struggling during development or need help?
2828

.github/ISSUE_TEMPLATE/Bug.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ If possible, describe how this bug could be fixed.
3131
Consider adding any relevant environment information here.
3232
-->
3333

34-
- `@doist/reactist` version:
35-
- `react` version:
36-
- Browser:
34+
- `@doist/reactist` version:
35+
- `react` version:
36+
- Browser:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Please describe your implementation and any details that we should keep in mind
1616
Feel free to leave unchecked or remove the lines that are not applicable.
1717
-->
1818

19-
- [ ] Added tests for bugs / new features
20-
- [ ] Updated docs (storybooks, readme)
21-
- [ ] Reviewed and approved Chromatic visual regression tests in CI
19+
- [ ] Added tests for bugs / new features
20+
- [ ] Updated docs (storybooks, readme)
21+
- [ ] Reviewed and approved Chromatic visual regression tests in CI
2222

2323
<!--
2424
_Note:_ versioning is handled by [release-please](https://github.com/googleapis/release-please) action, based on the PR title.

.storybook/webpack.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ module.exports = {
4040
{
4141
test: /\.(m?jsx?|tsx?)$/,
4242
// Exclude all node_modules from transpilation, except for Ariakit and Storybook testing libraries
43-
exclude: /node_modules\/(?!(ariakit.*|@storybook\/expect|@storybook\/jest|@adobe\/css-tools|@testing-library\/jest-dom)\/).*/,
43+
exclude:
44+
/node_modules\/(?!(ariakit.*|@storybook\/expect|@storybook\/jest|@adobe\/css-tools|@testing-library\/jest-dom)\/).*/,
4445
use: [{ loader: 'babel-loader', options: babelConfigForNodeModules }],
4546
},
4647
{

CHANGELOG.md

Lines changed: 512 additions & 549 deletions
Large diffs are not rendered by default.

CODE_OF_CONDUCT.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ We pledge to act and interact in ways that contribute to an open, welcoming, div
1010

1111
Examples of behavior that contributes to a positive environment for our community include:
1212

13-
- Demonstrating empathy and kindness toward other people
14-
- Being respectful of differing opinions, viewpoints, and experiences
15-
- Giving and gracefully accepting constructive feedback
16-
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17-
- Focusing on what is best not just for us as individuals, but for the overall community
13+
- Demonstrating empathy and kindness toward other people
14+
- Being respectful of differing opinions, viewpoints, and experiences
15+
- Giving and gracefully accepting constructive feedback
16+
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
- Focusing on what is best not just for us as individuals, but for the overall community
1818

1919
Examples of unacceptable behavior include:
2020

21-
- The use of sexualized language or imagery, and sexual attention or advances of any kind
22-
- Trolling, insulting or derogatory comments, and personal or political attacks
23-
- Public or private harassment
24-
- Publishing others' private information, such as a physical or email address, without their explicit permission
25-
- Other conduct which could reasonably be considered inappropriate in a professional setting
21+
- The use of sexualized language or imagery, and sexual attention or advances of any kind
22+
- Trolling, insulting or derogatory comments, and personal or political attacks
23+
- Public or private harassment
24+
- Publishing others' private information, such as a physical or email address, without their explicit permission
25+
- Other conduct which could reasonably be considered inappropriate in a professional setting
2626

2727
## Enforcement Responsibilities
2828

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ We recommend you enable these tests on those Storybook stories that have several
197197

198198
When you open a GitHub PR, you'll notice the "UI Review" and "UI Tests" CI steps.
199199

200-
- Clicking on "Details" will bring you to the Chromatic UI (if you don't already have a Chromatic account, please sign-up using your GitHub account).
201-
- Now you can review and accept your changes (or go back and change your code).
202-
- When you're happy with your changes, make sure to mark them as "Approved".
200+
- Clicking on "Details" will bring you to the Chromatic UI (if you don't already have a Chromatic account, please sign-up using your GitHub account).
201+
- Now you can review and accept your changes (or go back and change your code).
202+
- When you're happy with your changes, make sure to mark them as "Approved".
203203

204204
# Releasing
205205

@@ -208,7 +208,6 @@ This project uses [release-please](https://github.com/googleapis/release-please)
208208
## How it works
209209

210210
1. Make your changes using [Conventional Commits](https://www.conventionalcommits.org/):
211-
212211
- `feat:` for new features (minor version bump)
213212
- `fix:` for bug fixes (patch version bump)
214213
- `style:` for code style changes
@@ -223,7 +222,6 @@ This project uses [release-please](https://github.com/googleapis/release-please)
223222
- `chore:` for maintenance tasks (NOTE: these are not included in the changelog)
224223

225224
2. When commits are pushed to `main`:
226-
227225
- Release-please automatically creates/updates a release PR
228226
- The PR includes version bump and changelog updates
229227
- Review the PR and merge when ready

0 commit comments

Comments
 (0)