Skip to content

Commit

Permalink
chore(linter): disable no-console rule
Browse files Browse the repository at this point in the history
  • Loading branch information
MiracleHorizon committed Aug 9, 2024
1 parent 82cecf3 commit a7315de
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 203 deletions.
15 changes: 1 addition & 14 deletions apps/backend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
import defaultConfig from '../../eslint.config.js'

/**
TODO: Await issues updates:
- react-hooks: https://github.com/facebook/react/issues/28313,
- next: https://github.com/vercel/next.js/issues/64409
*/

export default [
...defaultConfig,
{
rules: {
'no-console': 'off'
}
}
]
export default defaultConfig
5 changes: 4 additions & 1 deletion apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,16 @@
"@types/multer": "1.4.11",
"@types/node": "20.12.2",
"@types/supertest": "6.0.2",
"eslint": "8.57.0",
"eslint": "9.8.0",
"jest": "29.7.0",
"source-map-support": "0.5.21",
"supertest": "6.3.4",
"ts-jest": "29.1.2",
"ts-loader": "9.5.1",
"ts-node": "10.9.2",
"typescript": "5.4.5"
},
"overrides": {
"eslint": "9.8.0"
}
}
1 change: 0 additions & 1 deletion apps/frontend/src/app/global-error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export const metadata: Metadata = {
const GlobalError = ({ error, reset }: ErrorPageProps) => {
const themeColor = getThemeColorClientCookie()

// eslint-disable-next-line no-console
console.log(error)

return (
Expand Down
1 change: 0 additions & 1 deletion apps/frontend/src/components/ImageUploadForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ export const ImageUploadForm = ({

onUpload(file)
} catch (err) {
// eslint-disable-next-line no-console
console.log(err)
setError(new Error(DEFAULT_MESSAGE))
}
Expand Down
1 change: 0 additions & 1 deletion apps/frontend/src/lib/ui/EyeDropper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const EyeDropperComponent = ({

setColor(color)
} catch (err) {
// eslint-disable-next-line no-console
console.warn(err)
} finally {
document.body.classList.remove('eye-dropper-active')
Expand Down
2 changes: 0 additions & 2 deletions apps/frontend/src/stores/hooks/useImportSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export const useImportSettings = (selectedTab: ToolbarTab) => {
try {
return JSON.parse(settingsJSON)
} catch (err) {
// eslint-disable-next-line no-console
console.warn('Failed to parse settings JSON', err)

return null
Expand Down Expand Up @@ -72,7 +71,6 @@ export const useImportSettings = (selectedTab: ToolbarTab) => {
setData(settings)
handleOpenConfirmAlert()
} catch (err) {
// eslint-disable-next-line no-console
console.warn('Failed to import settings', err)

handleOpenValidationAlert()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export const TabMetadataContent = () => {
})
.then(result => setParsedMetadata(result ?? null))
.catch(err => {
// eslint-disable-next-line no-console
console.log(err)

setParsedMetadata(null)
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default tsEslint.config(
quotes: ['error', 'single'],
semi: ['error', 'never'],
eqeqeq: 'error',
'no-console': 'warn',
'no-console': 'off',
'no-debugger': 'error',
'no-unused-vars': 'error',
'prefer-const': 'error',
Expand Down
Loading

0 comments on commit a7315de

Please sign in to comment.