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
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

18 changes: 0 additions & 18 deletions .eslintrc.cjs

This file was deleted.

22 changes: 12 additions & 10 deletions .github/workflows/cli-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,20 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
node-version: '20.x'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Build CLI
run: npm run build
run: pnpm run build

- name: Clone test project
run: git clone https://github.com/wokwi/esp-idf-hello-world.git test-project
Expand All @@ -40,10 +43,10 @@ jobs:
steps:
- name: "Wait for boot and hello message"
wait-serial: "Hello world!"
- name: "Wait for chip information"

- name: "Wait for chip information"
wait-serial: "This is esp32 chip"

- name: "Wait for restart message"
wait-serial: "Restarting in 10 seconds"
EOF
Expand All @@ -52,12 +55,11 @@ jobs:
uses: wokwi/wokwi-ci-server-action@v1

- name: Test CLI with basic expect-text
run: npm start -- test-project --timeout 5000 --expect-text "Hello"
run: pnpm cli test-project --timeout 5000 --expect-text "Hello"
env:
WOKWI_CLI_TOKEN: ${{ secrets.WOKWI_CLI_TOKEN }}

- name: Test CLI with scenario file
run: npm start -- test-project --scenario test-scenario.yaml --timeout 15000
run: pnpm cli test-project --scenario test-scenario.yaml --timeout 15000
env:
WOKWI_CLI_TOKEN: ${{ secrets.WOKWI_CLI_TOKEN }}

13 changes: 10 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 'Install NPM dependencies'
run: npm ci
- name: 'Install pnpm'
uses: pnpm/action-setup@v4
- name: 'Setup Node.js'
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'pnpm'
- name: 'Install dependencies'
run: pnpm install --frozen-lockfile
- name: 'Install LDID'
run: |
wget -O /usr/local/bin/ldid https://github.com/ProcursusTeam/ldid/releases/download/v2.1.5-procursus7/ldid_linux_x86_64
Expand All @@ -20,7 +27,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y binfmt-support qemu-user-static
- name: 'Build'
run: npm run package
run: pnpm run package
- name: Upload Release
uses: ncipollo/release-action@v1
with:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'pnpm'
- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile
- name: Run tests
run: npm test
run: pnpm test
70 changes: 70 additions & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import { defineConfig } from 'eslint/config';
import eslint from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import tseslint from 'typescript-eslint';

export default defineConfig(
// Apply to all TypeScript and JavaScript files
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.mjs', '**/*.cjs'],
},

// Ignore patterns
{
ignores: [
'**/node_modules/**',
'**/dist/**',
'**/build/**',
'**/.git/**',
'**/coverage/**',
'**/*.min.js',
],
},

// Base ESLint recommended rules
eslint.configs.recommended,

// TypeScript ESLint recommended rules with type checking
...tseslint.configs.recommendedTypeChecked,

// TypeScript specific configuration
{
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: ['*.js', '*.mjs', '*.cjs'],
defaultProject: './tsconfig.json',
},
tsconfigRootDir: import.meta.dirname,
},
},
},

// Rules for JavaScript files (without type checking)
{
files: ['**/*.js', '**/*.mjs', '**/*.cjs'],
...tseslint.configs.disableTypeChecked,
},

// Custom TypeScript rule overrides
{
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/method-signature-style': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/require-await': 'off',
// allow unused variables if they start with _
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-undef': 'off',
},
},

// Prettier config (must be last to override conflicting rules)
eslintConfigPrettier,
);
Loading
Loading