File tree 2 files changed +28
-1
lines changed
2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,24 @@ To disable the info, set the value to `false`.
241
241
}
242
242
```
243
243
244
+ #### info_on_disabling_prettier_conflict_rule
245
+
246
+ Type: ` boolean `
247
+
248
+ Default: ` undefined `
249
+
250
+ To disable the info, set the value to ` false ` .
251
+
252
+ ``` json
253
+ {
254
+ "anolilab" : {
255
+ "eslint-config" : {
256
+ "info_on_disabling_prettier_conflict_rule" : false
257
+ }
258
+ }
259
+ }
260
+ ```
261
+
244
262
### Let [ Prettier] ( https://prettier.io/ ) handle style-related rules
245
263
246
264
Prettier is a code formatting tool that offers fewer options but is more professional than the style-related rules in ESLint.
Original file line number Diff line number Diff line change @@ -77,6 +77,13 @@ if (pkg?.engines?.["node"]) {
77
77
nodeVersion = pkg . engines [ "node" ] ;
78
78
}
79
79
80
+ let anolilabEslintConfig : { [ key : string ] : boolean | undefined } = { } ;
81
+
82
+ if ( pkg ) {
83
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access
84
+ anolilabEslintConfig = pkg ?. [ "anolilab" ] ?. [ "eslint-config" ] ;
85
+ }
86
+
80
87
Object . entries ( engineRules ) . forEach ( ( [ rule , ruleConfig ] ) => {
81
88
Object . keys ( ruleConfig )
82
89
. sort ( semver . rcompare )
96
103
if ( ! global . hasAnolilabEsLintConfigPrettier ) {
97
104
global . hasAnolilabEsLintConfigPrettier = true ;
98
105
99
- consoleLog ( "\nFound prettier as dependency, disabling some rules to fix wrong behavior of the rule with eslint and prettier" ) ;
106
+ if ( anolilabEslintConfig ?. [ "info_on_disabling_prettier_conflict_rule" ] !== false ) {
107
+ consoleLog ( "\nFound prettier as dependency, disabling some rules to fix wrong behavior of the rule with eslint and prettier" ) ;
108
+ }
100
109
}
101
110
102
111
configRules = {
You can’t perform that action at this time.
0 commit comments