I'm having a little problem here.
I'm using eslint, and it's making my code broke. Here's some example
const { a, b } = bar()
foo() // return type: void
({a, b} = bar())
If the code stay in this way, it will work as I want, but the eslint is changing the code to the example below and It's breaking
const { a, b } = bar()
foo()(
({a, b} = bar())
)
There's some rule to stop eslint from doing this?
EDIT
The example is a little confusing, here is the code I'm trying to run
let { getByTestId, getByLabelText, getByText } = render(<TechList />)
fireEvent.change(getByLabelText('Tech'), { target: { value: 'NodeJS' } })
fireEvent.submit(getByTestId('tech-form'))
cleanup()
({ getByTestId, getByLabelText, getByText } = render(<TechList />))
And now I don't know if It's prettier
or eslint
making this change..
I'm using VS Code with the ESlint and Prettier extensions, and the editor is formating the code on save
let { getByTestId, getByLabelText, getByText } = render(<TechList />)
fireEvent.change(getByLabelText('Tech'), { target: { value: 'NodeJS' } })
fireEvent.submit(getByTestId('tech-form'))
cleanup()(
({ getByTestId, getByLabelText, getByText } = render(<TechList />))
)