Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix smoke tests #474

Merged
merged 3 commits into from
Jun 12, 2024
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
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:

- uses: pnpm/action-setup@v3
with:
version: 8
run_install: false

- name: Get pnpm store directory
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,24 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 7.16.1
run_install: false

- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: pnpm

- name: Install, Build & Link plugin
- name: Install, Build
run: |
pnpm install
pnpm build
pnpm link .
pnpm link eslint-plugin-vitest

- name: Update ESLint to v9
run: pnpm i -D eslint@9

- uses: AriPerkkio/eslint-remote-tester-run-action@v5
with:
Expand Down
22 changes: 18 additions & 4 deletions eslint-remote-tester.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
import vitest from "eslint-plugin-vitest"
import parser from '@typescript-eslint/parser';
import type { Config } from 'eslint-remote-tester';
import {
getPathIgnorePattern,
getRepositories,
} from 'eslint-remote-tester-repositories';
import vitest from './dist/index.mjs';

export default {
repositories: ['AriPerkkio/eslint-remote-tester-integration-test-target'],
repositories: getRepositories(),
pathIgnorePattern: getPathIgnorePattern(),
extensions: ['ts', 'tsx', 'cts', 'mts'],
concurrentTasks: 3,
cache: false,
logLevel: 'info',
eslintConfig: [vitest.configs.all]
}
eslintConfig: [
vitest.configs.all,
{
languageOptions: {
parser,
},
},
] as Config['eslintConfig'],
} satisfies Config;
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"files": [
"dist"
],
"packageManager": "pnpm@9.3.0",
"scripts": {
"build": "unbuild",
"lint:eslint-docs": "pnpm build && eslint-doc-generator --check",
Expand Down Expand Up @@ -56,7 +57,7 @@
"eslint-plugin-eslint-plugin": "^6.1.0",
"eslint-plugin-vitest": "^0.5.4",
"eslint-remote-tester": "^4.0.0",
"eslint-remote-tester-repositories": "^1.0.1",
"eslint-remote-tester-repositories": "^2.0.0",
"importx": "^0.3.5",
"tsx": "^4.10.5",
"typescript": "^5.4.5",
Expand Down
11 changes: 6 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/utils/ast-utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESLint, TSESTree } from "@typescript-eslint/utils";
import { createRequire } from "node:module"

const require = createRequire(import.meta.url)
const eslintRequire = createRequire(require.resolve("eslint"))

export const espreeParser = eslintRequire.resolve('espree');
Expand Down