style: move to deno fmt (#1992)

* Create deno.json

* run format

* run format

* ci: only check formatting

* f

* Update settings.json

* Update settings.json
This commit is contained in:
ITOH
2022-02-04 15:00:04 +01:00
committed by GitHub
parent 637e2c2a90
commit 81f8e0377c
259 changed files with 1731 additions and 1795 deletions
+12 -16
View File
@@ -2,12 +2,10 @@
- Read the [style guide](#style-guide).
- Ask for help on the [official Discord server](https://discord.gg/ddeno)
- If you are going to work on an issue, mention so in the issue comments before
you start working on the issue.
- If you are going to work on a new feature, create an issue and discuss with
other contributors before you start working on the feature.
- Abide by and heed to
[Discord Developer Terms of Service](https://discord.com/developers/docs/legal)
- If you are going to work on an issue, mention so in the issue comments before you start working on the issue.
- If you are going to work on a new feature, create an issue and discuss with other contributors before you start
working on the feature.
- Abide by and heed to [Discord Developer Terms of Service](https://discord.com/developers/docs/legal)
## Submitting a Pull Request
@@ -22,15 +20,14 @@
- File names shall use camel case.
- Comply with
[these guidelines for inclusive code](https://chromium.googlesource.com/chromium/src/+/master/styleguide/inclusive_code.md).
- An exported function must not have more than 4 individual parameters, the rest
arguments should be incorporated inside an object as a single parameter.
- Export all interfaces, types, and enums that are used for or inside an
exported entity.
- Every exported entity must be accompanied by a Typedoc (JSDoc without explicit
types) comment block. Ideally, we prefer single line comment block.
- An exported function must not have more than 4 individual parameters, the rest arguments should be incorporated inside
an object as a single parameter.
- Export all interfaces, types, and enums that are used for or inside an exported entity.
- Every exported entity must be accompanied by a Typedoc (JSDoc without explicit types) comment block. Ideally, we
prefer single line comment block.
- Top-level functions should not use arrow syntax.
- Minimize dependencies (do not add a dependency unless it is absolutely
necessary and has been discussed on the Discord Server).
- Minimize dependencies (do not add a dependency unless it is absolutely necessary and has been discussed on the Discord
Server).
- Do not make circular imports.
- Utilize functional API wherever possible and avoid usage of ES6 classes.
- Please follow the
@@ -45,8 +42,7 @@
## Types Guide
- Must use camel case (same property name as in the docs just in camel case).
- Each field or property must be accompanied with a reasonable JSDoc comment
right above its type definition.
- Each field or property must be accompanied with a reasonable JSDoc comment right above its type definition.
- Must be placed inside of the types module (in `src/types` directory).
Example:
+1 -2
View File
@@ -15,8 +15,7 @@ assignees: ""
3. Scroll down to '....'
4. See error
**Expected behavior** A clear and concise description of what you expected to
happen.
**Expected behavior** A clear and concise description of what you expected to happen.
**Screenshots** If applicable, add screenshots to help explain your problem.
+6 -8
View File
@@ -6,14 +6,12 @@ labels: feat
assignees: ""
---
**Is your feature request related to a problem? Please describe.** A clear and
concise description of what the problem is. Ex. I'm always frustrated when [...]
**Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem
is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like** A clear and concise description of what you
want to happen.
**Describe the solution you'd like** A clear and concise description of what you want to happen.
**Describe alternatives you've considered** A clear and concise description of
any alternative solutions or features you've considered.
**Describe alternatives you've considered** A clear and concise description of any alternative solutions or features
you've considered.
**Additional context** Add any other context or screenshots about the feature
request here.
**Additional context** Add any other context or screenshots about the feature request here.
+18
View File
@@ -0,0 +1,18 @@
name: Check Formatting
on:
push:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
deno: ["v1.x"]
steps:
- uses: actions/checkout@v2
- uses: denoland/setup-deno@main
with:
deno-version: ${{ matrix.deno }}
- name: Check Formatting
run: deno fmt --check
-29
View File
@@ -1,29 +0,0 @@
name: Prettier
on:
push:
branches:
- main
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
# This is important to fetch the changes to the previous commit
fetch-depth: 0
- name: Prettify code
uses: creyD/prettier_action@v3.3
with:
commit_message: "change: prettier code"
# This part is also where you can pass other options, for example:
prettier_options: --write **/*
only_changed: True
env:
GITHUB_TOKEN: ${{ github.token }}