Skip to content

Commit

Permalink
chore(ci): style lint and validation
Browse files Browse the repository at this point in the history
  • Loading branch information
bourdaisj committed Dec 23, 2024
1 parent 1f05d54 commit 6469544
Show file tree
Hide file tree
Showing 14 changed files with 3,922 additions and 16,780 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: PR Checks
on:
pull_request:
merge_group:

jobs:
pr-checks:
runs-on: ubuntu-20.04
name: Check and lint PR
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # needed so commitlint can lint the commits
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 20
- run: npm ci
- name: Enforce code style
run: npm run validate
- name: Lint commits
if: github.event_name != 'merge_group'
run: npx commitlint --from=${{ github.event.pull_request.base.sha }}
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
build
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default { extends: ['@commitlint/config-conventional'] };
26 changes: 26 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";


/** @type {import('eslint').Linter.Config[]} */
export default [
{
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
},
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
];
Loading

0 comments on commit 6469544

Please sign in to comment.