Skip to content

Commit a213e39

Browse files
Update ESLint to v9+ (#31)
* Upgraded eslint to version 9 * Refactor error handling to use isAxiosError from axios instead of axios.isAxiosError * Remove composite option from tsconfig.json * Remove unused ESLint disable directives * Update Node.js setup to use version file for consistency * Formatting * Remove individual Prettier configuration files and consolidate into a single .prettierrc.json
1 parent 1837321 commit a213e39

22 files changed

+1378
-4119
lines changed

.github/workflows/code-quality.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup Node
2525
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2626
with:
27-
node-version: 18
27+
node-version-file: .tool-versions
2828
cache: npm
2929
cache-dependency-path: ${{ matrix.path }}/package-lock.json
3030
- run: npm install --frozen-lockfile
@@ -49,7 +49,7 @@ jobs:
4949
- name: Setup Node
5050
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
5151
with:
52-
node-version: 18
52+
node-version-file: .tool-versions
5353
cache: npm
5454
cache-dependency-path: ${{ matrix.path }}/package-lock.json
5555
- run: npm install --frozen-lockfile

pr-review/.eslintrc.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

pr-review/eslint.config.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import js from "@eslint/js"
2+
import importPlugin from "eslint-plugin-import"
3+
import sonarjs from "eslint-plugin-sonarjs"
4+
import eslintPluginUnicorn from "eslint-plugin-unicorn"
5+
import { defineConfig, globalIgnores } from "eslint/config"
6+
import tseslint from "typescript-eslint"
7+
8+
// eslint-disable-next-line import/no-default-export
9+
export default defineConfig([
10+
globalIgnores(["dist/*"]),
11+
{
12+
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
13+
plugins: { js },
14+
extends: ["js/recommended"],
15+
languageOptions: {
16+
parserOptions: {
17+
projectService: { allowDefaultProject: ["eslint.config.js"] },
18+
tsconfigRootDir: import.meta.dirname,
19+
},
20+
},
21+
},
22+
importPlugin.flatConfigs.recommended,
23+
importPlugin.flatConfigs.typescript,
24+
tseslint.configs.recommended,
25+
tseslint.configs.recommendedTypeChecked,
26+
tseslint.configs.stylisticTypeChecked,
27+
sonarjs.configs.recommended,
28+
eslintPluginUnicorn.configs.recommended,
29+
{
30+
rules: {
31+
"unicorn/no-array-for-each": "off",
32+
"unicorn/prefer-string-replace-all": "off",
33+
"unicorn/prevent-abbreviations": "off",
34+
"no-plusplus": "off",
35+
"no-param-reassign": ["error", { props: false }],
36+
"unicorn/no-negated-condition": "off",
37+
"@typescript-eslint/no-use-before-define": "off",
38+
"import/extensions": "off",
39+
"import/no-extraneous-dependencies": ["error", { devDependencies: true }],
40+
"import/prefer-default-export": "off",
41+
"import/no-default-export": "error",
42+
"import/no-unresolved": "off",
43+
},
44+
},
45+
])

0 commit comments

Comments
 (0)