Add tsdx lint command#99
Add tsdx lint command#99jaredpalmer merged 34 commits intojaredpalmer:masterfrom skvale:feat/linting-command
Conversation
Use it to lint itself
|
Sickkkkk |
|
This looks great. Will give it try in the morning |
|
@skvale I think these rules are a bit too tight. Can we just use |
|
@jaredpalmer I made {
extends: ['react-app'],
};For tsdx, I ran module.exports = {
extends: [
'react-app',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
};We could document the ways of customizing the rules/extensions through
in the README |
|
Since we install prettier for people, we should setup eslint to play nicely? Does eslint config react app do that? |
|
Yep, I'm pretty sure prettier and eslint-config-react-app work well together. How about adding a |
|
Run it by default. The less flags the better |
|
🎉Nice! Can we add a What's the thinking behind providing a separate |
|
Waiting for
|
|
Let's resolve conflicts and get this merged? |
|
@jaredpalmer Sounds good and bumped to |
leohxj
left a comment
There was a problem hiding this comment.
In vs code, eslint does't lint typescript file by default.Do we need a vscode settings file to make eslint lint ts file?
| "@typescript-eslint/parser": "^1.12.0", | ||
| "ansi-escapes": "^3.2.0", | ||
| "asyncro": "^3.0.0", | ||
| "babel-eslint": "^10.0.2", |
There was a problem hiding this comment.
does this necessary?
I think use the @typescript-eslint/parser parser is enough.
|
@leohxj I had to do two things to get eslint to work in vscode. This page for create-react-app explains it well too: https://facebook.github.io/create-react-app/docs/setting-up-your-editor
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
], |
|
Is this g2g? |
|
yeah, I think so |
|
Not for this PR, but we may want to think through some kind of upgrade and/or validation command. This would check package.json, dotfile config, tsconfig, eslint etc. and fill in (and/or reset) any missing pieces. IIRC, jest has something like this called like jest-validate?. |
tsdx lintcommandtsdx lintto lint itself