Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

max-line-length: ignore long file paths #3403

Closed
aervin opened this issue Oct 26, 2017 · 4 comments
Closed

max-line-length: ignore long file paths #3403

aervin opened this issue Oct 26, 2017 · 4 comments

Comments

@aervin
Copy link
Contributor

aervin commented Oct 26, 2017

A project's directory structure can become very "deep." import statements sometimes look like this:

import {
    StopListComponent
} from './some/maticulously/organized/project/billing-calendar/billing-calendar-route/stop-list/stop-list.component';

which tslint does not like

[tslint] src/app/app.module.ts[59, 1]: Exceeds maximum line length of n

This seems like it could be a common scenario. How about a config flag to ignore long file paths?

@ajafff
Copy link
Contributor

ajafff commented Oct 27, 2017

IMO long paths are only a problem in imports. In all other places you can split the string into multiple parts and place each of them on a new line.

I think this will be covered by #1872

@DanielKucal
Copy link
Contributor

Since #3099 has been merged, after new release you will be able to specify ignore pattern for max-line-length rule like "^import " and store each import statement in single line or keep it like it is now with ignore pattern set to i.e. "^} from ", eventually play with detecting slashes. I guess it can be closed now.

@keyvhinng
Copy link

Does someone know when the next release will happen ? Is there a release schedule ? I'll like to include this change on my project

@ajafff
Copy link
Contributor

ajafff commented Nov 28, 2017

@keyvhinng all important bugfixes for the release are merged. You can expect a new version this week.

@aervin aervin closed this as completed May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants