Code Monkey home page Code Monkey logo

arc-tslint's People

Contributors

mkmik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

arc-tslint's Issues

Command failed with error - Cannot find module

I'm trying to use arc-tslint but am getting the following error anytime I try to run arc diff --preview or even arc linters

 ERROR       tslint (tslint)

    CommandException
    Command failed with error #1!
    COMMAND
    "client/node_modules/tslint/bin/tslint" --version

    STDOUT
    (empty)

    STDERR
    '"client/node_modules/tslint/bin/tslint"' is not recognized as an
    internal or external command,
    operable program or batch file.

(Run `arc linters --verbose` for more details.)

Here is my .arcconfig file:

{
  "phabricator.uri" : "http://altsacmphab.dshs.wa.gov/",
  "repository.callsign" : "CMR",
  "load": ["arc/arc-tslint"]
}

And my .arclint

{
  "linters": {
    "ts": {
      "type": "tslint",
      "include": "(src/.*\\.(ts)$)",
      "bin": "client/node_modules/tslint/bin/tslint",
      "tslint.project": "client/tsconfig.json"
    }
  }
}

I have tried without using the bin parameter as well with a globally installed tslint, but that just gives me: Error: Cannot find module 'C:\_CAREMod\node_modules\tslint\bin\tslint' because the node modules folder is in a sub folder of "client" so of course it can't be found.

It doesn't seem to be trying to use the global install at all. And as shown above, setting the local install doesn't work either.

Allow custom "bin" path for "tslint"

Currently the binary used to check is hardcoded to getDefaultBinary and hence the "bin" config within "tslint" in .arclint is not being honored. This is helpful in cases where we want to use locally installed tslint within node_modules directory.

missing warning

Hi,

I miss the warning for unused imports.

$ npm run lint

> [email protected] lint /Volumes/Projects/mobile
> ionic-app-scripts lint

[16:25:26]  ionic-app-scripts 2.1.4
[16:25:26]  lint started ...
[16:25:30]  tslint: src/components/flex-calendar/flex-calendar.ts, line: 1
            'OnChanges' is declared but never used.

       L1:  import {Component, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild, ChangeDetectorRef, Input} from "@
       L2:  import {animate, state, style, transition, trigger} from "@angular/animations";

[16:25:30]  tslint: src/components/flex-calendar/flex-calendar.ts, line: 1
            'SimpleChanges' is declared but never used.

       L1:  import {Component, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild, ChangeDetectorRef, Input} from "@
       L2:  import {animate, state, style, transition, trigger} from "@angular/animations";

[16:25:30]  lint finished in 3.96 s

 $ arc lint --everything
 OKAY  No lint warnings.

tslint.json:

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

.arclint:

{
  "linters": {
    "ts": {
      "type": "tslint",
       "include": "(src/.*\\.(ts)$)"
    }
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.