Skip to content

Commit

Permalink
Merge branch 'main' into share-via-email
Browse files Browse the repository at this point in the history
  • Loading branch information
3keyroman committed Jul 6, 2024
2 parents ffa4c69 + a1a5f56 commit 6784979
Show file tree
Hide file tree
Showing 42 changed files with 5,329 additions and 1,426 deletions.
2 changes: 1 addition & 1 deletion .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ changelog:
- bug
- title: Other 🗄
labels:
- "*"
- "*"
2 changes: 1 addition & 1 deletion .github/workflows/check_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version-file: ".node-version"
- name: Build
env:
NODE_OPTIONS: "--max_old_space_size=4096"
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/check_formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check formatting

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.JS
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: npm

- name: Install dependencies
run: npm ci

- name: Verify formatting
run: npm run format:check
34 changes: 34 additions & 0 deletions .github/workflows/check_linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check linting

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.JS
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: npm

- name: Install dependencies
run: npm ci

- name: Verify linter
run: npm run lint:check
2 changes: 1 addition & 1 deletion .github/workflows/deploy_gh_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version-file: ".node-version"
- name: Build component
env:
NODE_OPTIONS: "--max_old_space_size=4096"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release to GitHub Pages

on:
push:
tags: ['*']
tags: ["*"]

jobs:
release:
Expand All @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version-file: ".node-version"
- name: Build component
env:
NODE_OPTIONS: "--max_old_space_size=4096"
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Run tests

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.JS
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: npm

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm run test
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.x
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ To use the component, include the following script in your HTML file. Replace `<
Then, add the `<self-assessment>` tag to your HTML file.

```html
<self-assessment dataurl="https://pkic.github.io/self-assessment/<version>/assessment-data.yaml"></self-assessment>
<self-assessment
dataurl="https://pkic.github.io/self-assessment/<version>/assessment-data.yaml"
></self-assessment>
```

## Development
Expand Down Expand Up @@ -71,4 +73,4 @@ You can customize the styles of the component by adding the following CSS to you

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
37 changes: 37 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import github from "eslint-plugin-github";
import typescriptParser from "@typescript-eslint/parser";
import path from "path";

export default [
{
ignores: ["dist/"],
},
{
files: ["**/*.ts", "**/*.tsx"],
plugins: {
"@typescript-eslint": typescriptEslint,
github,
},
languageOptions: {
parser: typescriptParser,
ecmaVersion: 2020,
sourceType: "module",
parserOptions: {
project: path.resolve("./tsconfig.json"),
},
globals: {
es2020: true,
},
},
rules: {
...typescriptEslint.configs.recommended.rules,
semi: "error",
"prefer-const": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{ args: "after-used", argsIgnorePattern: "^_" },
],
},
},
];
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
};
Loading

0 comments on commit 6784979

Please sign in to comment.