Skip to content

Commit

Permalink
⬆️ Update dependency eslint to v9 (#4869)
Browse files Browse the repository at this point in the history
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [eslint](https://eslint.org)
([source](https://togithub.com/eslint/eslint)) | [`^8.57.0` ->
`^9.1.1`](https://renovatebot.com/diffs/npm/eslint/8.57.0/9.1.1) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/eslint/9.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/eslint/9.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/eslint/8.57.0/9.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/eslint/8.57.0/9.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>eslint/eslint (eslint)</summary>

###
[`v9.1.1`](https://togithub.com/eslint/eslint/compare/v9.1.0...b4d2512809a1b28466ad1ce5af9d01c181b9bf9e)

[Compare
Source](https://togithub.com/eslint/eslint/compare/v9.1.0...v9.1.1)

###
[`v9.1.0`](https://togithub.com/eslint/eslint/compare/v9.0.0...b78d831e244171c939279b03be519b5c13836fce)

[Compare
Source](https://togithub.com/eslint/eslint/compare/v9.0.0...v9.1.0)

###
[`v9.0.0`](https://togithub.com/eslint/eslint/compare/v8.57.0...e0cbc50179adac1670f4e0bd9093387a51f4f42a)

[Compare
Source](https://togithub.com/eslint/eslint/compare/v8.57.0...v9.0.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/dubzzz/fast-check).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Nicolas DUBIEN <github@dubien.org>
  • Loading branch information
renovate[bot] and dubzzz authored Apr 25, 2024
1 parent f63f8e4 commit b618e44
Show file tree
Hide file tree
Showing 38 changed files with 361 additions and 414 deletions.
10 changes: 0 additions & 10 deletions .eslintignore

This file was deleted.

35 changes: 0 additions & 35 deletions .eslintrc.cjs

This file was deleted.

86 changes: 86 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
// @ts-check
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintConfigPrettier from 'eslint-config-prettier';
import globals from 'globals';

/** @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigFile} */
export default [
js.configs.recommended,
...tseslint.configs.recommended,
eslintConfigPrettier,
{
languageOptions: {
parserOptions: {
tsconfigRootDir: import.meta.dirname,
project: './tsconfig.common.json',
},
},
},
{
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-empty-function': 'warn',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-this-alias': 'warn',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-use-before-define': 'warn',
'@typescript-eslint/consistent-type-exports': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-import-type-side-effects': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/ban-types': 'error',
'require-atomic-updates': 'error',
},
},
{
files: ['**/*.cjs', '**/cjs/**/*.js', 'packages/ava/test/testProp.js'],
languageOptions: {
globals: {
...globals.node,
...globals.commonjs,
},
},
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
{
files: ['**/*.mjs', '**/mjs/**/*.js'],
languageOptions: {
globals: {
...globals.node,
},
},
},
{
files: ['**/*.spec.ts', '**/test/unit/**/*.ts', '**/test/e2e/**/*.ts'],
rules: {
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
{
ignores: [
'.github/',
'.yarn/',
'node_modules/',
'examples/',
'packages/*/coverage/',
'packages/*/dist/',
'packages/*/lib/',
'packages/*/lib-*/',
'packages/*/runkit.cjs',
'packages/test-minimal-support/',
'packages/test-types/',
'website/',
'.pnp*',
'jest*.js',
'jest*.cjs',
],
},
];
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@
"unpack:all": "yarn workspaces foreach --all -pvi --no-private exec tar -xvf package.tgz --strip-components=1 --exclude='package/package.json'"
},
"devDependencies": {
"@eslint/js": "^9.1.1",
"@fast-check/packaged": "*",
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.1",
"@typescript-eslint/utils": "^7.7.1",
"all-contributors-cli": "^6.26.1",
"eslint": "^8.57.0",
"eslint": "^9.1.1",
"eslint-config-prettier": "^9.1.0",
"globals": "^15.0.0",
"prettier": "3.2.5",
"publint": "^0.2.7",
"typescript": "~5.4.5"
"typescript": "~5.4.5",
"typescript-eslint": "^7.7.1"
}
}
3 changes: 0 additions & 3 deletions packages/ava/test/testProp.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
// eslint-disable-next-line no-undef, @typescript-eslint/no-var-requires
const { testProp, fc } = require('../lib/ava-fast-check');
// eslint-disable-next-line no-undef, @typescript-eslint/no-var-requires
const { Observable, map } = require('rxjs');

const delay = (duration) =>
new Promise((resolve) => {
// eslint-disable-next-line no-undef
setTimeout(() => resolve(), duration);
});

Expand Down
1 change: 0 additions & 1 deletion packages/expect-type/src/cjs/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
/* eslint-disable @typescript-eslint/no-empty-function */
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
Expand Down
15 changes: 0 additions & 15 deletions packages/fast-check/postbuild/main.cjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
// eslint-disable-next-line
const { execSync } = require('child_process');
// eslint-disable-next-line
const fs = require('fs');
// eslint-disable-next-line
const path = require('path');
// eslint-disable-next-line
const process = require('process');
// eslint-disable-next-line
const replace = require('replace-in-file');

// Append *.js file extension on all local imports
Expand All @@ -20,7 +15,6 @@ const options = {
const results = replace.sync(options);
for (const { file, hasChanged } of results) {
if (hasChanged) {
// eslint-disable-next-line
console.info(`Extensions added to: ${file}`);
}
}
Expand All @@ -30,10 +24,8 @@ for (const { file, hasChanged } of results) {
// eslint-disable-next-line
const commitHash = getCommitHash();

// eslint-disable-next-line
fs.readFile(path.join(__dirname, '../package.json'), (err, data) => {
if (err) {
// eslint-disable-next-line
console.error(err.message);
process.exit(2);
}
Expand All @@ -46,7 +38,6 @@ fs.readFile(path.join(__dirname, '../package.json'), (err, data) => {
to: ['commonjs', packageVersion, commitHash],
});
if (commonJsReplacement.length === 1 && commonJsReplacement[0].hasChanged) {
// eslint-disable-next-line
console.info(`Package details added onto commonjs version`);
}

Expand All @@ -56,7 +47,6 @@ fs.readFile(path.join(__dirname, '../package.json'), (err, data) => {
to: ['module', packageVersion, commitHash],
});
if (moduleReplacement.length === 1 && moduleReplacement[0].hasChanged) {
// eslint-disable-next-line
console.info(`Package details added onto module version`);
}

Expand All @@ -66,7 +56,6 @@ fs.readFile(path.join(__dirname, '../package.json'), (err, data) => {
to: [packageVersion, commitHash],
});
if (dTsReplacement.length === 1 && dTsReplacement[0].hasChanged) {
// eslint-disable-next-line
console.info(`Package details added onto d.ts version for cjs`);
}

Expand All @@ -76,7 +65,6 @@ fs.readFile(path.join(__dirname, '../package.json'), (err, data) => {
to: [packageVersion, commitHash],
});
if (dTsReplacement2.length === 1 && dTsReplacement[0].hasChanged) {
// eslint-disable-next-line
console.info(`Package details added onto d.ts version for esm`);
}

Expand All @@ -94,7 +82,6 @@ fs.readFile(path.join(__dirname, '../package.json'), (err, data) => {
to: [escapeHtml('module'), escapeHtml(packageVersion), escapeHtml(commitHash)],
});
if (docReplacement.length === 1 && docReplacement[0].hasChanged) {
// eslint-disable-next-line
console.info(`Package details added onto doc`);
}
});
Expand All @@ -103,13 +90,11 @@ fs.readFile(path.join(__dirname, '../package.json'), (err, data) => {
function getCommitHash() {
const gitHubCommitHash = process.env.GITHUB_SHA && process.env.GITHUB_SHA.split('\n')[0];
if (gitHubCommitHash) {
// eslint-disable-next-line
console.info(`Using env variable GITHUB_SHA for the commit hash, got: ${gitHubCommitHash}`);
return gitHubCommitHash;
}
if (process.env.EXPECT_GITHUB_SHA) {
if (!gitHubCommitHash) {
// eslint-disable-next-line
console.error('No GITHUB_SHA specified');
process.exit(1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ import { Stream } from '../../stream/Stream';
import { oneof } from '../oneof';
import { restrictedIntegerArbitraryBuilder } from './builders/RestrictedIntegerArbitraryBuilder';

// eslint-disable-next-line @typescript-eslint/ban-types
type CommandsArbitraryContext<Model extends object, Real, RunResult, CheckAsync extends boolean> = {
shrunkOnce: boolean;
items: Value<CommandWrapper<Model, Real, RunResult, CheckAsync>>[];
};

/** @internal */
// eslint-disable-next-line @typescript-eslint/ban-types
export class CommandsArbitrary<Model extends object, Real, RunResult, CheckAsync extends boolean> extends Arbitrary<
CommandsIterable<Model, Real, RunResult, CheckAsync>
> {
Expand Down
1 change: 0 additions & 1 deletion packages/fast-check/src/arbitrary/letrec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ export function letrec<T>(builder: T extends Record<string, unknown> ? LetrecTyp
* @public
*/
export function letrec<T>(builder: LetrecLooselyTypedBuilder<T>): LetrecValue<T>;
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export function letrec<T>(builder: LetrecLooselyTypedBuilder<T> | LetrecTypedBuilder<T>): LetrecValue<T> {
const lazyArbs: { [K in keyof T]?: LazyArbitrary<unknown> } = safeObjectCreate(null);
const tie = (key: keyof T): Arbitrary<any> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ class FilterArbitrary<T, U extends T> extends Arbitrary<U> {
this.bindRefinementOnValue = (v: Value<T>): v is Value<U> => this.refinementOnValue(v);
}
generate(mrng: Random, biasFactor: number | undefined): Value<U> {
// eslint-disable-next-line no-constant-condition
while (true) {
const g = this.arb.generate(mrng, biasFactor);
if (this.refinementOnValue(g)) {
Expand Down
6 changes: 0 additions & 6 deletions packages/fast-check/src/check/model/ModelRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ interface SetupProducer<Model, Real, P> {
}

/** @internal */
// eslint-disable-next-line @typescript-eslint/ban-types
const genericModelRun = <Model extends object, Real, P, CheckAsync extends boolean>(
s: SetupProducer<Model, Real, P>,
cmds: Iterable<ICommand<Model, Real, P, CheckAsync>>,
Expand All @@ -49,7 +48,6 @@ const genericModelRun = <Model extends object, Real, P, CheckAsync extends boole
};

/** @internal */
// eslint-disable-next-line @typescript-eslint/ban-types
const internalModelRun = <Model extends object, Real>(
s: ModelRunSetup<Model, Real>,
cmds: Iterable<Command<Model, Real>>,
Expand Down Expand Up @@ -82,7 +80,6 @@ const isAsyncSetup = <Model, Real>(
};

/** @internal */
// eslint-disable-next-line @typescript-eslint/ban-types
const internalAsyncModelRun = async <Model extends object, Real, CheckAsync extends boolean>(
s: ModelRunSetup<Model, Real> | ModelRunAsyncSetup<Model, Real>,
cmds: Iterable<AsyncCommand<Model, Real, CheckAsync>>,
Expand Down Expand Up @@ -113,7 +110,6 @@ const internalAsyncModelRun = async <Model extends object, Real, CheckAsync exte
* @remarks Since 1.5.0
* @public
*/
// eslint-disable-next-line @typescript-eslint/ban-types
export function modelRun<Model extends object, Real, InitialModel extends Model>(
s: ModelRunSetup<InitialModel, Real>,
cmds: Iterable<Command<Model, Real>>,
Expand All @@ -132,7 +128,6 @@ export function modelRun<Model extends object, Real, InitialModel extends Model>
* @remarks Since 1.5.0
* @public
*/
// eslint-disable-next-line @typescript-eslint/ban-types
export async function asyncModelRun<Model extends object, Real, CheckAsync extends boolean, InitialModel extends Model>(
s: ModelRunSetup<InitialModel, Real> | ModelRunAsyncSetup<InitialModel, Real>,
cmds: Iterable<AsyncCommand<Model, Real, CheckAsync>>,
Expand All @@ -153,7 +148,6 @@ export async function asyncModelRun<Model extends object, Real, CheckAsync exten
* @public
*/
export async function scheduledModelRun<
// eslint-disable-next-line @typescript-eslint/ban-types
Model extends object,
Real,
CheckAsync extends boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ import type { ICommand } from './ICommand';
* @remarks Since 1.5.0
* @public
*/
// eslint-disable-next-line @typescript-eslint/ban-types
export interface AsyncCommand<Model extends object, Real, CheckAsync extends boolean = false>
extends ICommand<Model, Real, Promise<void>, CheckAsync> {}
1 change: 0 additions & 1 deletion packages/fast-check/src/check/model/command/Command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ import type { ICommand } from './ICommand';
* @remarks Since 1.5.0
* @public
*/
// eslint-disable-next-line @typescript-eslint/ban-types
export interface Command<Model extends object, Real> extends ICommand<Model, Real, void> {}
1 change: 0 additions & 1 deletion packages/fast-check/src/check/model/command/ICommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* @remarks Since 1.5.0
* @public
*/
// eslint-disable-next-line @typescript-eslint/ban-types
export interface ICommand<Model extends object, Real, RunResult, CheckAsync extends boolean = false> {
/**
* Check if the model is in the right state to apply the command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import type { ICommand } from '../command/ICommand';
* Wrapper around commands used internally by fast-check to wrap existing commands
* in order to add them a flag to know whether or not they already have been executed
*/
// eslint-disable-next-line @typescript-eslint/ban-types
export class CommandWrapper<Model extends object, Real, RunResult, CheckAsync extends boolean>
implements ICommand<Model, Real, RunResult, CheckAsync>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type { CommandWrapper } from './CommandWrapper';
/**
* Iterable datastructure accepted as input for asyncModelRun and modelRun
*/
// eslint-disable-next-line @typescript-eslint/ban-types
export class CommandsIterable<Model extends object, Real, RunResult, CheckAsync extends boolean = false>
implements Iterable<CommandWrapper<Model, Real, RunResult, CheckAsync>>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import type { AsyncCommand } from '../command/AsyncCommand';
import type { Scheduler } from '../../../arbitrary/scheduler';

/** @internal */
// eslint-disable-next-line @typescript-eslint/ban-types
export class ScheduledCommand<Model extends object, Real, RunResult, CheckAsync extends boolean>
implements AsyncCommand<Model, Real, true>
{
Expand Down Expand Up @@ -58,7 +57,6 @@ export class ScheduledCommand<Model extends object, Real, RunResult, CheckAsync
}

/** @internal */
// eslint-disable-next-line @typescript-eslint/ban-types
export const scheduleCommands = function* <Model extends object, Real, CheckAsync extends boolean>(
s: Scheduler,
cmds: Iterable<AsyncCommand<Model, Real, CheckAsync>>,
Expand Down
Loading

0 comments on commit b618e44

Please sign in to comment.