Linting Is Back - #8276
Conversation
ff475ba to
0008e5b
Compare
Dependency ReviewThe following issues were found:
|
94a86f1 to
630df87
Compare
630df87 to
0f68f12
Compare
| export function isRawSocketEdge(edge: RawEdge): edge is RawSocketEdge { | ||
| return "fromSocketId" in edge; | ||
| } | ||
| export function isRawSubscriptionEdge( |
There was a problem hiding this comment.
<3 that it allows longer lines, I felt we broke them up too much
vbustamante
left a comment
There was a problem hiding this comment.
Works wonders, great fix
| @@ -121,7 +121,7 @@ const canHaveChildren = computed(() => { | |||
|
|
|||
| const valueUrl = computed(() => { | |||
| if (!_.isString(props.value)) return null; | |||
| if ((props.value as string).match(/https?:\/\//)) { | |||
| if ((props.value).match(/https?:\/\//)) { | |||
There was a problem hiding this comment.
Weird that it didn't remove the unnecessary parens too
There was a problem hiding this comment.
This looks good. I looked through the .ts files and the lint config, and it's really good! Very happy with line length being smaller :)
I think we need to make sure warnings don't make their way into main, and it looks like this won't detect that? But this is way less painful than our existing situation.
We should follow up fast with something that prevents warnings in main, but not block this and let your work rot.
So What Had Happened Was
Now—you can open the root
si/folder and get working linting. You don't need to opensi/app/weborsi/lib/vue-libby itself to get linting to work.We have some rules that I turned into warnings. I didn't want to turn them off because sometimes I want the user to see the note in case they want to take action on it. But, I also don't want them to stop a build from passing. It is a gray area.
However, there are some linting rules that are warnings (e.g. console, let not const, etc) that we don't want passing builds, but, could be really annoying in that pop-over at the bottom of the web app when developing locally?
Let's discuss!
Things I've Learned About VScode Running ESLint
pnpm installs, it is incredibly likely you'll need to entirely close VSCode. Simpy restarting the ESLint server does not always pick up the changed packagesWhat this means for you: after this merges, the first time you work in one of the TS app or lib dirs you'll need to run
pnpm ifor all the dev package changes. And you will need to fully quit VScode and re-open it.How was it tested?
pnpm lint:fixpnpm build:checkDoes it require a docs change?
Yes... here is what my VSCode setup looks like:
ESLintpluginPrettierpluginNOTE: I made a new VSCode profile in order to test that, and then made it the default. You may or may not want to do that