Skip to content

Commit 88bbee5

Browse files
author
Loïc Mangeonjean
committed
Initial project
0 parents  commit 88bbee5

File tree

12 files changed

+6972
-0
lines changed

12 files changed

+6972
-0
lines changed

.github/workflows/check_build.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Checks
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
7+
jobs:
8+
lint-commits:
9+
name: Lint commits
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v5
13+
with:
14+
# we actually need "github.event.pull_request.commits + 1" commit
15+
fetch-depth: 0
16+
- name: Volta
17+
uses: volta-cli/action@v4
18+
- run: npm ci
19+
- run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
20+
check:
21+
name: Check build
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v5
27+
with:
28+
fetch-depth: 0
29+
- name: Volta
30+
uses: volta-cli/action@v4
31+
- name: Install dependencies
32+
run: npm ci
33+
- name: Build
34+
run: npm run build
35+
- name: Generate release notes preview
36+
id: build-release-notes
37+
uses: guilhermetod/[email protected]
38+
- name: Comment release notes preview
39+
if: steps.build-release-notes.outputs.releaseNotes
40+
uses: peter-evans/create-or-update-comment@v1
41+
with:
42+
issue-number: ${{ github.event.number }}
43+
body: |
44+
## 👋 Hey there!
45+
Thank you for you contribution. Below is a preview of the release notes if your PR gets merged.
46+
Please, make sure it includes all your significant changes with descriptive messages.
47+
Keep in mind that release notes are automatically generated from the commit messages according to [conventional commits](https://www.conventionalcommits.org/).
48+
49+
---
50+
51+
${{ steps.build-release-notes.outputs.releaseNotes }}

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
release:
7+
name: Release
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v5
13+
- name: Volta
14+
uses: volta-cli/action@v4
15+
- name: Install dependencies
16+
run: npm ci
17+
- name: Build
18+
run: npm run build
19+
- name: Release
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
23+
run: npx semantic-release

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist/*
2+
node_modules

.prettierrc.cjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
singleQuote: true,
3+
jsxSingleQuote: true,
4+
trailingComma: 'none',
5+
semi: false,
6+
printWidth: 100
7+
}

.vscode/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"[typescript]": {
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"editor.formatOnSave": true
5+
},
6+
"[javascript]": {
7+
"editor.defaultFormatter": "esbenp.prettier-vscode",
8+
"editor.formatOnSave": true
9+
},
10+
}

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2022 - CodinGame
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

commitlint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
extends: ['@codingame/commitlint-config-codingame']
3+
}

eslint.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import eslint from '@eslint/js'
2+
import tseslint from 'typescript-eslint'
3+
import globals from 'globals'
4+
5+
export default tseslint.config(eslint.configs.recommended, tseslint.configs.recommended, {
6+
languageOptions: {
7+
globals: {
8+
...globals.browser
9+
}
10+
}
11+
})

0 commit comments

Comments
 (0)