Prettier 1.15.2
Playground link
--parser babylon
Input:
const resolver = options.resolver
/* $FlowFixMe */
? require(options.resolver)
: defaultResolver;
Output:
const resolver = options.resolver
? /* $FlowFixMe */
require(options.resolver)
: defaultResolver;
Expected behavior:
For output to remain unchanged
Ref facebook/jest#3780
This is still an issue.
this.chromeInstances = CONSTANTS.paralleliseChrome
// I am running in paralel, add a chromeLauncher.launch() command for each required
// instance of Chrome to run in paralell
? await Promise.all([
chromeLauncher.launch(chromeLauncherOptions),
chromeLauncher.launch(chromeLauncherOptions),
chromeLauncher.launch(chromeLauncherOptions)
])
// Every test run will be in the same instance of Chrome
: await chromeLauncher.launch(chromeLauncherOptions);
this.chromeInstances = CONSTANTS.paralleliseChrome
? // I am running in paralel, add a chromeLauncher.launch() command for each required
// instance of Chrome to run in paralell
await Promise.all([
chromeLauncher.launch(chromeLauncherOptions),
chromeLauncher.launch(chromeLauncherOptions),
chromeLauncher.launch(chromeLauncherOptions)
])
: // Every test run will be in the same instance of Chrome
await chromeLauncher.launch(chromeLauncherOptions);
Keeps failing on my ESLint rule no-inline-comments
.
Had to change to if else
:
if (CONSTANTS.paralleliseChrome) {
// I am running in parallel, add a chromeLauncher.launch() command for each required
// instance of Chrome to run in parallel
this.chromeInstances = await Promise.all([
chromeLauncher.launch(chromeLauncherOptions),
chromeLauncher.launch(chromeLauncherOptions),
chromeLauncher.launch(chromeLauncherOptions)
])
} else {
// Every test run will be in the same instance of Chrome
this.chromeInstances = await chromeLauncher.launch(chromeLauncherOptions);
}
Please give this issue some attention.
@alexilyaev We recommend turning off all ESLint rules that conflict with Prettier (or are redundant when using Prettier). https://prettier.io/docs/en/next/integrating-with-linters.html#eslint
(This is still a bug, though.)
@lydell I think no-inline-comments
is not a styling rule, and it does not come up with eslint-config-prettier.
It can catch something unrelated to styling.
or at least Prettier is not supposed to touch it, unless I'm mistaken.
const obj = {
foo: 123 // inline comment here
};
Most helpful comment
@lydell I think
no-inline-comments
is not a styling rule, and it does not come up with eslint-config-prettier.It can catch something unrelated to styling.
or at least Prettier is not supposed to touch it, unless I'm mistaken.