Skip to content
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

Does it work with Angular 2 #862

Closed
kina4smile opened this issue Apr 18, 2017 · 1 comment

Comments

@kina4smile
Copy link

commented Apr 18, 2017

I have a project on Ionic 2 with Angular 2, I'm trying to use Standard but I'm getting a lot of errors I can not fix, like white space on declarations or @ sign on @Injectable, or @input or many others. I've added experimental features, but it didn't help. My packege.json looks like this

 {
  "name": "ionic-hello-world",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "build": "ionic-app-scripts build",
    "watch": "ionic-app-scripts watch",
    "serve:before": "watch",
    "test": "standard \"**/*.ts\" \"**/*.js\"",
    "fix": "standard \"**/*.ts\" \"**/*.js\" --fix"
  },
  "standard": {
    "parser": "babel-eslint",
    "ignore": [
      "/plugins/"
    ]
  },
  "dependencies": {
    "@angular/common": "2.0.0",
    "@angular/compiler": "2.0.0",
    "@angular/compiler-cli": "0.6.2",
    "@angular/core": "2.0.0",
    "@angular/forms": "2.0.0",
    "@angular/http": "2.0.0",
    "@angular/platform-browser": "2.0.0",
    "@angular/platform-browser-dynamic": "2.0.0",
    "@angular/platform-server": "2.0.0",
    "@ionic/storage": "1.0.3",
    "hammerjs": "^2.0.8",
    "ionic-angular": "2.0.0-rc.1",
    "ionic-native": "2.2.3",
    "ionicons": "3.0.0",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "0.6.21"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^0.0.36",
    "babel-eslint": "^7.2.2",
    "standard": "^10.0.2",
    "typescript": "^2.0.3"
  }
}

And here is some of errors I'm getting:
screenshot_2
screenshot_3

@feross

This comment has been minimized.

Copy link
Member

commented Apr 22, 2017

Since you're linting TypeScript files, you need to tell standard to use a plugin to convert your TypeScript to normal JavaScript.

You can see instructions for doing this for Flow in the readme: https://standardjs.com/#can-i-use-a-javascript-language-variant-like-flow Just follow those instructions, but instead of installing eslint-plugin-flowtype, you should install eslint-plugin-typescript.

@feross feross closed this Apr 22, 2017

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.