Skip to content

Commit

Permalink
Tests: Update eslint-remote-tester to v4 (#2376)
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio authored Jun 12, 2024
1 parent 2616ce3 commit 1490bb6
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 45 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: |
npm install
npm link
npm link eslint-plugin-unicorn
- uses: AriPerkkio/eslint-remote-tester-run-action@v4
- run: npm install
- uses: AriPerkkio/eslint-remote-tester-run-action@v5
with:
issue-title: "Results of weekly scheduled smoke test"
eslint-remote-tester-config: test/smoke/eslint-remote-tester.config.js
eslint-remote-tester-config: test/smoke/eslint-remote-tester.config.mjs
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"lint:markdown": "markdownlint \"**/*.md\"",
"lint:package-json": "npmPkgJsonLint .",
"run-rules-on-codebase": "node ./test/run-rules-on-codebase/lint.mjs",
"smoke": "eslint-remote-tester --config ./test/smoke/eslint-remote-tester.config.js",
"smoke": "eslint-remote-tester --config ./test/smoke/eslint-remote-tester.config.mjs",
"test": "npm-run-all --continue-on-error lint test:*",
"test:js": "c8 ava"
},
Expand Down Expand Up @@ -81,8 +81,8 @@
"eslint-doc-generator": "1.7.0",
"eslint-plugin-eslint-plugin": "^6.1.0",
"eslint-plugin-internal-rules": "file:./scripts/internal-rules/",
"eslint-remote-tester": "^3.0.1",
"eslint-remote-tester-repositories": "^1.0.1",
"eslint-remote-tester": "^4.0.0",
"eslint-remote-tester-repositories": "^2.0.0",
"espree": "^10.0.1",
"execa": "^8.0.1",
"listr": "^0.14.3",
Expand Down
36 changes: 0 additions & 36 deletions test/smoke/eslint-remote-tester.config.js

This file was deleted.

63 changes: 63 additions & 0 deletions test/smoke/eslint-remote-tester.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import {
getRepositories,
getPathIgnorePattern,
} from 'eslint-remote-tester-repositories';
import typescriptParser from '@typescript-eslint/parser';
import vueParser from 'vue-eslint-parser';
import eslintPluginUnicorn from '../../index.js';

/** @type {import('eslint-remote-tester').Config} */
const config = {
/** Repositories to scan */
repositories: getRepositories({randomize: true}),

/** Optional pattern used to exclude paths */
pathIgnorePattern: getPathIgnorePattern(),

/** Extensions of files under scanning */
extensions: ['js', 'cjs', 'mjs', 'ts', 'cts', 'mts', 'jsx', 'tsx', 'vue'],

/** Maximum amount of tasks ran concurrently */
concurrentTasks: 3,

/** Optional boolean flag used to enable caching of cloned repositories. For CIs it's ideal to disable caching. Defaults to true. */
cache: false,

/** Optional setting for log level. Valid values are verbose, info, warn, error. Defaults to verbose. */
logLevel: 'info',

/** ESLint configuration */
eslintConfig: [
eslintPluginUnicorn.configs['flat/all'],
{
rules: {
// This rule crashing on replace string inside `jsx` or `Unicode escape sequence`
'unicorn/string-content': 'off',
},
},
{
files: ['**/*.ts', '**/*.mts', '**/*.cts', '**/*.tsx'],
languageOptions: {
parser: typescriptParser,
parserOptions: {
project: [],
},
},
},
{
files: ['**/*.vue'],
languageOptions: {
parser: vueParser,
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaFeatures: {
jsx: true,
},
project: [],
},
},
},
],
};

export default config;

0 comments on commit 1490bb6

Please sign in to comment.