Skip to content

Commit

Permalink
chore: init
Browse files Browse the repository at this point in the history
  • Loading branch information
azat-io committed Oct 13, 2024
1 parent 3efdf4b commit e76123f
Show file tree
Hide file tree
Showing 75 changed files with 12,730 additions and 0 deletions.
1 change: 1 addition & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
defaults and supports es6-module
3 changes: 3 additions & 0 deletions .commitlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
extends: ["@commitlint/config-conventional"]
}
38 changes: 38 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"dictionaries": ["css", "html", "node", "npm", "typescript"],
"useGitignore": true,
"language": "en",
"ignorePaths": [
".github",
"Cargo.lock",
"changelog.md",
"license",
"pnpm-lock.yaml",
"preview/elements/avatar.svelte",
"preview/mock/api.mock.ts",
"tsconfig.json"
],
"words": [
"azat",
"browserslistrc",
"chrono",
"combak",
"dicebear",
"docme",
"docmeup",
"docu",
"docup",
"docus",
"docyou",
"hexdigit",
"lightningcss",
"mockall",
"replacen",
"ropey",
"serde",
"singlefile",
"todoctor",
"todos",
"trivias"
]
}
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.rs]
indent_size = 4
21 changes: 21 additions & 0 deletions .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Dependencies

runs:
using: composite
steps:
- name: Get pnpm store directory
shell: bash
run: |
echo "PNPM_STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.PNPM_STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
shell: bash
18 changes: 18 additions & 0 deletions .github/actions/install-tools/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Install Tools

runs:
using: composite
steps:
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
13 changes: 13 additions & 0 deletions .github/code_of_conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Contributor Code of Conduct

As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for everyone, regardless of the level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.

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. Project maintainers who do not follow the Code of Conduct may be removed from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
26 changes: 26 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- Thank you for contributing! -->

### Description

<!-- Please insert your description here and provide especially info about the "what" this PR is solving -->

### Additional context

<!-- e.g. is there anything you'd like reviewers to focus on? -->

---

### What is the purpose of this pull request? <!-- (put an "X" next to an item) -->

- [ ] Bug fix
- [ ] New feature
- [ ] New icon support
- [ ] New theme support
- [ ] Documentation update
- [ ] Other

### Before submitting the PR, please make sure you do the following

- [ ] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
- [ ] Provide a description in this PR that addresses **what** the PR is solving, or reference the issue that it solves (e.g. `fixes #123`).
- [ ] Ideally, include relevant tests that fail without this PR but pass with it.
5 changes: 5 additions & 0 deletions .github/security.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Security

To report a vulnerability, please open a private vulnerability report at <https://github.com/azat-io/todoctor/security>.

While the discovery of new vulnerabilities is rare, we also recommend always using the latest version of Todoctor extension to ensure your application remains as secure as possible.
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release

on:
push:
tags:
- 'v*'
workflow_dispatch:

jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Tools
uses: ./.github/actions/install-tools

- name: Create GitHub Release
run: pnpx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
132 changes: 132 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: Test

on:
push:
branches:
- 'main'
pull_request:

jobs:
css:
name: CSS
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Tools
uses: ./.github/actions/install-tools

- name: Install Dependencies
uses: ./.github/actions/install-dependencies

- name: Test
run: pnpm test:css

format:
name: Format
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Tools
uses: ./.github/actions/install-tools

- name: Install Dependencies
uses: ./.github/actions/install-dependencies

- name: Test
run: pnpm test:format

js:
name: JS
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Tools
uses: ./.github/actions/install-tools

- name: Install Dependencies
uses: ./.github/actions/install-dependencies

- name: Test
run: pnpm test:js

spelling:
name: Spelling
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Tools
uses: ./.github/actions/install-tools

- name: Install Dependencies
uses: ./.github/actions/install-dependencies

- name: Test
run: pnpm test:spelling

svelte:
name: Svelte
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Tools
uses: ./.github/actions/install-tools

- name: Install Dependencies
uses: ./.github/actions/install-dependencies

- name: Test
run: pnpm test:svelte

types:
name: Types
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Tools
uses: ./.github/actions/install-tools

- name: Install Dependencies
uses: ./.github/actions/install-dependencies

- name: Test
run: pnpm test:types

unit:
name: Unit
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Tools
uses: ./.github/actions/install-tools

- name: Install Dependencies
uses: ./.github/actions/install-dependencies

- name: Test
run: pnpm test:unit

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Node.js
node_modules/
.nvmrc

# Rust
target/

# Build
dist/
bin/

# Editor
.vscode/
.vim/
.idea/

# Misc
.DS_Store
22 changes: 22 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"plugins": ["prettier-plugin-svelte"],
"svelteAllowShorthand": true,
"arrowParens": "avoid",
"bracketSpacing": true,
"endOfLine": "lf",
"printWidth": 80,
"quoteProps": "as-needed",
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false,
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
3 changes: 3 additions & 0 deletions .simple-git-hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"commit-msg": "pnpm exec commitlint -e \"$@\""
}
10 changes: 10 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "@azat-io/stylelint-config",
"ignoreFiles": ["dist/**/*"],
"overrides": [
{
"files": ["**/*.svelte"],
"customSyntax": "postcss-html"
}
]
}
Loading

0 comments on commit e76123f

Please sign in to comment.