@@ -53,6 +53,24 @@ export default function unjsPreset(
53
53
...( tseslint . configs . recommended as Linter . FlatConfig [ ] ) ,
54
54
// https://github.com/sindresorhus/eslint-plugin-unicorn
55
55
eslintPluginUnicorn . configs [ "flat/recommended" ] as Linter . FlatConfig ,
56
+
57
+ // Preset overrides
58
+ { rules : rules as Linter . RulesRecord } ,
59
+ {
60
+ languageOptions : {
61
+ globals : Object . fromEntries (
62
+ Object . keys ( globals ) . flatMap ( ( group ) =>
63
+ Object . keys ( globals [ group as keyof typeof globals ] ) . map ( ( k ) => [
64
+ k ,
65
+ true ,
66
+ ] ) ,
67
+ ) ,
68
+ ) ,
69
+ } ,
70
+ } ,
71
+ { ignores : [ "dist" , "coverage" , ...( config . ignores || [ ] ) ] } ,
72
+
73
+ // Markdown
56
74
// https://www.npmjs.com/package/eslint-plugin-markdown
57
75
config . markdown !== false && { plugins : { markdown } } ,
58
76
config . markdown !== false && {
@@ -68,24 +86,12 @@ export default function unjsPreset(
68
86
"padded-blocks" : 0 ,
69
87
"@typescript-eslint/no-unused-vars" : 0 ,
70
88
"no-empty-pattern" : 0 ,
89
+ "no-redeclare" : 0 ,
90
+ "no-import-assign" : 0 ,
71
91
...config . markdown ?. rules ,
72
92
} ) as any ,
73
93
} ,
74
- // Preset overrides
75
- { rules : rules as Linter . RulesRecord } ,
76
- {
77
- languageOptions : {
78
- globals : Object . fromEntries (
79
- Object . keys ( globals ) . flatMap ( ( group ) =>
80
- Object . keys ( globals [ group as keyof typeof globals ] ) . map ( ( k ) => [
81
- k ,
82
- true ,
83
- ] ) ,
84
- ) ,
85
- ) ,
86
- } ,
87
- } ,
88
- { ignores : [ "dist" , "coverage" , ...( config . ignores || [ ] ) ] } ,
94
+
89
95
// User overrides
90
96
...( userConfigs as Linter . FlatConfig [ ] ) ,
91
97
] . filter ( Boolean ) as Linter . FlatConfig [ ] ;
0 commit comments