-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
43 lines (42 loc) · 1.02 KB
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import pluginJs from "@eslint/js";
import prettierConfig from "eslint-config-prettier";
import importPlugin from "eslint-plugin-import";
import prettierPlugin from "eslint-plugin-prettier";
import globals from "globals";
import tseslint from "typescript-eslint";
export default [
{
ignores: ["dist/**/*", "examples/**/*"],
},
{
files: ["**/*.{js,mjs,cjs,ts}"],
languageOptions: {
globals: {
...globals.node,
...globals.jest,
},
},
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
plugins: {
prettier: prettierPlugin,
import: importPlugin,
},
rules: {
"prettier/prettier": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"import/order": [
"error",
{
groups: ["builtin", "external", "internal"],
"newlines-between": "always",
alphabetize: { order: "asc" },
},
],
},
},
prettierConfig,
];