Skip to content

Commit

Permalink
chore: update ESLint, migrate configuration file (#2574)
Browse files Browse the repository at this point in the history
### 🎯 Goal

Time to UPGRADE and migrate. :)

PR is divided into multiple commits, ESLint changes, Prettier changes
and manual changes - we can drop Prettier changes for `master` merges
(so that I don't have to deal with merge conflicts) and merge this PR
once our PR backlog is somewhat empty.

#### Notable Changes

- changed CI to run on Node@lts/* instead of v16 and v18
- adjusted `bundle-cjs.mjs` and `getPackageVersion.mjs` to use import
for `package.json` instead (`with` assertion)
- reduced Prettier print-width to 90 (from 100, default is 80) as some
new formattings are just weird
- omitted `eslint-plugin-prettier` as Prettier format step is included
in CI anyway
- explicitly installed `@testing-library/dom` as it's required by our
tests and is no longer installed with `eslint-plugin-jest-dom`
- `noUnusedParameters` and `noUnusedLocals` (`tsconfig.json`) are now
set to `false` to not fail build steps, developers are still warned
through ESLint
- omitted certain other plugins since those weren't used apparently,
compare against these old configs - [generated against
Attachment.test.js](https://gist.github.com/arnautov-anton/9bdce867ed1ddf2b82a6f3f7a5bd9e04)
and [against
Attachment.tsx](https://gist.github.com/arnautov-anton/ee8dbdb8fda4906a0c436c21686e2105)
  • Loading branch information
arnautov-anton authored Jan 31, 2025
1 parent a4d6d83 commit e81fc69
Show file tree
Hide file tree
Showing 399 changed files with 7,309 additions and 4,966 deletions.
22 changes: 0 additions & 22 deletions .eslintignore

This file was deleted.

230 changes: 0 additions & 230 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16, 18]
node: [lts/*]
name: Test with Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"arrowParens": "always",
"jsxSingleQuote": true,
"printWidth": 100,
"printWidth": 90,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all"
Expand Down
2 changes: 1 addition & 1 deletion e2e/fixtures/data/attachment.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable sort-keys */
const smallImageAttachment = [
{
type: 'image',
Expand Down
Loading

0 comments on commit e81fc69

Please sign in to comment.