Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: setting up linter, prettier and PR gated pipeline #1

Merged
merged 10 commits into from
Jul 5, 2024
Merged
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
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# editorconfig.org
root = true

[*]
charset = utf-8
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 120
quote_type = double
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
32 changes: 32 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:unicorn/recommended"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"prettier",
"unicorn"
],
"rules": {
"unicorn/filename-case": [
"error",
{
"cases": {
"camelCase": true,
"pascalCase": true
}
}
],
"unicorn/prevent-abbreviations": "warn",
"unicorn/no-null": "off",
"@typescript-eslint/no-unused-vars": "off"
},
"overrides": [

]
}
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

7 changes: 0 additions & 7 deletions .github/ISSUE_TEMPLATE/custom.md

This file was deleted.

19 changes: 0 additions & 19 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/pr-gated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: PR-gated

on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened, ready_for_review]

workflow_dispatch:

jobs:
build:
if: github.event.pull_request.draft == false
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version:
- 20.x
- 22.x
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
- name: yarn install
run: yarn --frozen-lockfile
- name: lint
run: yarn lint
- name: build
run: yarn build
- name: yarn install:ui
run: yarn --frozen-lockfine
working-directory: ./ui
- name: build:ui
run: yarn build
working-directory: ./ui
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ yarn-error.log
/out/
/dist/

# IDE/Editor specific
.vscode/
.idea/
*.iml

# Environment variables
.env
.env.local
Expand Down
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"endOfLine": "auto",
"trailingComma": "all",
"arrowParens": "avoid"
}
14 changes: 14 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"streetsidesoftware.code-spell-checker",
"github.codespaces",
"github.copilot",
"github.copilot-chat",
"github.vscode-pull-request-github",
"eamodio.gitlens",
"vincaslt.highlight-matching-tag",
"orta.vscode-jest",
"esbenp.prettier-vscode"
]
}
Loading
Loading