Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Bug Report
description: Report reproducible behavior in the OrderCloud React SDK that does not match expectations.
title: "[Bug]: "
labels: ["bug"]
type: "Bug"
body:
- type: markdown
attributes:
value: |
Report reproducible SDK defects. Do not include access tokens, credentials, or personal data.
- type: textarea
id: actual-behavior
attributes:
label: Actual behavior
description: Describe the observed behavior, error, or regression.
placeholder: Calling `useAuthQuery` with ... returns ...
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: Describe the result expected from documented or previous SDK behavior.
placeholder: The hook should ...
validations:
required: true
- type: input
id: reproduction-url
attributes:
label: Minimal reproduction URL
description: Link a runnable repository, StackBlitz, CodeSandbox, or other minimal public reproduction.
placeholder: https://github.com/your-org/reproduction
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Steps to reproduce
description: List the smallest sequence needed to observe the defect in the reproduction.
placeholder: |
1. Configure ...
2. Call ...
3. Observe ...
validations:
required: true
- type: dropdown
id: frequency
attributes:
label: Reproduction frequency
options:
- Every time
- Often
- Sometimes
- Only once
validations:
required: true
- type: textarea
id: environment
attributes:
label: Exact versions and platform
description: Do not use `latest`; include resolved versions from your lockfile or `npm ls`.
placeholder: |
@ordercloud/react-sdk:
react / react-dom:
@tanstack/react-query:
ordercloud-javascript-sdk:
Browser or runtime:
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant logs or screenshots
description: Remove secrets, access tokens, and personal data before submitting.
render: shell
validations:
required: false
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Feature Request
description: Suggest an improvement to the OrderCloud React SDK.
title: "[Request]: "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Requests are evaluated on the user problem and a concrete SDK contract, not the implementation alone.
- type: textarea
id: problem
attributes:
label: What problem would this solve?
description: Describe the use case, who it affects, and current limitations.
placeholder: I need to ... because ...
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed SDK contract
description: Show the API, hook, component, types, or behavior consumers would use.
placeholder: |
```ts
const result = useExample({ ... })
```
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives or workarounds
description: Describe the current workaround and why it is insufficient, or state that none exists.
validations:
required: true
- type: textarea
id: acceptance-criteria
attributes:
label: Acceptance criteria
description: List observable conditions that would make this request complete.
placeholder: |
- [ ] ...
- [ ] ...
validations:
required: true
- type: textarea
id: context
attributes:
label: Additional context
description: Include examples, mockups, related issues, or relevant OrderCloud workflows.
validations:
required: false
50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE/NEW_TASK.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: New Task
description: Create a scoped maintenance, documentation, or engineering task.
title: "[Task]: "
type: "Task"
body:
- type: markdown
attributes:
value: |
Use tasks for scoped, independently verifiable maintenance, documentation, or engineering work.
- type: textarea
id: description
attributes:
label: What needs to be done?
description: Describe the goal, scope, and any affected package surfaces.
placeholder: Describe the work to complete.
validations:
required: true
- type: textarea
id: acceptance-criteria
attributes:
label: Acceptance criteria
description: List observable conditions that define completion.
placeholder: |
- [ ] ...
- [ ] ...
validations:
required: true
- type: textarea
id: non-goals
attributes:
label: Non-goals
description: Identify related work that is intentionally outside this task's scope.
placeholder: This task does not include ...
validations:
required: true
- type: textarea
id: validation
attributes:
label: Validation plan
description: State the test, build, consumer check, or manual verification that proves completion.
placeholder: Run ... and verify ...
validations:
required: true
- type: textarea
id: context
attributes:
label: Additional context
description: Include related issues, dependencies, implementation notes, or constraints.
validations:
required: false
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: OrderCloud documentation
url: https://ordercloud.io/knowledge-base/
about: Find OrderCloud platform documentation and implementation guidance.
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Pull Request

## Summary

Describe the change and the problem it solves.

Closes #

## Reviewer Notes

Call out test coverage, API examples, breaking changes, migration guidance, or follow-up work. Automated checks run linting, tests, builds, package inspection, and React consumer validation.
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
npx lint-staged
62 changes: 62 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import js from "@eslint/js";
import tseslint from "@typescript-eslint/eslint-plugin";
import tsparser from "@typescript-eslint/parser";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";

export default [
{
ignores: [
"dist/**",
"test/consumer-fixture/**",
"scripts/**",
"src/__tests__/**",
"src/test/**",
".eslintrc.cjs",
"eslint.config.js",
],
},
js.configs.recommended,
{
files: ["**/*.{ts,tsx}"],
languageOptions: {
parser: tsparser,
ecmaVersion: 2020,
sourceType: "module",
globals: {
window: "readonly",
document: "readonly",
console: "readonly",
setTimeout: "readonly",
localStorage: "readonly",
HTMLElement: "readonly",
fetch: "readonly",
__dirname: "readonly",
process: "readonly",
},
},
plugins: {
"@typescript-eslint": tseslint,
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
},
rules: {
...tseslint.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
"react-refresh/only-export-components": "off",
"react-hooks/rules-of-hooks": "off",
"react-hooks/exhaustive-deps": "off",
"react-hooks/immutability": "off",
"react-hooks/preserve-manual-memoization": "off",
"react-hooks/set-state-in-effect": "off",
"no-unused-vars": "off",
"no-undef": "off",
"no-useless-assignment": "off",
"no-prototype-builtins": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-object-type": "off",
},
},
];
Loading
Loading