Skip to content
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
42 changes: 42 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test

on:
pull_request:
branches:
- main
workflow_call:

permissions:
contents: read

jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
node-version:
- '22.12.x'
os:
- macos-latest
# TODO(dsanders11: Enable these once we fix tests on those platforms in CI
# - ubuntu-latest
# - windows-latest
runs-on: "${{ matrix.os }}"
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "${{ matrix.node-version }}"
cache: 'npm'
- name: Install dependencies
run: npm ci
# TODO(dsanders11): Enable this once we get a clean lint state on `main`
# - name: Lint
# run: npm run lint
- name: Build
run: npm run build
- name: Test
run: npm run test
10 changes: 10 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import globals from 'globals';
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import pluginChaiFriendly from 'eslint-plugin-chai-friendly';

export default tseslint.config(
eslint.configs.recommended,
Expand All @@ -14,10 +15,13 @@ export default tseslint.config(
{
files: ['**/*.{js,jsx,ts,tsx}'],
plugins: {
'chai-friendly': pluginChaiFriendly,
unicorn: eslintPluginUnicorn,
react: react,
},
rules: {
'@typescript-eslint/no-unused-expressions': 'off',
'chai-friendly/no-unused-expressions': 'error',
'unicorn/prefer-node-protocol': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
Expand All @@ -37,6 +41,12 @@ export default tseslint.config(
},
},
},
{
files: ['spec-electron-setup/**/*.{js,cjs,ts}'],
rules: {
'@typescript-eslint/no-require-imports': 'off',
},
},
{
settings: {
react: {
Expand Down
Loading
Loading