-
Notifications
You must be signed in to change notification settings - Fork 119
Support adding additional compiler options #311
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
base: main
Are you sure you want to change the base?
Changes from 5 commits
96343da
5fae389
4e7f1d3
f620186
ba62d18
ee392c7
310edf7
62f2aff
d2f5cb5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| 'vite-plugin-checker': patch | ||
| --- | ||
|
|
||
| Support merging compiler options with tsconfig in checker ts |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ import type { Worker } from 'worker_threads' | |
| import type { ESLint } from 'eslint' | ||
| import type * as Stylelint from 'stylelint' | ||
| import type { VlsOptions } from './checkers/vls/initParams.js' | ||
| import type * as ts from 'typescript' | ||
|
|
||
| /* ----------------------------- userland plugin options ----------------------------- */ | ||
|
|
||
|
|
@@ -19,6 +20,11 @@ interface TsConfigOptions { | |
| * root path of cwd | ||
| */ | ||
| buildMode: boolean | ||
|
|
||
| /** | ||
| * Additional Compiler options to merge with tsconfig | ||
| */ | ||
| extraTSOptions: ts.CompilerOptions | ||
|
||
| } | ||
|
|
||
| /** | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Why disable eslint @EliLichtblau?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Theres a lint rule that makes it impossible to make a function that takes I think more than 3 arguments iirc - this needs to take 6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try using Rest parameters instead. Disabling eslint should be the last resort i guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe philosophical difference but I disable eslint when making eslint happy makes the code harder to understand. Imo rest parameters make this code that is currently clear less clear. If the maintainer asks me I'll happily make the change but until then I think disabling eslint is probably the right call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createProgramtakes an object anyways, so this can change toBut aside from that, disabling the linter wholesale with no comment isn't the way to go. It provides absolutely no indication to anyone reading why it's happening. Disabling the specific rule with a comment clarifying why (we con't care about the args / we are not in control of the args) goes a long way.