-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from i-VRESSE/biome
Replace eslint with Biome
- Loading branch information
Showing
33 changed files
with
1,807 additions
and
1,631 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,13 @@ | ||
import React from "react"; | ||
import "../src/index.css" | ||
import "../src/index.css"; | ||
|
||
import type { GlobalProvider } from "@ladle/react"; | ||
|
||
export const Provider: GlobalProvider = ({ | ||
children, | ||
globalState, | ||
storyMeta, | ||
}) => { | ||
// Make components that use `className="dark:underline"` dark mode compatible | ||
const theme = globalState.theme; | ||
if (theme === 'dark') { | ||
return ( | ||
<div className="dark text-white"> | ||
{children} | ||
</div> | ||
) | ||
} | ||
return children; | ||
}; | ||
export const Provider: GlobalProvider = ({ children, globalState }) => { | ||
// Make components that use `className="dark:underline"` dark mode compatible | ||
const theme = globalState.theme; | ||
if (theme === "dark") { | ||
return <div className="dark text-white">{children}</div>; | ||
} | ||
return children; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** @type {import('@ladle/react').UserConfig} */ | ||
export default { | ||
defaultStory: "index--readme", | ||
outDir: "docs", | ||
base: process.env.CI ? "/haddock3-ui/" : "/", | ||
}; | ||
defaultStory: "index--readme", | ||
outDir: "docs", | ||
base: process.env.CI ? "/haddock3-ui/" : "/", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"recommendations": [ | ||
"biomejs.biome", | ||
"bradlc.vscode-tailwindcss", | ||
"yoavbls.pretty-ts-errors" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", | ||
"organizeImports": { "enabled": true }, | ||
"vcs": { | ||
"enabled": true, | ||
"clientKind": "git", | ||
"useIgnoreFile": true | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": false, | ||
"complexity": { | ||
"noBannedTypes": "error", | ||
"noExtraBooleanCast": "error", | ||
"noMultipleSpacesInRegularExpressionLiterals": "error", | ||
"noUselessCatch": "error", | ||
"noUselessTypeConstraint": "error", | ||
"noWith": "error" | ||
}, | ||
"correctness": { | ||
"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", | ||
"useExhaustiveDependencies": "warn", | ||
"useHookAtTopLevel": "error", | ||
"useIsNan": "error", | ||
"useValidForDirection": "error", | ||
"useYield": "error" | ||
}, | ||
"style": { "noNamespace": "error", "useAsConstAssertion": "error" }, | ||
"suspicious": { | ||
"noAsyncPromiseExecutor": "error", | ||
"noCatchAssign": "error", | ||
"noClassAssign": "error", | ||
"noCompareNegZero": "error", | ||
"noControlCharactersInRegex": "error", | ||
"noDebugger": "error", | ||
"noDuplicateCase": "error", | ||
"noDuplicateClassMembers": "error", | ||
"noDuplicateObjectKeys": "error", | ||
"noDuplicateParameters": "error", | ||
"noEmptyBlockStatements": "off", | ||
"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" | ||
} | ||
}, | ||
"ignore": ["**/dist", "**/.eslintrc.cjs"] | ||
}, | ||
"overrides": [ | ||
{ | ||
"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" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,72 @@ | ||
{ | ||
"name": "@i-vresse/haddock3-ui", | ||
"version": "0.1.4", | ||
"type": "module", | ||
"private": false, | ||
"sideEffects": false, | ||
"license": "Apache-2.0", | ||
"homepage": "https://github.com/i-VRESSE/haddock3-ui#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/i-VRESSE/haddock3-ui.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/i-VRESSE/haddock3-ui/issues" | ||
}, | ||
"scripts": { | ||
"dev": "ladle serve", | ||
"build": "tsc -b && vite build", | ||
"build:docs": "ladle build", | ||
"preview": "ladle preview", | ||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", | ||
"prepublishOnly": "pnpm build" | ||
}, | ||
"dependencies": { | ||
"clsx": "^2.1.1", | ||
"ngl": "^2.3.1", | ||
"tailwind-merge": "^2.4.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1" | ||
}, | ||
"devDependencies": { | ||
"@ladle/react": "^4.1.0", | ||
"@tailwindcss/typography": "^0.5.13", | ||
"@types/node": "^20.14.12", | ||
"@types/react": "^18.3.3", | ||
"@types/react-dom": "^18.3.0", | ||
"@typescript-eslint/eslint-plugin": "^7.15.0", | ||
"@typescript-eslint/parser": "^7.15.0", | ||
"@vitejs/plugin-react": "^4.3.1", | ||
"autoprefixer": "^10.4.19", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-react-hooks": "^4.6.2", | ||
"eslint-plugin-react-refresh": "^0.4.7", | ||
"postcss": "^8.4.40", | ||
"tailwindcss": "^3.4.6", | ||
"typescript": "^5.2.2", | ||
"vite": "^5.3.4", | ||
"vite-plugin-dts": "^3.9.1" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"module": "dist/index.js", | ||
"types": "./dist/src/index.d.ts", | ||
"exports": { | ||
".": { | ||
"module": "./dist/index.mjs", | ||
"import": { | ||
"types": "./dist/src/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"default": "./dist/index.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"packageManager": "pnpm@9.6.0", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"engines": { | ||
"node": ">=20" | ||
} | ||
"name": "@i-vresse/haddock3-ui", | ||
"version": "0.1.4", | ||
"type": "module", | ||
"private": false, | ||
"sideEffects": false, | ||
"license": "Apache-2.0", | ||
"homepage": "https://github.com/i-VRESSE/haddock3-ui#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/i-VRESSE/haddock3-ui.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/i-VRESSE/haddock3-ui/issues" | ||
}, | ||
"scripts": { | ||
"dev": "ladle serve", | ||
"build": "tsc -b && vite build", | ||
"build:docs": "ladle build", | ||
"preview": "ladle preview", | ||
"lint": "biome lint", | ||
"format": "biome check --write", | ||
"prepublishOnly": "pnpm build" | ||
}, | ||
"dependencies": { | ||
"clsx": "^2.1.1", | ||
"ngl": "^2.3.1", | ||
"tailwind-merge": "^2.4.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "1.8.3", | ||
"@ladle/react": "^4.1.0", | ||
"@tailwindcss/typography": "^0.5.13", | ||
"@types/node": "^20.14.12", | ||
"@types/react": "^18.3.3", | ||
"@types/react-dom": "^18.3.0", | ||
"@typescript-eslint/eslint-plugin": "^7.15.0", | ||
"@typescript-eslint/parser": "^7.15.0", | ||
"@vitejs/plugin-react": "^4.3.1", | ||
"autoprefixer": "^10.4.19", | ||
"postcss": "^8.4.40", | ||
"tailwindcss": "^3.4.6", | ||
"typescript": "^5.2.2", | ||
"vite": "^5.3.4", | ||
"vite-plugin-dts": "^3.9.1" | ||
}, | ||
"files": ["dist"], | ||
"module": "dist/index.js", | ||
"types": "./dist/src/index.d.ts", | ||
"exports": { | ||
".": { | ||
"module": "./dist/index.mjs", | ||
"import": { | ||
"types": "./dist/src/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"default": "./dist/index.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"packageManager": "pnpm@9.6.0", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"engines": { | ||
"node": ">=20" | ||
} | ||
} |
Oops, something went wrong.