Skip to content

Commit

Permalink
removed unnecessary console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
abrulic1 committed Oct 31, 2024
1 parent 66d252e commit 6239506
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 42 deletions.
6 changes: 5 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
"recommended": true,
"suspicious": {
"recommended": true,
"noExplicitAny": "off"
"noExplicitAny": "off",
"noConsole": {
"level": "error",
"options": { "allow": ["assert", "error", "info", "warn"] }
}
},
"style": {
"recommended": true
Expand Down
85 changes: 47 additions & 38 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"vite": ">=5.0.0"
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
"@biomejs/biome": "^1.9.4",
"@remix-run/dev": "^2.9.1",
"@remix-run/node": "^2.9.1",
"@remix-run/react": "^2.9.1",
Expand Down
2 changes: 2 additions & 0 deletions scripts/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ const files = glob.sync("**/*.svg", {
cwd: inputDir,
})
if (files.length === 0) {
// biome-ignore lint/suspicious/noConsole: disable noConsole rule for this line
console.log(`No SVG files found in ${inputDirRelative}`)
process.exit(0)
}
// The relative paths are just for cleaner logs
// biome-ignore lint/suspicious/noConsole: disable noConsole rule for this line
console.log(`Generating sprite for ${inputDirRelative}`)

generateSvgSprite({
Expand Down
2 changes: 2 additions & 0 deletions scripts/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import chalk from "chalk"
import prompt from "prompt"
// Helper method used to verify the run
const verifyRun = async () => {
// biome-ignore lint/suspicious/noConsole: disable noConsole rule for this line
console.log("About to execute the command")

const { sure } = await prompt.get([
{ name: "sure", description: "Are you sure? (y/n)", type: "string", required: true },
])

if (sure !== "y") {
// biome-ignore lint/suspicious/noConsole: disable noConsole rule for this line
console.log(chalk.bold.red("Command aborted!\n"))
process.exit(1)
}
Expand Down
1 change: 0 additions & 1 deletion src/client/components/jsonRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const JsonRenderer = ({ data }: JsonRendererProps) => {
value
.then((res) => {
if (!ref.current) return
console.log(res)
setJson((json: any) => ({
...json,
[key]: res,
Expand Down
3 changes: 2 additions & 1 deletion src/server/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ const log = (message: string) => {
if (config.silent) {
return
}
// eslint-disable-next-line no-console

// biome-ignore lint/suspicious/noConsole: disable noConsole rule for this line
console.log(message)
}

Expand Down
1 change: 1 addition & 0 deletions src/vite/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ export const remixDevTools: (args?: RemixViteConfig) => Plugin[] = (args) => {
async configResolved(resolvedViteConfig) {
if (!args?.suppressDeprecationWarning && resolvedViteConfig.appType === "custom") {
// Log a warning message
// biome-ignore lint/suspicious/noConsole: disable noConsole rule for this line
console.log(
`\n\n⚠️ ${chalk.yellowBright("remix-development-tools")} are going to be deprecated and will be renamed to ${chalk.greenBright("react-router-devtools ")} when React Router v7 is released ⚠️`,
`\n⚠️ Set suppressDeprecationWarning to true in your ${chalk.greenBright("vite.config.ts")} file to silence this warning ⚠️`
Expand Down

0 comments on commit 6239506

Please sign in to comment.