Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/import-section-comments-removed #36

Merged
merged 4 commits into from
Sep 1, 2020

Conversation

shaharkazaz
Copy link
Collaborator

@shaharkazaz shaharkazaz commented Sep 1, 2020

These commits add the following behavior:

  • Comments at the top of the file stay in the same position.
  • Comments before an import statement will be moved with that import statement

Before conductor:

// file level comments shouldn't move
import fs from 'fs';
import { CustomerService } from './customer.service';
import { Customer } from './customer.model';
// should be above this import
import { Order } from '../order/order.model';
import { Component, OnInit } from '@angular/core';
/* I will follow LoggerService wherever he goes */
import { LoggerService } from '@myorg/logger';
/**
 * important comment about Observables
 */
import { Observable } from 'rxjs';
import { spawn } from 'child_process';

After:

// file level comments shouldn't move
import { spawn } from 'child_process';
import fs from 'fs';
/**
 * important comment about Observables
 */
import { Observable } from 'rxjs';

// should be above this import
import { Order } from '../order/order.model';
import { Component, OnInit } from '@angular/core';
/* I will follow LoggerService wherever he goes */
import { LoggerService } from '@myorg/logger';

import { Customer } from './customer.model';
import { CustomerService } from './customer.service';

@shaharkazaz shaharkazaz linked an issue Sep 1, 2020 that may be closed by this pull request
@shaharkazaz shaharkazaz linked an issue Sep 1, 2020 that may be closed by this pull request
@@ -0,0 +1,11 @@
# Import conductor V2
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this file - I will also copy the content into the Release notes here on GitHub

Copy link
Owner

@nivekcode nivekcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Nice job!

@nivekcode nivekcode merged commit c072463 into master Sep 1, 2020
@nivekcode nivekcode deleted the fix/import-section-comments-removed branch September 1, 2020 14:42
@nivekcode
Copy link
Owner

🎉 This PR is included in version 2.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: conductor removes comments in the import section TSLint file level rules removed
2 participants