Skip to content

Commit

Permalink
test: Add integration tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
gcoguiec committed May 11, 2024
1 parent 564ccb0 commit ee407e5
Show file tree
Hide file tree
Showing 23 changed files with 1,124 additions and 69 deletions.
22 changes: 0 additions & 22 deletions .eslintrc.json

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,27 @@ jobs:
run: pnpm lint
- name: Spellcheck code-base.
run: pnpm spellcheck
test:
name: Run tests.
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [22]
os: [ubuntu-latest]
fail-fast: false
steps:
- name: Checkout source.
uses: actions/checkout@v4
- name: Setup pnpm.
uses: pnpm/action-setup@v3
- name: Setup node (${{ matrix.node-version }}).
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install dependencies.
run: pnpm install --frozen-lockfile
- name: Build distribution
run: pnpm build
- name: Run Testsuite.
run: pnpm test
9 changes: 6 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { typescript } from './dist/index.js';
import { typescript, vitest } from './dist/index.js';

export default [
{
ignores: ['out/*', 'dist/*']
ignores: ['out/*', 'dist/*', 'vitest.config.ts', 'tests/**/sample*{js,ts}']
},
...(await typescript())
...(await typescript()),
...(await vitest({
typescript: true
}))
];
22 changes: 10 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@gcoguiec/eslint-config-base",
"name": "@gcoguiec/eslint-config",
"version": "1.1.0",
"type": "module",
"description": "A reusable ESLint configuration",
Expand All @@ -26,15 +26,19 @@
"dist"
],
"scripts": {
"build": "tsc -b && node scripts/build.js",
"build": "tsc -b tsconfig.dist.json && node scripts/build.js",
"fmt": "prettier --write \"./**/*.{ts,js,json,md}\"",
"fmt:check": "prettier --list-different \"./**/*.{ts,js,json,md}\"",
"lint": "eslint .",
"lint:fix": "pnpm lint --fix",
"lint:conflicts": "ESLINT_USE_FLAT_CONFIG=true npx eslint-config-prettier",
"pub": "pnpm publish -r --access public",
"spellcheck": "cspell --config=.cspell.json \"**/*.{md,ts,js,mjs}\"",
"typecheck": "tsc --noEmit"
"typecheck": "tsc -p tsconfig.dist.json --noEmit",
"test": "vitest run"
},
"dependencies": {
"globals": "^15.2.0"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^7.8.0",
Expand Down Expand Up @@ -80,12 +84,12 @@
"eslint-plugin-perfectionist": "^2.10.0",
"eslint-plugin-vitest": "^0.5.4",
"eslint-plugin-vue": "^9.26.0",
"globals": "^15.2.0",
"npm-dts": "^1.3.12",
"prettier": "^3.2.5",
"tslib": "^2.6.2",
"typescript": "^5.4.5",
"vue-eslint-parser": "^9.4.2"
"vue-eslint-parser": "^9.4.2",
"vitest": "^1.6.0"
},
"devEngines": {
"node": ">=22"
Expand All @@ -94,11 +98,5 @@
"node": "22.1.0",
"pnpm": "9.1.0"
},
"packageManager": "pnpm@9.1.0",
"pnpm": {
"overrides": {
"semver@>=6.0.0 <6.3.1": ">=6.3.1",
"@babel/traverse@<7.23.2": ">=7.23.2"
}
}
"packageManager": "pnpm@9.1.0"
}
Loading

0 comments on commit ee407e5

Please sign in to comment.