-
Notifications
You must be signed in to change notification settings - Fork 136
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
Linting issues on ionic-mocks #257
Comments
I just noticed that in the current setup when I run
it does not pick up linting errors for files in src's sub-directories. E.g deliberately introducing linting errors in say However, the following command notes the errors: I am not sure what's causing this. |
Hey Felix, I can't replicate that behaviour here:
Do you have a repro? Stephen |
Hey Stephen, I have a repro, please find below. my system is ubuntu linux Other system variables are
ionic -v npm -v node -v Here's the repro
--- a/src/pages/clickerList/clickerList.ts
+++ b/src/pages/clickerList/clickerList.ts
@@ -15,6 +15,6 @@ export class ClickerList {
constructor(nav: NavController, clickerService: ClickersService) {
this.nav = nav;
this.clickerService = clickerService;
- this.title = 'Clickers';
+ this.title = 'Clickers'
}
}
So it's a mystery. |
Weird - maybe an ubuntu thing |
I can replicate, ish, on ubuntu. It doesn't pick up the error, but using via node_modules doesn't either |
guess it's a directory depth thing. I thought ** did all dirs:
|
This is bizarrre. I get
ERROR: src/pages/clickerList/clickerList.ts[18, 28]: Missing semicolon but with the /// I get the result several times
ERROR: src/pages/clickerList/clickerList.ts[18, 28]: Missing semicolon |
can you add single quotes around the path in package.json and see if it resolves for you (it does for me on ubuntu): @@ -7,7 +7,7 @@
"ionic_enable_lint": false
},
"scripts": {
- "lint": "tslint ./src/**/*.ts",
+ "lint": "tslint './src/**/*.ts'",
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"ionic:build": "ionic-app-scripts build", |
Yes it does! With the single quotes it works as expected |
excellent, thanks for raising this |
thank you for solving it! |
Getting a ton of linting errors running
From ionic-mocks. Not sure what the story is, they are in node_modules so shouldn't be linted.
https://stackoverflow.com/questions/42483922/exclude-node-modules-from-tslint-in-ionic-2-app
stonelasley/ionic-mocks#5
Obviously ng-cli doesn't give the errors.
The text was updated successfully, but these errors were encountered: