Skip to content

Commit

Permalink
chore: apply format
Browse files Browse the repository at this point in the history
  • Loading branch information
nasustim committed Aug 25, 2024
1 parent 256b05b commit 362e4a4
Show file tree
Hide file tree
Showing 16 changed files with 183 additions and 203 deletions.
2 changes: 0 additions & 2 deletions .env.sample

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"editor.formatOnSave": true,
"editor.formatOnType": false,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
291 changes: 144 additions & 147 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -1,155 +1,152 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true,
"defaultBranch": "main"
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 120,
"attributePosition": "auto"
},
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": {
"recommended": false,
"a11y": { "noBlankTarget": "error" },
"complexity": {
"noBannedTypes": "error",
"noExtraBooleanCast": "error",
"noMultipleSpacesInRegularExpressionLiterals": "error",
"noUselessCatch": "error",
"noUselessThisAlias": "error",
"noUselessTypeConstraint": "error",
"noWith": "error"
},
"correctness": {
"noChildrenProp": "error",
"noConstAssign": "error",
"noConstantCondition": "error",
"noEmptyCharacterClassInRegex": "error",
"noEmptyPattern": "error",
"noGlobalObjectCalls": "error",
"noInnerDeclarations": "error",
"noInvalidConstructorSuper": "error",
"noNewSymbol": "error",
"noNonoctalDecimalEscape": "error",
"noPrecisionLoss": "error",
"noSelfAssign": "error",
"noSetterReturn": "error",
"noSwitchDeclarations": "error",
"noUndeclaredVariables": "error",
"noUnreachable": "error",
"noUnreachableSuper": "error",
"noUnsafeFinally": "error",
"noUnsafeOptionalChaining": "error",
"noUnusedLabels": "error",
"noUnusedVariables": "error",
"useArrayLiterals": "off",
"useIsNan": "error",
"useJsxKeyInIterable": "error",
"useValidForDirection": "error",
"useYield": "error"
},
"security": { "noDangerouslySetInnerHtmlWithChildren": "error" },
"style": { "noNamespace": "error", "useAsConstAssertion": "error" },
"suspicious": {
"noAssignInExpressions": "error",
"noAsyncPromiseExecutor": "error",
"noCatchAssign": "error",
"noClassAssign": "error",
"noCommentText": "error",
"noCompareNegZero": "error",
"noControlCharactersInRegex": "error",
"noDebugger": "error",
"noDuplicateCase": "error",
"noDuplicateClassMembers": "error",
"noDuplicateJsxProps": "error",
"noDuplicateObjectKeys": "error",
"noDuplicateParameters": "error",
"noEmptyBlockStatements": "error",
"noExplicitAny": "error",
"noExtraNonNullAssertion": "error",
"noFallthroughSwitchClause": "error",
"noFunctionAssign": "error",
"noGlobalAssign": "error",
"noImportAssign": "error",
"noMisleadingCharacterClass": "error",
"noMisleadingInstantiator": "error",
"noPrototypeBuiltins": "error",
"noRedeclare": "error",
"noShadowRestrictedNames": "error",
"noUnsafeDeclarationMerging": "error",
"noUnsafeNegation": "error",
"useGetterReturn": "error",
"useValidTypeof": "error"
}
}
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "single",
"quoteProperties": "asNeeded",
"trailingCommas": "all",
"semicolons": "asNeeded",
"arrowParentheses": "always",
"bracketSpacing": true,
"bracketSameLine": false,
"quoteStyle": "single",
"attributePosition": "auto"
}
},
"overrides": [
{
"include": [
"*.stories.@(ts|tsx|js|jsx|mjs|cjs)",
"*.story.@(ts|tsx|js|jsx|mjs|cjs)"
],
"linter": { "rules": { "correctness": { "useHookAtTopLevel": "off" } } }
},
{
"include": [".storybook/main.@(js|cjs|mjs|ts)"],
"linter": { "rules": {} }
},
{
"include": ["*.ts", "*.tsx", "*.mts", "*.cts"],
"linter": {
"rules": {
"correctness": {
"noConstAssign": "off",
"noGlobalObjectCalls": "off",
"noInvalidConstructorSuper": "off",
"noInvalidNewBuiltin": "off",
"noNewSymbol": "off",
"noSetterReturn": "off",
"noUndeclaredVariables": "off",
"noUnreachable": "off",
"noUnreachableSuper": "off"
},
"style": {
"noArguments": "error",
"noVar": "error",
"useConst": "error"
},
"suspicious": {
"noDuplicateClassMembers": "off",
"noDuplicateObjectKeys": "off",
"noDuplicateParameters": "off",
"noFunctionAssign": "off",
"noImportAssign": "off",
"noRedeclare": "off",
"noUnsafeNegation": "off",
"useGetterReturn": "off"
}
}
}
}
]
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 120,
"attributePosition": "auto"
},
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": {
"recommended": false,
"a11y": { "noBlankTarget": "error" },
"complexity": {
"noBannedTypes": "error",
"noExtraBooleanCast": "error",
"noMultipleSpacesInRegularExpressionLiterals": "error",
"noUselessCatch": "error",
"noUselessThisAlias": "error",
"noUselessTypeConstraint": "error",
"noWith": "error"
},
"correctness": {
"noChildrenProp": "error",
"noConstAssign": "error",
"noConstantCondition": "error",
"noEmptyCharacterClassInRegex": "error",
"noEmptyPattern": "error",
"noGlobalObjectCalls": "error",
"noInnerDeclarations": "error",
"noInvalidConstructorSuper": "error",
"noNewSymbol": "error",
"noNonoctalDecimalEscape": "error",
"noPrecisionLoss": "error",
"noSelfAssign": "error",
"noSetterReturn": "error",
"noSwitchDeclarations": "error",
"noUndeclaredVariables": "error",
"noUnreachable": "error",
"noUnreachableSuper": "error",
"noUnsafeFinally": "error",
"noUnsafeOptionalChaining": "error",
"noUnusedLabels": "error",
"noUnusedVariables": "error",
"useArrayLiterals": "off",
"useIsNan": "error",
"useJsxKeyInIterable": "error",
"useValidForDirection": "error",
"useYield": "error"
},
"security": { "noDangerouslySetInnerHtmlWithChildren": "error" },
"style": { "noNamespace": "error", "useAsConstAssertion": "error" },
"suspicious": {
"noAssignInExpressions": "error",
"noAsyncPromiseExecutor": "error",
"noCatchAssign": "error",
"noClassAssign": "error",
"noCommentText": "error",
"noCompareNegZero": "error",
"noControlCharactersInRegex": "error",
"noDebugger": "error",
"noDuplicateCase": "error",
"noDuplicateClassMembers": "error",
"noDuplicateJsxProps": "error",
"noDuplicateObjectKeys": "error",
"noDuplicateParameters": "error",
"noEmptyBlockStatements": "error",
"noExplicitAny": "error",
"noExtraNonNullAssertion": "error",
"noFallthroughSwitchClause": "error",
"noFunctionAssign": "error",
"noGlobalAssign": "error",
"noImportAssign": "error",
"noMisleadingCharacterClass": "error",
"noMisleadingInstantiator": "error",
"noPrototypeBuiltins": "error",
"noRedeclare": "error",
"noShadowRestrictedNames": "error",
"noUnsafeDeclarationMerging": "error",
"noUnsafeNegation": "error",
"useGetterReturn": "error",
"useValidTypeof": "error"
}
}
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "single",
"quoteProperties": "asNeeded",
"trailingCommas": "all",
"semicolons": "asNeeded",
"arrowParentheses": "always",
"bracketSpacing": true,
"bracketSameLine": false,
"quoteStyle": "single",
"attributePosition": "auto"
}
},
"overrides": [
{
"include": ["*.stories.@(ts|tsx|js|jsx|mjs|cjs)", "*.story.@(ts|tsx|js|jsx|mjs|cjs)"],
"linter": { "rules": { "correctness": { "useHookAtTopLevel": "off" } } }
},
{
"include": [".storybook/main.@(js|cjs|mjs|ts)"],
"linter": { "rules": {} }
},
{
"include": ["*.ts", "*.tsx", "*.mts", "*.cts"],
"linter": {
"rules": {
"correctness": {
"noConstAssign": "off",
"noGlobalObjectCalls": "off",
"noInvalidConstructorSuper": "off",
"noInvalidNewBuiltin": "off",
"noNewSymbol": "off",
"noSetterReturn": "off",
"noUndeclaredVariables": "off",
"noUnreachable": "off",
"noUnreachableSuper": "off"
},
"style": {
"noArguments": "error",
"noVar": "error",
"useConst": "error"
},
"suspicious": {
"noDuplicateClassMembers": "off",
"noDuplicateObjectKeys": "off",
"noDuplicateParameters": "off",
"noFunctionAssign": "off",
"noImportAssign": "off",
"noRedeclare": "off",
"noUnsafeNegation": "off",
"useGetterReturn": "off"
}
}
}
}
]
}
7 changes: 0 additions & 7 deletions env.d.ts

