Skip to content

Commit

Permalink
Run linter and use deco from jsr
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Candeia <[email protected]>
  • Loading branch information
mcandeia committed Sep 5, 2024
1 parent 0d68c27 commit c62b346
Show file tree
Hide file tree
Showing 39 changed files with 141 additions and 271 deletions.
7 changes: 5 additions & 2 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ Please inform the type(s) of issue(s) you are reporting:

## Description

Please provide a clear and concise description of the issue or enhancement. Include any relevant information that could help reproduce the issue or understand the request.
Please provide a clear and concise description of the issue or enhancement.
Include any relevant information that could help reproduce the issue or
understand the request.

## Steps to Reproduce (for bugs)

Expand All @@ -35,7 +37,8 @@ Describe what actually happened.

## Additional Context

Add any other context about the issue here, including screenshots, logs, or other supporting information.
Add any other context about the issue here, including screenshots, logs, or
other supporting information.

---

Expand Down
53 changes: 27 additions & 26 deletions CODE-OF-CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,30 @@
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
education, socio-economic status, nationality, personal appearance, race,
religion, or sexual identity and orientation.
size, disability, ethnicity, gender identity and expression, level of
experience, education, socio-economic status, nationality, personal appearance,
race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities
Expand All @@ -37,11 +37,11 @@ Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening,
offensive, or harmful.

## Scope

Expand All @@ -55,19 +55,20 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at {{ email }}. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
reported by contacting the project team at {{ email }}. All complaints will be
reviewed and investigated and will result in a response that is deemed necessary
and appropriate to the circumstances. The project team is obligated to maintain
confidentiality with regard to the reporter of an incident. Further details of
specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org
[homepage]: https://www.contributor-covenant.org
69 changes: 46 additions & 23 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Contributing Guidelines

Thank you for your interest in contributing to the `deco-cx/apps` repository! We are excited to have community members like you involved in improving our collection of powerful apps. This document outlines how you can contribute effectively to the project.
Thank you for your interest in contributing to the `deco-cx/apps` repository! We
are excited to have community members like you involved in improving our
collection of powerful apps. This document outlines how you can contribute
effectively to the project.

## How to Contribute

Expand All @@ -9,57 +12,77 @@ Thank you for your interest in contributing to the `deco-cx/apps` repository! We
When submitting an issue, please use one of the following types:

- **Issue/Bug**: Report bugs or track existing issues.
- **Issue/Discussion**: Start a discussion to gather input on a topic before it becomes a proposal.
- **Issue/Proposal**: Propose a new idea or functionality. This allows for feedback before any code is written.
- **Issue/Question**: Ask for help or clarification on any topic related to the project.
- **Issue/Discussion**: Start a discussion to gather input on a topic before it
becomes a proposal.
- **Issue/Proposal**: Propose a new idea or functionality. This allows for
feedback before any code is written.
- **Issue/Question**: Ask for help or clarification on any topic related to the
project.

### Before You File an Issue

Before submitting an issue, ensure the following:

1. **Correct Repository**: Verify that you are filing the issue in the correct repository within the deco ecosystem.
2. **Existing Issues**: Search through [open issues](./issues) to check if the issue has already been reported or the feature has already been requested.
1. **Correct Repository**: Verify that you are filing the issue in the correct
repository within the deco ecosystem.
2. **Existing Issues**: Search through [open issues](./issues) to check if the
issue has already been reported or the feature has already been requested.
3. **For Bugs**:
- Confirm that it’s not an environment-specific issue. Ensure all prerequisites (e.g., dependencies, configurations) are met.
- Provide detailed logs, stack traces, or any other relevant data to help diagnose the issue.
- Confirm that it’s not an environment-specific issue. Ensure all
prerequisites (e.g., dependencies, configurations) are met.
- Provide detailed logs, stack traces, or any other relevant data to help
diagnose the issue.
4. **For Proposals**:
- Discuss potential features in the appropriate issue to gather feedback before coding.
- Discuss potential features in the appropriate issue to gather feedback
before coding.

### Pull Requests

We welcome contributions via pull requests (PRs). Follow this workflow to submit your changes:
We welcome contributions via pull requests (PRs). Follow this workflow to submit
your changes:

1. **Issue Reference**: Ensure there is an issue raised that corresponds to your PR.
2. **Fork and Branch**: Fork the repository and create a new branch for your changes.
1. **Issue Reference**: Ensure there is an issue raised that corresponds to your
PR.
2. **Fork and Branch**: Fork the repository and create a new branch for your
changes.
3. **Code Changes**:
- Include appropriate tests with your code changes.
- Run linters and format the code according to project standards:
- Run `deno task check`
4. **Documentation**: Update any relevant documentation with your changes.
5. **Commit and PR**: Commit your changes and submit a PR for review.
6. **CI Checks**: Ensure that all Continuous Integration (CI) checks pass successfully.
7. **Review Process**: A maintainer will review your PR, usually within a few days.
6. **CI Checks**: Ensure that all Continuous Integration (CI) checks pass
successfully.
7. **Review Process**: A maintainer will review your PR, usually within a few
days.

#### Work-in-Progress (WIP) PRs

If you’d like early feedback on your work, you can create a PR with the prefix `[WIP]` to indicate that it is still under development and not ready for merging.
If you’d like early feedback on your work, you can create a PR with the prefix
`[WIP]` to indicate that it is still under development and not ready for
merging.

