I have the following eslint config:
"object-curly-newline": ["error", {
"ImportDeclaration": "never",
"ExportDeclaration": "never"
}],
That transforms:
import {
something,
somethingelse,
} from "../here";
to
import { something,
somethingelse, } from "../here";
but I'd like to get my import so it goes to a single line. Like so:
import { something, somethingelse, } from "../here";
Is there a way to do this within "object-curly-newline"? Or can I accomplish it via some other rule? I've tried the various other properties, but haven't had any luck.
The problem comes from
object-curly-newline
, which can be configured specifically for named imports usingImportDeclaration
:As stated in the docs: