I currently use tslint. But, since it's deprecated I want to start using eslint instead.
The only problem is I can't find a way to achieve the same import grouping rules as I have in tslint:
"ordered-imports": [
true,
{
"module-source-path": "full",
"grouped-imports": true,
"groups": ["^([a-z]|@(?!app))", "^(\\.|@app)"]
}
],
Which basically does that separation:
import { errors } from '@common/service-framework/api-utils';
import { AIPayloads } from '@models/core.common.model';
import { groupBy, isEmpty, map, sortBy, uniqBy, values } from 'lodash';
import * as hashObject from 'object-hash';
import { roundRobin } from '@app/common/utils';
import { sanitizeList } from './helpers';
What is does in other words (Rules):
Now, I don't mind if a solution has no freestyle regex option. I only care about achieving the same result.
How can I achieve the same import grouping rules in eslint?