Skip to content

Switching from vscode-tslint to vscode-tslint-vue makes only some tslint rules apply #6

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

Closed
dkulchenko opened this issue Dec 6, 2017 · 8 comments

Comments

@dkulchenko
Copy link

Keeping a .ts file open and disabling the tslint extension and enabling vscode-tslint-vue makes most of the tslint-related red squiggles disappear for me. Some rules (like max line length 100) still work just fine, but others (such as force single quote, or require semicolons) stop being in play. Not sure how to diagnose.

My tslint.json, if relevant:

{
  "defaultSeverity": "warning",
  "extends": "tslint-config-airbnb",
  "rules": {
    "import/no-extraneous-dependencies": ["error", {
      "optionalDependencies": ["test/unit/index.js"]
    }],
    "import-name": false,
    "align": [true, "parameters"],
    "quotemark": [true, "single", "avoid-escape"],
    "no-else-after-return": false
  }
}
@prograhammer
Copy link
Owner

prograhammer commented Dec 6, 2017

Can you cook up an example project to replicate this problem and send me a link here on Github? One thing to consider is that this is a fork of vscode-tslint. So if you disable tslint-vscode-vue and try the same file with tslint-vscode extension and the single quote or require semicolon issue doesn't work in your ts file, then that means the problem is upstream.

dkulchenko added a commit to dkulchenko/vscode-tslint-test-case that referenced this issue Dec 6, 2017
@dkulchenko
Copy link
Author

Sure thing - mini example project is here: https://github.com/dkulchenko/vscode-tslint-test-case

Opening up src/index.ts in VSC in that repo has proper squiggles for me with vscode-tslint enabled:

screen shot 2017-12-05 at 7 59 58 pm

But not with vscode-tslint disabled and vscode-tslint-vue enabled:

screen shot 2017-12-05 at 8 00 25 pm

@dkulchenko
Copy link
Author

(Additional note: to make this work, I am hardcoding the path to the test project's tsconfig.json in tslint-vue-1.4.2/server/server.js, as discussed in issue #5, if that changes anything.)

@prograhammer
Copy link
Owner

Yeah, if you have it hardcoded, then the example project (https://github.com/dkulchenko/vscode-tslint-test-case) will not work. You hardcoded it for a specific project, remember?

@dkulchenko
Copy link
Author

dkulchenko commented Dec 6, 2017

Yep - I'm saying I hardcoded it for the example project for the purposes of the test case. #5 went away, but not all the squiggles that should be showing are.

@prograhammer
Copy link
Owner

prograhammer commented Dec 7, 2017

@dkulchenko I found out this is caused by two factors. The extension is using an older typescript version and also there's a flag missing I needed to set. So after I get back from dinner I'll release a new version that should fix this tonight.

@prograhammer
Copy link
Owner

prograhammer commented Dec 7, 2017

@dkulchenko The bug is fixed. Let me know if it is working for you. Also, don't forget to find the 2 places where workspacePath || '' and replace the workspacePath with your hardcoded location of tsconfig.json (for now).

@dkulchenko
Copy link
Author

All looks great now, thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants