Skip to content

Commit 1490bb6

Browse files
authored
Tests: Update eslint-remote-tester to v4 (sindresorhus#2376)
1 parent 2616ce3 commit 1490bb6

File tree

4 files changed

+69
-45
lines changed

4 files changed

+69
-45
lines changed

.github/workflows/smoke-test.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313
- uses: actions/setup-node@v4
14-
- run: |
15-
npm install
16-
npm link
17-
npm link eslint-plugin-unicorn
18-
- uses: AriPerkkio/eslint-remote-tester-run-action@v4
14+
- run: npm install
15+
- uses: AriPerkkio/eslint-remote-tester-run-action@v5
1916
with:
2017
issue-title: "Results of weekly scheduled smoke test"
21-
eslint-remote-tester-config: test/smoke/eslint-remote-tester.config.js
18+
eslint-remote-tester-config: test/smoke/eslint-remote-tester.config.mjs

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"lint:markdown": "markdownlint \"**/*.md\"",
3030
"lint:package-json": "npmPkgJsonLint .",
3131
"run-rules-on-codebase": "node ./test/run-rules-on-codebase/lint.mjs",
32-
"smoke": "eslint-remote-tester --config ./test/smoke/eslint-remote-tester.config.js",
32+
"smoke": "eslint-remote-tester --config ./test/smoke/eslint-remote-tester.config.mjs",
3333
"test": "npm-run-all --continue-on-error lint test:*",
3434
"test:js": "c8 ava"
3535
},
@@ -81,8 +81,8 @@
8181
"eslint-doc-generator": "1.7.0",
8282
"eslint-plugin-eslint-plugin": "^6.1.0",
8383
"eslint-plugin-internal-rules": "file:./scripts/internal-rules/",
84-
"eslint-remote-tester": "^3.0.1",
85-
"eslint-remote-tester-repositories": "^1.0.1",
84+
"eslint-remote-tester": "^4.0.0",
85+
"eslint-remote-tester-repositories": "^2.0.0",
8686
"espree": "^10.0.1",
8787
"execa": "^8.0.1",
8888
"listr": "^0.14.3",

test/smoke/eslint-remote-tester.config.js

-36
This file was deleted.
+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import {
2+
getRepositories,
3+
getPathIgnorePattern,
4+
} from 'eslint-remote-tester-repositories';
5+
import typescriptParser from '@typescript-eslint/parser';
6+
import vueParser from 'vue-eslint-parser';
7+
import eslintPluginUnicorn from '../../index.js';
8+
9+
/** @type {import('eslint-remote-tester').Config} */
10+
const config = {
11+
/** Repositories to scan */
12+
repositories: getRepositories({randomize: true}),
13+
14+
/** Optional pattern used to exclude paths */
15+
pathIgnorePattern: getPathIgnorePattern(),
16+
17+
/** Extensions of files under scanning */
18+
extensions: ['js', 'cjs', 'mjs', 'ts', 'cts', 'mts', 'jsx', 'tsx', 'vue'],
19+
20+
/** Maximum amount of tasks ran concurrently */
21+
concurrentTasks: 3,
22+
23+
/** Optional boolean flag used to enable caching of cloned repositories. For CIs it's ideal to disable caching. Defaults to true. */
24+
cache: false,
25+
26+
/** Optional setting for log level. Valid values are verbose, info, warn, error. Defaults to verbose. */
27+
logLevel: 'info',
28+
29+
/** ESLint configuration */
30+
eslintConfig: [
31+
eslintPluginUnicorn.configs['flat/all'],
32+
{
33+
rules: {
34+
// This rule crashing on replace string inside `jsx` or `Unicode escape sequence`
35+
'unicorn/string-content': 'off',
36+
},
37+
},
38+
{
39+
files: ['**/*.ts', '**/*.mts', '**/*.cts', '**/*.tsx'],
40+
languageOptions: {
41+
parser: typescriptParser,
42+
parserOptions: {
43+
project: [],
44+
},
45+
},
46+
},
47+
{
48+
files: ['**/*.vue'],
49+
languageOptions: {
50+
parser: vueParser,
51+
parserOptions: {
52+
parser: '@typescript-eslint/parser',
53+
ecmaFeatures: {
54+
jsx: true,
55+
},
56+
project: [],
57+
},
58+
},
59+
},
60+
],
61+
};
62+
63+
export default config;

0 commit comments

Comments
 (0)