Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.
This repository was archived by the owner on May 1, 2020. It is now read-only.

v1.3.8 - Lint task is throwing many "All imports are unused." #1052

@hardikns

Description

@hardikns

Note: for support questions, please use one of these channels:

https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/

Short description of the problem:

Lint task is throwing many "All imports are unused." kind of error after upgrading to 1.3.8. Some error are false positives.

What behavior are you expecting?

Such false positives should not appear. Not sure if this is issue with tslint version 5.2 or something I need to set in the tslint.json

Steps to reproduce:

  1. Create a simple ionic project with one file as under:
  2. Do ionic serve

Sample code below causes
ERROR: ..../src/utils/translate-utils.ts[1, 1]: All imports are unused.

translate-utils.ts:

import { Http } from '@angular/http';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';


export function createTranslateLoader(http: Http) {
  return new TranslateHttpLoader(http, './assets/i18n/', '.json');
}

export function _(s:string) {
  return s;
}

tslint.json:

{
  "rules": {
    "no-duplicate-variable": true,
    "no-unused-variable": [
      true
    ]
  },
  "rulesDirectory": [
    "node_modules/tslint-eslint-rules/dist/rules"
  ]
}

Which @ionic/app-scripts version are you using?
1.3.8

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions