From 36d3fd90968b318b2517f4959e988bec46fb8b50 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Sat, 1 Jan 2022 12:01:26 +1300 Subject: [PATCH] chore: convert smoke test config to typescript --- .github/workflows/smoke-test.yml | 1 - ...ter.config.js => eslint-remote-tester.config.ts | 12 +++++++----- package.json | 2 +- yarn.lock | 14 +++++++++----- 4 files changed, 17 insertions(+), 12 deletions(-) rename eslint-remote-tester.config.js => eslint-remote-tester.config.ts (78%) diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index 005000cf5..a05184760 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -21,4 +21,3 @@ jobs: - uses: AriPerkkio/eslint-remote-tester-run-action@v3 with: issue-title: 'Results of weekly scheduled smoke test' - eslint-remote-tester-config: eslint-remote-tester.config.js diff --git a/eslint-remote-tester.config.js b/eslint-remote-tester.config.ts similarity index 78% rename from eslint-remote-tester.config.js rename to eslint-remote-tester.config.ts index 57f05c4b5..cfd7be073 100644 --- a/eslint-remote-tester.config.js +++ b/eslint-remote-tester.config.ts @@ -1,12 +1,12 @@ 'use strict'; -const { - getRepositories, +import { Config } from 'eslint-remote-tester'; +import { getPathIgnorePattern, -} = require('eslint-remote-tester-repositories'); + getRepositories, +} from 'eslint-remote-tester-repositories'; -// eslint-disable-next-line import/no-commonjs -module.exports = { +const config: Config = { repositories: getRepositories({ randomize: true }), pathIgnorePattern: getPathIgnorePattern(), extensions: ['js', 'jsx', 'ts', 'tsx'], @@ -29,3 +29,5 @@ module.exports = { extends: ['plugin:jest/all'], }, }; + +export default config; diff --git a/package.json b/package.json index 41776e5b4..1f54ceebb 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "eslint-plugin-import": "^2.25.1", "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.4.1", - "eslint-remote-tester": "^2.0.1", + "eslint-remote-tester": "^2.1.0", "eslint-remote-tester-repositories": "^0.0.3", "husky": "^7.0.2", "is-ci": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index 05f462b53..60a3734f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4529,7 +4529,7 @@ __metadata: eslint-plugin-import: ^2.25.1 eslint-plugin-node: ^11.0.0 eslint-plugin-prettier: ^3.4.1 - eslint-remote-tester: ^2.0.1 + eslint-remote-tester: ^2.1.0 eslint-remote-tester-repositories: ^0.0.3 husky: ^7.0.2 is-ci: ^3.0.0 @@ -4592,9 +4592,9 @@ __metadata: languageName: node linkType: hard -"eslint-remote-tester@npm:^2.0.1": - version: 2.0.1 - resolution: "eslint-remote-tester@npm:2.0.1" +"eslint-remote-tester@npm:^2.1.0": + version: 2.1.1 + resolution: "eslint-remote-tester@npm:2.1.1" dependencies: "@babel/code-frame": ^7.12.13 JSONStream: ^1.3.5 @@ -4605,9 +4605,13 @@ __metadata: simple-git: ^2.20.1 peerDependencies: eslint: ">=7" + ts-node: ">=9.0.0" + peerDependenciesMeta: + ts-node: + optional: true bin: eslint-remote-tester: dist/index.js - checksum: d32da17edf1db01d78fc1ca358d9fb9dbb6be75ff931b71d52eb7cae5cbb3ea1d18e57c55573820f306db28a2b2411b61b73e1eb763b7997926d0e5331dd4660 + checksum: 146037bfbc0e0faf0c53dc1fa5170c5990306667f8a6db2e18cb897746f1e0839901bb517893f46bedc313cca74e05a342d06462ceed5a2922c68f59bdff883e languageName: node linkType: hard