Open JounQin opened 3 years ago
Workaround temporarily:
const startConsole = () =>
(require('../src/start-console') as typeof import('../src/start-console')) // eslint-disable-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
.startConsole()
closely related: #10851
Is this the same issue? The =
moves after the DoubleEliminationGroupTournament
comment.
This issue is related to type assertions (as
) and specifically to this PR: https://github.com/prettier/prettier/pull/10341
@glen-84 Yours might be one of these, but I'm not sure which one. Feel free to open a new issue. Note that there is the 'show second format' checkbox on the playground, so you don't need to do the 'first pass/second pass' thing.
Another incorrect comment format:
// original
module.exports = declare(
(
api,
{
modules = false,
},
// eslint-disable-next-line sonarjs/cognitive-complexity
) => {
},
)
// formatted
module.exports = declare((api, { modules = false }) =>
// eslint-disable-next-line sonarjs/cognitive-complexity
{}
);
The only workaround is using top level eslint disable statement: /* eslint-disable sonarjs/cognitive-complexity */
.
Prettier 2.3.0 Playground link
Input:
Output:
Expected behavior:
Do not change comment line.