Use ignore pattern of eslint for max-lenth to allow for long import lines
When working with Vue and Typescript the default settings for eslint are to complain about lines longer then 140 characters. Which works great for the usual code but not for imports. Putting every class / function in to a separate lines works but makes for a lot of scrolling. Using ignore commands around the import block also does the job but is quite redundant.
The solution: Adapting the max-len
rule within your .eslintrc.js
file and using the ignorePattern
like the following:
module.exports = {
...
rules: {
...
'max-len': [2, { code: 140, ignorePattern: '^import .*' }],
...
},
...
};
This way every line that starts with import
will be ignored and you don't need ignore commands around your import block.