This file was deleted.

3 changes: 2 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ const analyerConfig = require('@next/bundle-analyzer')({
enabled: true,
})({})

module.exports = config = process.env.ANALYZE === 'true' ? analyerConfig : defaultConfig
const config = process.env.ANALYZE === 'true' ? analyerConfig : defaultConfig
module.exports = config
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@
"prepare": "husky install"
},
"lint-staged": {
"*.{ts,tsx,js,jsx}": [
"pnpm run lint:fix"
]
"*.{ts,tsx,js,jsx}": ["pnpm run lint:fix"]
}
}
6 changes: 2 additions & 4 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>nasustim/renovate"
],
"lockFileMaintenance":{
"extends": ["local>nasustim/renovate"],
"lockFileMaintenance": {
"enabled": true
}
}
8 changes: 4 additions & 4 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import './globals.css'
import { type ReactNode } from 'react'
import { SEO, SITE_DOMAIN, SITE_TITLE } from '@/constants/values'
import { GA_MEASUREMENT_ID, SEO, SITE_DOMAIN, SITE_TITLE } from '@/constants/values'
import { fontClassNames } from '@/fonts'
import { DefaultLayout } from '@/layout'
import { joinStr } from '@/util/string'
import { GoogleAnalytics } from '@next/third-parties/google'
import { type Metadata } from 'next'
import { DefaultLayout } from '@/layout'
import { type ReactNode } from 'react'

type Props = {
children: ReactNode
Expand All @@ -21,7 +21,7 @@ function RootLayout({ children }: Props) {
<body>
<DefaultLayout>{children}</DefaultLayout>
</body>
<GoogleAnalytics gaId={process.env.GA_MEASUREMENT_ID} />
<GoogleAnalytics gaId={GA_MEASUREMENT_ID} />
</html>
)
}
Expand Down
6 changes: 3 additions & 3 deletions src/app/works/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Metadata } from 'next'
import { SITE_DOMAIN, SITE_TITLE } from '@/constants/values'
import { Metadata } from 'next'

type Props = {
slug: string
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
function Page({ params }: { params: Props }) {
// biome-ignore lint: no-unused-vars
function Page({}: { params: Props }) {
return <div>🚧 Under Construction 🚧</div>
}

Expand Down
Loading

0 comments on commit 362e4a4

Please sign in to comment.