describe('Test', () => {
let commandHandler: RemoveBlackholeCommandHandler;
let storage: jest.Mocked<Storage>;
let cryptoProvider: jest.Mocked<CryptoProvider>;
beforeEach(() => {
privateDirectoryAccessor = {
delete: jest.fn(),
} as any,
cryptoProvider = {
check: jest.fn(),
} as any;
storage = {
save: jest.fn(),
blackholes: {
delete: jest.fn(),
get: jest.fn().mockResolvedValue(blackhole),
save: jest.fn(),
},
} as any;
commandHandler = new RemoveBlackholeCommandHandler(storage, cryptoProvider, privateDirectoryAccessor);
});
});
What did you expect to happen?
I expected Prettier to recognize that the parentheses in the beforeEach block are not necessary around privateDirectoryAccessor and cryptoProvider assignments. The code should be formatted without parenthese
What actually happened?
Pettier suggests to me to add unnecessary parentheses around those functions. It doesn't suggest adding parentheses around storage assignment even though it's the same
What version of
eslint
are you using?8.56.0
What version of
prettier
are you using?3.2.4
What version of
eslint-plugin-prettier
are you using?5.1.3
Please paste any applicable config files that you're using (e.g.
.prettierrc
or.eslintrc
files)// eslint
// prettier
// tsconfig
What source code are you linting?
What did you expect to happen?
I expected Prettier to recognize that the parentheses in the
beforeEach block
are not necessary aroundprivateDirectoryAccessor
andcryptoProvider
assignments. The code should be formatted without parentheseWhat actually happened?
Pettier suggests to me to add unnecessary parentheses around those functions. It doesn't suggest adding parentheses around
storage
assignment even though it's the same