What is the lint command in ionic?


#1

I want to lint my code before running serve or build how do I do this? I know it lints while running these commands but how do I do this independently


#2

I added the following to my package.json:

...
  "scripts": {
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve",
    "lint": "ionic-app-scripts lint"
  },
...

Run by typing npm run lint


#3

I can’t seem to get ANY errors or warnings with my linting file - https://github.com/driftyco/tslint-ionic-rules

Does this work for you in the Ionic 2.1.0?


#4

Same here. Did you ever figure this out?


#5

No - I gave up in the end… I think we need an answer from the core team


#6

This works for me

npm run build --tslint

or

npm run build -i

#8

It looks like linting is working in the latest Ionic version 3.5.3 - it now does linting with ionic serve