File tree Expand file tree Collapse file tree 2 files changed +1
-39
lines changed Expand file tree Collapse file tree 2 files changed +1
-39
lines changed Original file line number Diff line number Diff line change @@ -263,34 +263,6 @@ test("eslint max-len.tabWidth value should be used for tabWidth when tabs are us
263263 } ) ;
264264} ) ;
265265
266- test ( "Turn off prettier/prettier rule if found, but still infer options from it" , ( ) => {
267- const { eslint, prettier } = getOptionsForFormatting (
268- {
269- rules : {
270- "prettier/prettier" : [
271- 2 ,
272- {
273- trailingComma : "all"
274- }
275- ]
276- }
277- } ,
278- undefined ,
279- undefined ,
280- eslintPath
281- ) ;
282-
283- expect ( eslint ) . toMatchObject ( {
284- rules : {
285- "prettier/prettier" : [ "off" ]
286- }
287- } ) ;
288-
289- expect ( prettier ) . toMatchObject ( {
290- trailingComma : "all"
291- } ) ;
292- } ) ;
293-
294266test ( "eslint config has only necessary properties" , ( ) => {
295267 const { eslint } = getOptionsForFormatting (
296268 {
Original file line number Diff line number Diff line change @@ -65,22 +65,12 @@ function getOptionsForFormatting(
6565 fallbackPrettierOptions = { } ,
6666 eslintPath
6767) {
68- let eslint = getRelevantESLintConfig ( eslintConfig , eslintPath ) ;
68+ const eslint = getRelevantESLintConfig ( eslintConfig , eslintPath ) ;
6969 const prettier = getPrettierOptionsFromESLintRules (
7070 eslintConfig ,
7171 prettierOptions ,
7272 fallbackPrettierOptions
7373 ) ;
74-
75- // Disable "prettier/prettier", we don't need to run prettier twice
76- eslint = {
77- ...eslint ,
78- rules : {
79- ...eslint . rules ,
80- "prettier/prettier" : [ "off" ]
81- }
82- } ;
83-
8474 return { eslint, prettier } ;
8575}
8676
You can’t perform that action at this time.
0 commit comments