Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upTypeScript linting works only partially #1283
Comments
This comment has been minimized.
This comment has been minimized.
shavyg2
commented
Jun 4, 2019
|
just ran into this too |
This comment has been minimized.
This comment has been minimized.
|
Just run into this as well. |
This comment has been minimized.
This comment has been minimized.
despian
commented
Jun 20, 2019
|
+1 also having problems with this Another issue I came across is the indentation rules will break under certain circumstances. You can fix this by adding: /* eslint indent: off */
/* eslint @typescript-eslint/indent: [error, 2] */I'm sure there are probably also many other weird edge-case issues. typescript-eslint does provide a set of sane rules recommended.json but it's not possible to enable these when using standard. Also, some of these rules aren't really compatible with the standard rules. E.g. "@typescript-eslint/indent": "error" // defaults to 4 spaceIt would be nice if typescript had proper "no config needed" support in standard. Maybe the standard project could include their own set of sane defaults for typescript which are compatible with the normal js rules and apply them if the typescript plugin is loaded. If I were to submit a PR along these lines is it likely it would be accepted? |
This comment has been minimized.
This comment has been minimized.
despian
commented
Jun 20, 2019
•
|
Actually, the suggestion in #1007 would resolve this. |
This comment has been minimized.
This comment has been minimized.
bjufre
commented
Jul 3, 2019
|
Any news here? This would make life much easier... |
roocky-one
added a commit
to roocky-lab/typescript-project-guidelines
that referenced
this issue
Jul 5, 2019
This comment has been minimized.
This comment has been minimized.
PandawanFr
commented
Aug 10, 2019
|
Any updates? I thought I could just add this to my standard config but I get "parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint/eslint-plugin"
]I know we can use |
This comment has been minimized.
This comment has been minimized.
|
I'd like to have solve this in a future version of
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error"
} |
feross
added
accepted
bug
labels
Aug 11, 2019
This comment has been minimized.
This comment has been minimized.
|
@feross Thanks for the reply That was plan B, but it wasn't possible because |
This comment has been minimized.
This comment has been minimized.
ndom91
commented
Aug 14, 2019
•
|
@feross would it make sense to open an issue on Typescript support in general and maybe even pin it? People can weigh in on what the best path forward would be (out of the box support, plugin, etc.), which rules to include, etc. etc. EDIT: Sorry just saw your new issue 'Making standard easier to use' which covers a lot of the typescript stuff. |
ArmorDarks commentedMay 24, 2019
What version of standard?
v12.0.1
What operating system, Node.js, and npm version?
Window 10
Node v10.15.3
NPM v6.9.0
What did you expect to happen?
Expected to have ability use TypeScript linting
What actually happened?
Following #1278, provided docs are insufficient to make TypeScript linting fully work, since while it will become enabled, due to lack of the TypeScript plugin rules extensions, rules actually won't work (see #1278 (comment)).
More of it, since there is no way to disable
no-unused-vars, Standard will always fail on imports of the types.For now there is no way to make it fully work. False-unsued vars can be fixed by providing within each file
but that doesn't looks like convinient at all.