marcuzy / tslint-origin-ordered-imports-rule Goto Github PK
View Code? Open in Web Editor NEWTSLint Origin Ordered Imports Rule
TSLint Origin Ordered Imports Rule
Yarn 2 yields the following error:
โค YN0002: โ tslint-origin-ordered-imports-rule@npm:1.2.1 doesn't provide typescript@>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev requested by tsutils@npm:2.29.0
See https://yarnpkg.com/advanced/error-codes#yn0002---missing_peer_dependency for description of the problem.
Could you add typescript as a peer-dependency?
Is this in the roadmap?
Hi! First of all, thanks for a great tool.
It does help us a lot, but we need more complex grouping of internal imports - several block depending on path and filenames. Is it possible to provide an array or hash of customRules
or achieve same behavior in another way?
First of all, thanks for your TSLint plugin, very useful.
I tried to order a custom path import after a relative import and the error appears, but it says "Import of node_modules must be higher than custom import".
Is possibile to manage custom path with a different rule? Or maybe, simply change the error message?
For example "Absolute import must be higher than relative import"
Hi,
I've been using your package for more than half a year. Thanks for the work you do!
I am asking you to add an extra rule (possibly with false flag by default) that will check that there is an extra line between node_modules imports and our custom ones.
Example:
import { Router } from '@angular/router';
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
import { FormTypes } from '../../local/enums/form-types.enum';
The rules seem to be completly ignored, even in the examples, maybe this used to work on older TS versions?
to delete(related to autofix)
Hi! Thanks for the plugin!
But I'm not sure if it's desired behavior:
My rule:
"origin-ordered-imports": [
true,
"no-blank-lines",
[
"^\\./",
"^@/"
]
]
So I expect imports with prefix ./
go before imports with @/
, but I can't see the warning in this case:
import { Module } from '@nestjs/common'
import { SomeModule } from '@/api/some.module'
import { PostController } from './post.controller'
I expect a warning that ./post.controller
should go before @/api/some.module
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.