Skip to content

Commit

Permalink
chore: add follow up comments on million lint (#8072)
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan authored Dec 16, 2024
1 parent 6f16545 commit 9f4875f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dev/test-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"styled-components": "^6.1.11"
},
"devDependencies": {
"@million/lint": "^1.0.14",
"@million/lint": "1.0.14",
"babel-plugin-react-compiler": "19.0.0-beta-201e55d-20241215",
"chokidar": "^3.6.0",
"vite": "^5.4.11"
Expand Down
8 changes: 8 additions & 0 deletions dev/test-studio/sanity.cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export default defineCliConfig({
? {
target: '18',
sources: (filename) => {
/**
* This is the default filter when `sources` is not defined.
* Since we're overriding it we have to ensure we don't accidentally try running the compiler on non-src files from npm.
*/
if (filename.includes('node_modules')) {
return false
}
Expand All @@ -47,6 +51,10 @@ export default defineCliConfig({
...viteConfig,
plugins: millionLintEnabled
? [
/**
* We're doing a dynamic import here, instead of a static import, to avoid an issue where a WebSocket Server is created by Million for `vite dev` that isn't closed.
* Which leaves `sanity build` hanging, even if the plugin itself isn't actually used.
*/
require('@million/lint').vite({
filter: {
include: millionInclude,
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9f4875f

Please sign in to comment.