Skip to content

Commit

Permalink
fix: Update ESLint v8 to v9 (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
bicstone authored Oct 18, 2024
1 parent 954fa73 commit 9ce0133
Show file tree
Hide file tree
Showing 36 changed files with 7,564 additions and 8,344 deletions.
65 changes: 0 additions & 65 deletions .eslintignore

This file was deleted.

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

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: "npm"
- run: npm ci
- run: npm audit signatures
- run: npm run build
- run: npm run test
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- run: pnpm run test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npm run build
pnpm run build
4 changes: 1 addition & 3 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"semi": false
}
{}
10 changes: 6 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ Pull Requests are always welcome, but please discuss larger changes via issue be

1. Fork the repository.
1. Clone the fork to your local machine
1. Install the dependencies with npm
`npm install`
1. Enable corepack
`corepack enable`
1. Install the dependencies with pnpm
`pnpm install`
1. Create a new topic branch
`git checkout -b fix/topic`
1. Make changes
1. Run build & test
`npm run build`
`npm run test`
`pnpm run build`
`pnpm run test`
1. commit and push
`git push -u origin HEAD`
1. make a Pull Request.
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/sourcemap-register.js

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import eslintConfigLove from "eslint-config-love";
import eslintPluginRegexp from "eslint-plugin-regexp";

/**
* @type {import("eslint").Linter.Config[]}
*/
export default [
{
...eslintConfigLove,
files: ["src/**/*.ts"],
rules: {
...eslintConfigLove.rules,
// Tentatively changed from error to warn due to migration
"@typescript-eslint/consistent-type-assertions": "warn",
"@typescript-eslint/no-magic-numbers": "off",
"@typescript-eslint/no-unnecessary-condition": "warn",
"@typescript-eslint/strict-boolean-expressions": "warn",
"@typescript-eslint/prefer-nullish-coalescing": "warn",
"@typescript-eslint/prefer-destructuring": "warn",
"@typescript-eslint/no-base-to-string": "warn",
},
},
{
...eslintPluginRegexp.configs["flat/recommended"],
files: ["src/**/*.ts"],
},
];
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,4 @@ export default {

// Whether to use watchman for file crawling
// watchman: true,
}
};
Loading

0 comments on commit 9ce0133

Please sign in to comment.