Skip to content

Commit

Permalink
test: update eslint-remote-tester to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Jun 12, 2024
1 parent 2616ce3 commit ddf91ba
Show file tree
Hide file tree
Showing 4 changed files with 67 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.

61 changes: 61 additions & 0 deletions test/smoke/eslint-remote-tester.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import {
getRepositories,
getPathIgnorePattern,
} from "eslint-remote-tester-repositories";

Check failure on line 4 in test/smoke/eslint-remote-tester.config.mjs

View workflow job for this annotation

GitHub Actions / lint-test (ubuntu-latest)

Strings must use singlequote.
import typescriptParser from "@typescript-eslint/parser";

Check failure on line 5 in test/smoke/eslint-remote-tester.config.mjs

View workflow job for this annotation

GitHub Actions / lint-test (ubuntu-latest)

Strings must use singlequote.
import vueParser from "vue-eslint-parser";

Check failure on line 6 in test/smoke/eslint-remote-tester.config.mjs

View workflow job for this annotation

GitHub Actions / lint-test (ubuntu-latest)

Strings must use singlequote.
import eslintPluginUnicorn from "../../index.js";

Check failure on line 7 in test/smoke/eslint-remote-tester.config.mjs

View workflow job for this annotation

GitHub Actions / lint-test (ubuntu-latest)

Strings must use singlequote.

/** @type {import('eslint-remote-tester').Config} */
export default {

Check failure on line 10 in test/smoke/eslint-remote-tester.config.mjs

View workflow job for this annotation

GitHub Actions / lint-test (ubuntu-latest)

Assign object to a variable before exporting as module default
/** Repositories to scan */
repositories: getRepositories({ randomize: true }),

Check failure on line 12 in test/smoke/eslint-remote-tester.config.mjs

View workflow job for this annotation

GitHub Actions / lint-test (ubuntu-latest)

There should be no space after '{'.

Check failure on line 12 in test/smoke/eslint-remote-tester.config.mjs

View workflow job for this annotation

GitHub Actions / lint-test (ubuntu-latest)

There should be no space before '}'.

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

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

Check failure on line 18 in test/smoke/eslint-remote-tester.config.mjs

View workflow job for this annotation

GitHub Actions / lint-test (ubuntu-latest)

Strings must use singlequote.

Check failure on line 18 in test/smoke/eslint-remote-tester.config.mjs

View workflow job for this annotation

GitHub Actions / lint-test (ubuntu-latest)

Strings must use singlequote.

Check failure on line 18 in test/smoke/eslint-remote-tester.config.mjs

View workflow job for this annotation

GitHub Actions / lint-test (ubuntu-latest)

Strings must use singlequote.

/** 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: [],
},
},
},
],
};

0 comments on commit ddf91ba

Please sign in to comment.