Skip to content

Commit

Permalink
Rework
Browse files Browse the repository at this point in the history
  • Loading branch information
lxsmnsyc committed Feb 10, 2025
1 parent dcf12de commit 0ef348c
Show file tree
Hide file tree
Showing 22 changed files with 4,531 additions and 5,629 deletions.
11 changes: 0 additions & 11 deletions .eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Alexis H. Munsayac
Copyright (c) 2024 Alexis H. Munsayac

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
38 changes: 25 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,33 @@
yarn add @uppy/core solid-uppy
```

### NOTE

Install the following as needed:

- [`@uppy/dashboard`](https://uppy.io/docs/dashboard/) for `createUppyDashboard`
- [`@uppy/drag-drop`](https://uppy.io/docs/drag-drop/) for `createUppyDragDrop`
- [`@uppy/drop-target`](https://uppy.io/docs/drop-target/) for `createUppyDropTarget`
- [`@uppy/file-input`](https://uppy.io/docs/drop-target/) for `createUppyFileInput`
- [`@uppy/informer`](https://uppy.io/docs/informer/) for `createUppyInformer`
- [`@uppy/progress-bar`](https://uppy.io/docs/progress-bar/) for `createUppyProgressBar`
- [`@uppy/status-bar`](https://uppy.io/docs/status-bar/) for `createUppyStatusBar`

## Usage

TODO
```js
import Uppy from '@uppy/core';
import { createUppy, useUppyPlugin, useUppyEvent } from 'solid-uppy';
import Dashboard from '@uppy/dashboard';
import ImageEditor from '@uppy/image-editor';

