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/updates #47

Merged
merged 10 commits into from
Feb 27, 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
6 changes: 4 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
speccer.js
scripts/server.js
dts
node_modules
coverage
dist
152 changes: 125 additions & 27 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{
"overrides": [
{
"files": ["**/__tests__/**"],
"env": {
"browser": true
}
}
],
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
Expand All @@ -9,33 +18,105 @@
},
"env": {
"browser": true,
"amd": true,
"es2021": true,
"node": true,
"jest/globals": true
"es2021": true
},
"plugins": ["@typescript-eslint"],
"settings": {
"import/resolver": {
"typescript": {}
}
},
"plugins": ["jest", "@typescript-eslint"],
"rules": {
"comma-dangle": 1,
"import/order": [
"error",
{
"groups": [
"external",
"builtin",
"internal",
"parent",
"sibling",
"index"
],
"pathGroupsExcludedImportTypes": ["internal"],
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"newlines-between": "always"
}
],
"no-unused-vars": "off",
"quotes": [1, "single"],
"import/no-named-as-default": 0,
"padded-blocks": ["error", "never"],
"one-var": ["error", "never"],
"comma-dangle": "off",
"@typescript-eslint/comma-dangle": "error",
"no-undef": 2,
"prefer-const": "error",
"one-var": ["error", "never"],
"padded-blocks": ["error", "never"],
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "*", "next": "return" },
{ "blankLine": "always", "prev": "*", "next": "export" },
{ "blankLine": "always", "prev": "export", "next": "export" },
{ "blankLine": "always", "prev": "export", "next": "*" },
{ "blankLine": "always", "prev": "*", "next": "if" },
{ "blankLine": "always", "prev": "if", "next": "*" },
{ "blankLine": "always", "prev": "const", "next": "*" },
{ "blankLine": "always", "prev": "*", "next": "const" },
{ "blankLine": "always", "prev": "let", "next": "*" },
{ "blankLine": "always", "prev": "*", "next": "let" },
{ "blankLine": "always", "prev": "var", "next": "*" },
{ "blankLine": "always", "prev": "*", "next": "var" },
{
"blankLine": "always",
"prev": "*",
"next": "return"
},
{
"blankLine": "always",
"prev": "*",
"next": "export"
},
{
"blankLine": "always",
"prev": "export",
"next": "export"
},
{
"blankLine": "always",
"prev": "export",
"next": "*"
},
{
"blankLine": "always",
"prev": "*",
"next": "if"
},
{
"blankLine": "always",
"prev": "if",
"next": "*"
},
{
"blankLine": "always",
"prev": "const",
"next": "*"
},
{
"blankLine": "always",
"prev": "*",
"next": "const"
},
{
"blankLine": "always",
"prev": "let",
"next": "*"
},
{
"blankLine": "always",
"prev": "*",
"next": "let"
},
{
"blankLine": "always",
"prev": "var",
"next": "*"
},
{
"blankLine": "always",
"prev": "*",
"next": "var"
},
{
"blankLine": "always",
"prev": "const",
Expand Down Expand Up @@ -73,22 +154,39 @@
}
],
"global-strict": 0,
"indent": [1, 2, { "SwitchCase": 1 }],
"indent": [
1,
2,
{
"SwitchCase": 1
}
],
"no-extra-semi": 1,
"no-underscore-dangle": 0,
"no-console": 1,
"no-unused-vars": 1,
"no-trailing-spaces": [1, { "skipBlankLines": true }],
"no-trailing-spaces": [
1,
{
"skipBlankLines": true
}
],
"no-unreachable": 1,
"no-alert": 0,
"semi": 1
"semi": 1,
"import/no-unused-modules": [
1,
{
"unusedExports": true
}
]
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"prettier",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:compat/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
"plugin:@typescript-eslint/recommended",
"prettier"
]
}
83 changes: 64 additions & 19 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,73 @@
'section: workflows':
- .github/workflows/**
- any:
- changed-files:
- any-glob-to-any-file:
- .github/workflows/**
'section: repo':
- '*'
- any:
- changed-files:
- any-glob-to-any-file:
- '*'
'experience: developer':
- 'dev'
- '.eslintignore'
- '.eslintrc.json'
- '.gitignore'
- '.npmrc'
- '.prettierrc'
- 'tslint.json'
- '.stylintrc'
- '.postcssrc.cjs'
- '.postcssrc.js'
- any:
- changed-files:
- any-glob-to-any-file:
- '.editorconfig'
- '.eslintignore'
- '.eslintrc.json'
- '.eslintrc.js'
- '.gitignore'
- '.release-it.json'
- '.renovate.json'
- '.npmrc'
- '.prettierrc'
- 'tslint.json'
'context: github':
- .github/**
- any:
- changed-files:
- any-glob-to-any-file:
- .github/**
'context: docker':
- Dockerfile
- any:
- changed-files:
- any-glob-to-any-file:
- Dockerfile
'context: npm':
- '.npmrc'
- any:
- changed-files:
- any-glob-to-any-file:
- '.npmrc'
'context: rollup':
- 'rollup.config.js'
- 'rollup.*.config.js'
- any:
- changed-files:
- any-glob-to-any-file:
- 'rollup.config.js'
- 'rollup.config.mjs'
- 'rollup.*.config.js'
- 'rollup.*.config.mjs'
'mindless: docs':
- '**/*.md'
- any:
- head-branch: ['^docs', 'docs']
- changed-files:
- any-glob-to-any-file:
- '**/*.md'
'mindless: dependencies':
- 'package-lock.json'
- any:
- changed-files:
- any-glob-to-any-file:
- 'package-lock.json'
- 'yarn.lock'

