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

Nothing happens #910

Closed
rochapablo opened this issue Jun 2, 2017 · 3 comments

Comments

@rochapablo
Copy link

commented Jun 2, 2017

When I run $ standard no message output is retuned;

pablo:hello-project pablo$ standard
pablo:hello-project pablo$

This is my config inside package.json:

"standard": {
  "ignore": [
    "/src/assets/",
    "karma.conf.js",
    "protractor.conf.js"
  ],
  "parser": "babel-eslint",
  "plugins": [
    "eslint-plugin-typescript"
  ],
  "rules": {
    "typescript/type-annotation-spacing": "error"
  }
}

If I remove the ignore, still got nothing; but removing all config only my .js files it's validate. But what I need it's validate my .ts files.

I'm working with

  • Angular JS 2 (4.2.0)
  • Angular CLI (1.0.6)
  • "babel-eslint": "^7.2.3"
  • "eslint-plugin-typescript": "^0.1.0"
  • "standard": "^10.0.2"
  • "typescript-eslint-parser": "^3.0.0"

Is there anyone who could guide me here?

@Flet

This comment has been minimized.

Copy link
Member

commented Jun 8, 2017

Currently, standard only scans *.js and *.jsx files:
https://github.com/Flet/standard-engine/blob/master/index.js#L12

Unfortunately I don't think it will be possible to support typescript files until they are well supported in eslint. Some related efforts:
https://github.com/eslint/typescript-eslint-parser
https://github.com/krzkaczor/standardts

I'm going to close this issue, but please feel free to continue the conversation!

@Flet Flet closed this Jun 8, 2017

@feross

This comment has been minimized.

Copy link
Member

commented Jun 21, 2017

Actually, it's possible to use standard with Typescript.

Install these two packages:

npm install typescript-eslint-parser eslint-plugin-typescript

Then tell standard to check all *.ts files, and to use the two packages we just installed:

standard --plugin typescript --parser typescript-eslint-parser *.ts

If you want, you can put some of that config into package.json:

{
  "standard": {
    "parser": "typescript-eslint-parser",
    "plugins": [
      "typescript"
    ]
  }
}

With that config in place, you can run standard *.ts and you're good to go!

@feross

This comment has been minimized.

Copy link
Member

commented Jun 21, 2017

I just sent a PR to add these instructions to the readme: #928

@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.
3 participants
You can’t perform that action at this time.