function Example(props) {
// Create an instance
const instance = createUppy(() => new Uppy());

// Use some plugins
useUppyPlugin(instance, 'Dashboard', Dashboard, {
inline: true,
get target() {
return props.element;
},
});
useUppyPlugin(instance, 'ImageEditor', ImageEditor);

// Listen to events
useUppyEvent(instance, 'file-editor:start', (file) => {
console.log(file);
});
}
```

## License

Expand Down
270 changes: 270 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,270 @@
{
"$schema": "https://unpkg.com/@biomejs/biome/configuration_schema.json",
"files": {
"ignore": ["node_modules/**/*"]
},
"vcs": {
"useIgnoreFile": true
},
"linter": {
"enabled": true,
"ignore": ["node_modules/**/*"],
"rules": {
"a11y": {
"noAccessKey": "error",
"noAriaHiddenOnFocusable": "off",
"noAriaUnsupportedElements": "error",
"noAutofocus": "error",
"noBlankTarget": "error",
"noDistractingElements": "error",
"noHeaderScope": "error",
"noInteractiveElementToNoninteractiveRole": "error",
"noNoninteractiveElementToInteractiveRole": "error",
"noNoninteractiveTabindex": "error",
"noPositiveTabindex": "error",
"noRedundantAlt": "error",
"noRedundantRoles": "error",
"noSvgWithoutTitle": "error",
"useAltText": "error",
"useAnchorContent": "error",
"useAriaActivedescendantWithTabindex": "error",
"useAriaPropsForRole": "error",
"useButtonType": "error",
"useHeadingContent": "error",
"useHtmlLang": "error",
"useIframeTitle": "warn",
"useKeyWithClickEvents": "warn",
"useKeyWithMouseEvents": "warn",
"useMediaCaption": "error",
"useValidAnchor": "error",
"useValidAriaProps": "error",
"useValidAriaRole": "error",
"useValidAriaValues": "error",
"useValidLang": "error"
},
"complexity": {
"noBannedTypes": "error",
"noEmptyTypeParameters": "error",
"noExcessiveCognitiveComplexity": "error",
"noExtraBooleanCast": "error",
"noForEach": "error",
"noMultipleSpacesInRegularExpressionLiterals": "warn",
"noStaticOnlyClass": "error",
"noThisInStatic": "error",
"noUselessCatch": "error",
"noUselessConstructor": "error",
"noUselessLoneBlockStatements": "error",
"noUselessEmptyExport": "error",
"noUselessFragments": "error",
"noUselessLabel": "error",
"noUselessRename": "error",
"noUselessSwitchCase": "error",
"noUselessTernary": "error",
"noUselessThisAlias": "error",
"noUselessTypeConstraint": "error",
"noVoid": "off",
"noWith": "error",
"useArrowFunction": "error",
"useFlatMap": "error",
"useLiteralKeys": "error",
"useOptionalChain": "warn",
"useRegexLiterals": "error",
"useSimpleNumberKeys": "error",
"useSimplifiedLogicExpression": "error"
},
"correctness": {
"noChildrenProp": "error",
"noConstantCondition": "error",
"noConstantMathMinMaxClamp": "error",
"noConstAssign": "error",
"noConstructorReturn": "error",
"noEmptyCharacterClassInRegex": "error",
"noEmptyPattern": "error",
"noFlatMapIdentity": "error",
"noGlobalObjectCalls": "error",
"noInnerDeclarations": "error",
"noInvalidConstructorSuper": "error",
"noInvalidNewBuiltin": "error",
"noInvalidUseBeforeDeclaration": "error",
"noNewSymbol": "error",
"noNodejsModules": "off",
"noNonoctalDecimalEscape": "error",
"noPrecisionLoss": "error",
"noRenderReturnValue": "error",
"noSelfAssign": "error",
"noSetterReturn": "error",
"noStringCaseMismatch": "error",
"noSwitchDeclarations": "error",
"noUndeclaredVariables": "error",
"noUnnecessaryContinue": "error",
"noUnreachable": "error",
"noUnreachableSuper": "error",
"noUnsafeFinally": "error",
"noUnsafeOptionalChaining": "error",
"noUnusedImports": "error",
"noUnusedLabels": "error",
"noUnusedPrivateClassMembers": "error",
"noUnusedVariables": "error",
"noVoidElementsWithChildren": "error",
"noVoidTypeReturn": "error",
"useArrayLiterals": "error",
"useExhaustiveDependencies": "error",
"useHookAtTopLevel": "error",
"useIsNan": "error",
"useValidForDirection": "error",
"useYield": "error"
},
"performance": {
"noAccumulatingSpread": "error",
"noDelete": "off"
},
"security": {
"noDangerouslySetInnerHtml": "error",
"noDangerouslySetInnerHtmlWithChildren": "error",
"noGlobalEval": "off"
},
"style": {
"noArguments": "error",
"noCommaOperator": "off",
"noDefaultExport": "off",
"noImplicitBoolean": "error",
"noInferrableTypes": "error",
"noNamespace": "error",
"noNegationElse": "error",
"noNonNullAssertion": "off",
"noParameterAssign": "off",
"noParameterProperties": "off",
"noRestrictedGlobals": "error",
"noShoutyConstants": "error",
"noUnusedTemplateLiteral": "error",
"noUselessElse": "error",
"noVar": "error",
"useAsConstAssertion": "error",
"useBlockStatements": "error",
"useCollapsedElseIf": "error",
"useConsistentArrayType": "error",
"useConst": "error",
"useDefaultParameterLast": "error",
"useEnumInitializers": "error",
"useExponentiationOperator": "error",
"useExportType": "error",
"useFragmentSyntax": "error",
"useFilenamingConvention": "off",
"useForOf": "warn",
"useImportType": "error",
"useLiteralEnumMembers": "error",
"useNamingConvention": "off",
"useNodejsImportProtocol": "warn",
"useNumberNamespace": "error",
"useNumericLiterals": "error",
"useSelfClosingElements": "error",
"useShorthandArrayType": "error",
"useShorthandAssign": "error",
"useShorthandFunctionType": "warn",
"useSingleCaseStatement": "error",
"useSingleVarDeclarator": "error",
"useTemplate": "off",
"useWhile": "error"
},
"suspicious": {
"noApproximativeNumericConstant": "error",
"noArrayIndexKey": "error",
"noAssignInExpressions": "error",
"noAsyncPromiseExecutor": "error",
"noCatchAssign": "error",
"noClassAssign": "error",
"noCommentText": "error",
"noCompareNegZero": "error",
"noConfusingLabels": "error",
"noConfusingVoidType": "error",
"noConsoleLog": "warn",
"noConstEnum": "off",
"noControlCharactersInRegex": "error",
"noDebugger": "off",
"noDoubleEquals": "error",
"noDuplicateCase": "error",
"noDuplicateClassMembers": "error",
"noDuplicateJsxProps": "error",
"noDuplicateObjectKeys": "error",
"noDuplicateParameters": "error",
"noEmptyBlockStatements": "error",
"noEmptyInterface": "error",
"noExplicitAny": "warn",
"noExtraNonNullAssertion": "error",
"noFallthroughSwitchClause": "error",
"noFunctionAssign": "error",
"noGlobalAssign": "error",
"noGlobalIsFinite": "error",
"noGlobalIsNan": "error",
"noImplicitAnyLet": "off",
"noImportAssign": "error",
"noLabelVar": "error",
"noMisleadingCharacterClass": "error",
"noMisleadingInstantiator": "error",
"noMisrefactoredShorthandAssign": "off",
"noPrototypeBuiltins": "error",
"noRedeclare": "error",
"noRedundantUseStrict": "error",
"noSelfCompare": "off",
"noShadowRestrictedNames": "error",
"noSparseArray": "off",
"noThenProperty": "warn",
"noUnsafeDeclarationMerging": "error",
"noUnsafeNegation": "error",
"useAwait": "error",
"useDefaultSwitchClauseLast": "error",
"useGetterReturn": "error",
"useIsArray": "error",
"useNamespaceKeyword": "error",
"useValidTypeof": "error"
}
}
},
"formatter": {
"enabled": true,
"ignore": ["node_modules/**/*"],
"formatWithErrors": false,
"indentWidth": 2,
"indentStyle": "space",
"lineEnding": "lf",
"lineWidth": 80
},
"organizeImports": {
"enabled": true,
"ignore": ["node_modules/**/*"]
},
"javascript": {
"formatter": {
"enabled": true,
"arrowParentheses": "asNeeded",
"bracketSameLine": false,
"bracketSpacing": true,
"indentWidth": 2,
"indentStyle": "space",
"jsxQuoteStyle": "double",
"lineEnding": "lf",
"lineWidth": 80,
"quoteProperties": "asNeeded",
"quoteStyle": "single",
"semicolons": "always",
"trailingCommas": "all"
},
"globals": [],
"parser": {
"unsafeParameterDecoratorsEnabled": true
}
},
"json": {
"formatter": {
"enabled": true,
"indentWidth": 2,
"indentStyle": "space",
"lineEnding": "lf",
"lineWidth": 80
},
"parser": {
"allowComments": false,
"allowTrailingCommas": false
}
}
}
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
"name": "root",
"private": true,
"workspaces": [
"packages/*",
"examples/*"
"packages/*"
],
"devDependencies": {
"eslint": "^8.6.0",
"eslint-config-lxsmnsyc": "^0.4.0",
"lerna": "^4.0.0",
"typescript": "^4.5.4"
"@biomejs/biome": "^1.9.4",
"lerna": "^8.1.9",
"typescript": "^5.7.3"
}
}
12 changes: 0 additions & 12 deletions packages/solid-uppy/.eslintrc.js

This file was deleted.

Loading

0 comments on commit 0ef348c

Please sign in to comment.