Skip to content

Commit 5b98521

Browse files
committed
Update ESLint config
1 parent 24ec320 commit 5b98521

3 files changed

Lines changed: 200 additions & 11 deletions

File tree

eslint.config.js

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
11
import js from "@eslint/js";
2+
import eslintConfigPrettier from "eslint-config-prettier/flat";
3+
import eslintPluginUnicorn from "eslint-plugin-unicorn";
4+
import { defineConfig, globalIgnores } from "eslint/config";
25
import globals from "globals";
36
import tseslint from "typescript-eslint";
4-
import { defineConfig } from "eslint/config";
57

68
export default defineConfig([
9+
js.configs.recommended,
10+
tseslint.configs.recommended,
11+
eslintPluginUnicorn.configs.all,
12+
eslintConfigPrettier,
713
{
8-
ignores: ["**/dist/**"],
9-
},
10-
{
11-
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
12-
plugins: { js },
13-
extends: ["js/recommended"],
14-
},
15-
{
16-
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
17-
languageOptions: { globals: { ...globals.browser, ...globals.node } },
14+
languageOptions: {
15+
globals: { ...globals.browser, ...globals.node },
16+
},
17+
rules: {
18+
"formatjs/no-offset": "error",
19+
"formatjs/enforce-description": "warn",
20+
21+
// "unicorn/prefer-top-level-await": "off",
22+
"unicorn/filename-case": "off",
23+
"unicorn/custom-error-definition": "off",
24+
},
1825
},
1926
tseslint.configs.recommended,
27+
globalIgnores(["**/__generated/**", "**/dist/**", "**/coverage/**"]),
2028
]);

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
"@testcontainers/kafka": "^11.14.0",
2626
"@types/node": "^25.6.0",
2727
"eslint": "^10.2.0",
28+
"eslint-config-prettier": "^10.1.8",
29+
"eslint-plugin-unicorn": "^64.0.0",
2830
"globals": "^17.5.0",
2931
"lodash": "^4.18.1",
3032
"prettier": "^3.8.3",

0 commit comments

Comments
 (0)