I have a pretty long import statement in my JavaScript (ES6) file:
import { A, B, C, D } from '../path/to/my/module/in/very/far/directory/'
Is it OK to add new lines like this?
import { A, B, C, D } from
'../path/to/my/module/in/very/far/directory'
If not, is there any other way to write clean (keeping my code within 80 columns) import statements in ES6 syntax using Babel?
Here are the results from my test using ESLint.
ESLINT PASSED
import fs
from 'fs';
ESLINT PASSED
import
fs
from
'fs';
ESLINT PASSED
import {
moduleName
} from './my/module/file';
And the above code executes fine. I think you are good to go!
NOTE: This .eslintrc was used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With