# Add '✨ feature' label to any PR where the head branch name starts with `feat` or has a `feat` section in the name
'✨ feature':
- head-branch: ['^feat', 'feat']
'problems: bug':
- head-branch: ['^fix', 'fix']
'mindless: chore':
- head-branch: ['^chore', 'chore']
'improvements: enhancement':
- head-branch: ['^improvements', 'improvements']

# Add 'release' label to any PR that is opened against the `main` branch
release:
- base-branch: 'main'
31 changes: 17 additions & 14 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,24 @@ on:
push:
branches: [ "main" ]
paths:
- 'src'
- '.github/**'
- 'src/**'
- 'package.json'
- 'package-lock.json'
- 'rollup.config.js'
- 'tsconfig.json'
- '.npmrc'
- 'README.md'
- 'api'
- '.github'
pull_request:
branches: [ "main" ]
types: [opened, synchronize] # Workflow triggering events
paths:
- 'src'
- '.github/**'
- 'src/**'
- 'package.json'
- 'package-lock.json'
- 'rollup.config.js'
- 'tsconfig.json'
- '.npmrc'
- 'README.md'
- 'api'
- '.github'
- '.npmrc'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -45,25 +41,32 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # Checkout all branches and tags
- name: Setup Node.js environment
uses: actions/setup-node@v2.5.2
uses: actions/setup-node@v4
with:
node-version: 18
node-version: '>=20.11.1'
- name: Install dependencies
run: | # Install and link dependencies
npm i
- name: Build # Build all packages
run: npm run build
- name: Test
run: npm run test-ci
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: phun-ky/frameport
notify:
name: Notify failed check
needs: check
if: failure() && github.event.pull_request == null
if: failure()
runs-on: ubuntu-latest
steps:
- uses: jayqi/failed-build-issue-action@v1
- uses: jayqi/failed-build-issue-action@v1.2
with:
github-token: ${{ secrets.GH_TOKEN }}

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ on:
- pull_request_target

jobs:
triage:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
- id: label-the-PR
uses: actions/labeler@v5
with:
sync-labels: true
dot: true
Loading
Loading