11import js from "@eslint/js" ;
22import mm from "@maxmilton/eslint-config" ;
33import unicorn from "eslint-plugin-unicorn" ;
4+ import { defineConfig } from "eslint/config" ;
45import ts from "typescript-eslint" ;
56
6- const OFF = 0 ;
7- const ERROR = 2 ;
8-
9- export default ts . config (
7+ export default defineConfig (
108 js . configs . recommended ,
119 ts . configs . strictTypeChecked ,
1210 ts . configs . stylisticTypeChecked ,
11+ // @ts -expect-error - broken upstream types
1312 unicorn . configs . recommended ,
1413 mm . configs . recommended ,
1514 {
1615 linterOptions : {
17- reportUnusedDisableDirectives : ERROR ,
16+ reportUnusedDisableDirectives : "error" ,
1817 } ,
1918 languageOptions : {
2019 parserOptions : {
@@ -23,14 +22,13 @@ export default ts.config(
2322 } ,
2423 } ,
2524 rules : {
26- "no-plusplus" : OFF , // byte savings
27- quotes : [ ERROR , "double" , { avoidEscape : true } ] ,
28- "unicorn/prefer-add-event-listener" : OFF ,
29- "unicorn/prefer-at" : OFF , // bad browser support
30- "unicorn/prefer-dom-node-append" : OFF ,
31- "unicorn/prefer-global-this" : OFF , // prefer to clearly separate Bun and DOM
32- "unicorn/prefer-query-selector" : OFF ,
33- "unicorn/switch-case-braces" : [ ERROR , "avoid" ] , // byte savings
25+ "no-plusplus" : "off" , // byte savings
26+ "unicorn/prefer-add-event-listener" : "off" ,
27+ "unicorn/prefer-at" : "off" , // bad browser support
28+ "unicorn/prefer-dom-node-append" : "off" ,
29+ "unicorn/prefer-global-this" : "off" , // prefer to clearly separate Bun and DOM
30+ "unicorn/prefer-query-selector" : "off" ,
31+ "unicorn/switch-case-braces" : [ "error" , "avoid" ] , // byte savings
3432 } ,
3533 } ,
3634 { ignores : [ "coverage" , "dist" ] } ,
0 commit comments