material-foundation / arc-tslint Goto Github PK
View Code? Open in Web Editor NEWtslint linter for phabricator's arc command line tool
License: Apache License 2.0
tslint linter for phabricator's arc command line tool
License: Apache License 2.0
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.
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.
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)$)"
}
}
}
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.