-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
35 lines (34 loc) · 1.08 KB
/
eslint.config.mjs
File metadata and controls
35 lines (34 loc) · 1.08 KB
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
import js from "@eslint/js";
import mm from "@maxmilton/eslint-config";
import unicorn from "eslint-plugin-unicorn";
import { defineConfig } from "eslint/config";
import ts from "typescript-eslint";
export default defineConfig(
js.configs.recommended,
ts.configs.strictTypeChecked,
ts.configs.stylisticTypeChecked,
// @ts-expect-error - broken upstream types
unicorn.configs.recommended,
mm.configs.recommended,
{
linterOptions: {
reportUnusedDisableDirectives: "error",
},
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"no-plusplus": "off", // byte savings
"unicorn/prefer-add-event-listener": "off",
"unicorn/prefer-at": "off", // bad browser support
"unicorn/prefer-dom-node-append": "off",
"unicorn/prefer-global-this": "off", // prefer to clearly separate Bun and DOM
"unicorn/prefer-query-selector": "off",
"unicorn/switch-case-braces": ["error", "avoid"], // byte savings
},
},
{ ignores: ["coverage", "dist"] },
);