### Testing Your Contributions

Since this repository contains integrations that must be tested against a deco site, you cannot test your contributions in isolation. Please refer to this [Helpful content](https://www.notion.so/decocx/Helpful-Community-Content-101eec7ce64f4becaebb685dd9571e24) for instructions on how to set up a deco site for testing purposes.
Since this repository contains integrations that must be tested against a deco
site, you cannot test your contributions in isolation. Please refer to this
[Helpful content](https://www.notion.so/decocx/Helpful-Community-Content-101eec7ce64f4becaebb685dd9571e24)
for instructions on how to set up a deco site for testing purposes.

### Use of Third-Party Code

- Ensure that any third-party code included in your contributions comes with the appropriate licenses.
- Ensure that any third-party code included in your contributions comes with the
appropriate licenses.

### Releasing a New Version

We follow semantic versioning, and all apps in this repository are versioned collectively using git tags. To release a new version:
We follow semantic versioning, and all apps in this repository are versioned
collectively using git tags. To release a new version:

1. Fork the repository and create a pull request with your changes.
2. After the PR is approved and merged, request a maintainer to react the releaser comment with the required emoji
👍 for **Patch**
🎉 for **Minor**
🚀 for **Major**
2. After the PR is approved and merged, request a maintainer to react the
releaser comment with the required emoji 👍 for **Patch** 🎉 for **Minor** 🚀
for **Major**

When your PR got merged, a new tag will arrive with the desired semver modification.
When your PR got merged, a new tag will arrive with the desired semver
modification.
39 changes: 0 additions & 39 deletions admin/deno.json

This file was deleted.

2 changes: 1 addition & 1 deletion analytics/components/DecoAnalytics.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Head } from "@deco/deco";
import { Head } from "$fresh/runtime.ts";
import { useScriptAsDataURI } from "@deco/deco/hooks";

export interface Props {
Expand Down
40 changes: 0 additions & 40 deletions blog/deno.json

This file was deleted.

2 changes: 1 addition & 1 deletion blog/loaders/BlogpostList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @returns A promise that resolves to an array of blog posts.
*/
import type { AppContext } from "../mod.ts";
import { RequestURLParam } from "../../website/functions/requestToParam.ts";
import type { RequestURLParam } from "../../website/functions/requestToParam.ts";
import type { BlogPost, SortBy } from "../types.ts";
import handlePosts, { slicePosts } from "../utils/handlePosts.ts";
import { getRecordsByPath } from "../utils/records.ts";
Expand Down
8 changes: 4 additions & 4 deletions blog/loaders/BlogpostListing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* @param ctx - The application context.
* @returns A promise that resolves to an array of blog posts.
*/
import { PageInfo } from "../../commerce/types.ts";
import { RequestURLParam } from "../../website/functions/requestToParam.ts";
import { AppContext } from "../mod.ts";
import { BlogPost, BlogPostListingPage, SortBy } from "../types.ts";
import type { PageInfo } from "../../commerce/types.ts";
import type { RequestURLParam } from "../../website/functions/requestToParam.ts";
import type { AppContext } from "../mod.ts";
import type { BlogPost, BlogPostListingPage, SortBy } from "../types.ts";
import handlePosts, { slicePosts } from "../utils/handlePosts.ts";
import { getRecordsByPath } from "../utils/records.ts";

Expand Down
6 changes: 3 additions & 3 deletions blog/loaders/GetCategories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* @param ctx - The application context.
* @returns A promise that resolves to an array of blog posts.
*/
import { RequestURLParam } from "../../website/functions/requestToParam.ts";
import { AppContext } from "../mod.ts";
import { Category } from "../types.ts";
import type { RequestURLParam } from "../../website/functions/requestToParam.ts";
import type { AppContext } from "../mod.ts";
import type { Category } from "../types.ts";
import { getRecordsByPath } from "../utils/records.ts";

const COLLECTION_PATH = "collections/blog/categories";
Expand Down
6 changes: 3 additions & 3 deletions blog/sections/Seo/SeoBlogPostListing.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Seo from "../../../website/components/Seo.tsx";
import {
renderTemplateString,
SEOSection,
type SEOSection,
} from "../../../website/components/Seo.tsx";
import { BlogPostListingPage } from "../../types.ts";
import { AppContext } from "../../mod.ts";
import type { BlogPostListingPage } from "../../types.ts";
import type { AppContext } from "../../mod.ts";

export interface Props {
/** @title Data Source */
Expand Down
2 changes: 1 addition & 1 deletion blog/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ImageWidget } from "../admin/widgets.ts";
import { PageInfo } from "../commerce/types.ts";
import type { PageInfo } from "../commerce/types.ts";

/**
* @titleBy name
Expand Down
2 changes: 1 addition & 1 deletion blog/utils/handlePosts.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BlogPost, SortBy } from "../types.ts";
import type { BlogPost, SortBy } from "../types.ts";
import { VALID_SORT_ORDERS } from "./constants.ts";

/**
Expand Down
1 change: 0 additions & 1 deletion compat/$live/mod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { App } from "@deco/deco";
import { buildImportMap, ImportMap } from "@deco/deco/blocks";

import webSite, { Props } from "../../website/mod.ts";

Expand Down
Loading

0 comments on commit c62b346

Please sign in to comment.