Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update eslint related #260

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

Gudahtt
Copy link
Owner

@Gudahtt Gudahtt commented Jan 6, 2025

This PR contains the following updates:

Package Type Update Change Pending
@typescript-eslint/eslint-plugin (source) devDependencies minor 8.16.0 -> 8.18.2 8.21.0 (+3)
@typescript-eslint/parser (source) devDependencies minor 8.16.0 -> 8.18.2 8.21.0 (+3)
eslint (source) devDependencies minor 9.16.0 -> 9.17.0 9.19.0 (+1)
eslint-import-resolver-typescript devDependencies minor 3.6.3 -> 3.7.0
eslint-plugin-import-x devDependencies minor 4.4.3 -> 4.6.1
eslint-plugin-jsdoc devDependencies patch 50.6.0 -> 50.6.1 50.6.2
eslint-plugin-n devDependencies minor 17.14.0 -> 17.15.1
typescript (source) devDependencies minor ~5.5.0 -> ~5.7.0 5.7.3
typescript-eslint (source) devDependencies minor 8.16.0 -> 8.18.2 8.21.0 (+3)

Release Notes

typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin)

v8.18.2

Compare Source

🩹 Fixes
  • eslint-plugin: [no-unnecessary-condition] handle noUncheckedIndexedAccess true (#​10514)
  • eslint-plugin: [consistent-type-assertions] allow default assertionStyle option (#​10512)
  • eslint-plugin: [no-unnecessary-type-arguments] handle type/value context (#​10503)
  • eslint-plugin: [no-unsafe-type-assertion] fix for unsafe assertion to a constrained type parameter (#​10461)
  • eslint-plugin: [consistent-indexed-object-style] use a suggestion over an auto-fix if can't reliably determine that produced index signature is valid (#​10490)
  • eslint-plugin: [no-unnecessary-condition] don't flag values of an unconstrained or valid type parameter (#​10473)
  • eslint-plugin: [prefer-reduce-type-parameter] don't report cases in which the fix results in a type error (#​10494)
  • eslint-plugin: [no-deprecated] not reporting usages of deprecated declared constants as object value (#​10498)
❤️ Thank You

You can read about our versioning strategy and releases on our website.

v8.18.1

Compare Source

🩹 Fixes
  • scope-manager: visit params decorator before nest scope (#​10475)
  • eslint-plugin: [no-unnecessary-condition] better message when comparing between literal types (#​10454)
  • eslint-plugin: use consistent naming for asserting types and casting values (#​10472)
  • eslint-plugin: [no-unnecessary-boolean-literal-compare] flag values of a type parameter with boolean type constraints (#​10474)
  • eslint-plugin: handle string like index type (#​10460)
  • eslint-plugin: [no-unnecessary-template-expression] don't report when an expression includes comment (#​10444)
❤️ Thank You

You can read about our versioning strategy and releases on our website.

v8.18.0

Compare Source

🚀 Features
  • eslint-plugin: [switch-exhaustiveness-check] add support for "no default" comment (#​10218)
  • eslint-plugin: [no-deprecated] report on super call of deprecated constructor (#​10397)
🩹 Fixes
  • eslint-plugin: [use-unknown-in-catch-callback-variable] only flag function literals (#​10436)
  • eslint-plugin: [no-base-to-string] handle more robustly when multiple toString() declarations are present for a type (#​10432)
  • eslint-plugin: [no-deprecated] check if a JSX attribute is deprecated (#​10374)
  • typescript peer dependency (#​10373)
❤️ Thank You

You can read about our versioning strategy and releases on our website.

v8.17.0

Compare Source

🚀 Features
  • eslint-plugin: [prefer-promise-reject-errors] options to allow any and unknown (#​10392)
🩹 Fixes
  • eslint-plugin: [promise-function-async] handle function overloading (#​10304)
  • eslint-plugin: remove references to "extendDefaults" in no-restricted-types (#​10401)
  • eslint-plugin: [no-unnecessary-template-expressions] allow template expressions used to make trailing whitespace visible (#​10363)
❤️ Thank You

You can read about our versioning strategy and releases on our website.

typescript-eslint/typescript-eslint (@​typescript-eslint/parser)

v8.18.2

Compare Source

This was a version bump only for parser to align it with other projects, there were no code changes.

You can read about our versioning strategy and releases on our website.

v8.18.1

Compare Source

This was a version bump only for parser to align it with other projects, there were no code changes.

You can read about our versioning strategy and releases on our website.

v8.18.0

Compare Source

🩹 Fixes
❤️ Thank You
  • rtritto

You can read about our versioning strategy and releases on our website.

v8.17.0

Compare Source

This was a version bump only for parser to align it with other projects, there were no code changes.

You can read about our versioning strategy and releases on our website.

eslint/eslint (eslint)

v9.17.0

Compare Source

Features

Bug Fixes

  • 67d683d fix: fix crash when message.fix is nullish (#​19168) (ntnyq)
  • c618707 fix: ignore vars with non-identifier references in no-useless-assignment (#​19200) (YeonJuan)

Documentation

  • 3c22d2a docs: update yoda to Yoda in yoda.md for consistency (#​19230) (루밀LuMir)
  • e0a2203 docs: add missing backticks to no-sequences (#​19233) (루밀LuMir)
  • 4cc4881 docs: Update README (GitHub Actions Bot)
  • 3db6fdf docs: [no-await-in-loop] expand on benefits and inapplicability (#​19211) (Kirk Waiblinger)
  • bf2a4f6 docs: add missing backticks to func-style (#​19227) (루밀LuMir)
  • ba098bd docs: add missing header to prefer-spread (#​19224) (루밀LuMir)
  • b607ae6 docs: update description of no-param-reassign (#​19220) (루밀LuMir)
  • 1eb424d docs: add missing backticks to prefer-destructuring (#​19223) (루밀LuMir)
  • 85998d1 docs: add missing backticks to no-unneeded-ternary (#​19222) (루밀LuMir)
  • b75b32c docs: add missing backticks to no-new-func (#​19219) (루밀LuMir)
  • a7700bc docs: add missing backticks to id-length (#​19217) (루밀LuMir)
  • e2bb429 docs: add missing backticks to complexity.md (#​19214) (루밀LuMir)
  • 045d716 docs: add missing ) to id-denylist (#​19213) (루밀LuMir)
  • 7fe4114 docs: Update README (GitHub Actions Bot)
  • c743ba6 docs: add CSS language to no-restricted-syntax (#​19208) (Milos Djermanovic)
  • 1416d70 docs: add missing backticks to eqeqeq (#​19207) (루밀LuMir)
  • b950c1b docs: add missing backticks to prefer-object-spread (#​19206) (루밀LuMir)
  • 8a941cb docs: update docs and description of require-unicode-regexp (#​19205) (루밀LuMir)
  • cbab228 docs: Update README (GitHub Actions Bot)
  • f2257ce docs: update comments and description of no-script-url (#​19203) (루밀LuMir)
  • 365f0f4 docs: add missing backtick to default-case-last (#​19202) (루밀LuMir)
  • e6b84f5 docs: add missing punctuation in document (#​19161) (루밀LuMir)
  • c88708e docs: replace quote with backtick in description of for-direction (#​19199) (루밀LuMir)
  • a76f233 docs: use higher contrast color tokens for code comments (#​19187) (Josh Goldberg ✨)
  • db19502 docs: Update README (GitHub Actions Bot)

Chores

import-js/eslint-import-resolver-typescript (eslint-import-resolver-typescript)

v3.7.0

Compare Source

Minor Changes
  • #​326 93ea130 Thanks @​SukkaW! - This version has implemented the eslint-plugin-import-x's v3 resolver interface. This allows you to use import/require to reference eslint-import-resolver-typescript directly in your ESLint flat config:

    Previously

    // eslint.config.js
    module.exports = {
      settings: {
        'import-x/resolver': {
          typescript: {
            alwaysTryTypes: true,
          },
          // or
          require.resolve('eslint-import-resolver-typescript'):
            alwaysTryTypes: true,
          }
        }
      }
    }

    Now

    // eslint.config.js
    const {
      createTypeScriptImportResolver,
    } = require('eslint-import-resolver-typescript')
    
    module.exports = {
      settings: {
        'import-x/resolver-next': [
          createTypeScriptImportResolver({
            alwaysTryTypes: true,
          }),
        ],
      },
    }

    Note that this only works with eslint-plugin-import-x@>=4.5.0. You can't use createTypeScriptImportResolver with the older versions of eslint-plugin-import-x or any existing versions of eslint-plugin-import.

un-ts/eslint-plugin-import-x (eslint-plugin-import-x)

v4.6.1

Compare Source

Patch Changes

v4.6.0

Compare Source

Minor Changes
  • #​209 46d2360 Thanks @​SukkaW! - When eslint-plugin-import-x was forked from eslint-plugin-import, we copied over the default resolver (which is eslint-import-resolver-node) as well. However, this resolver doesn't supports exports in the package.json file, and the current maintainer of the eslint-import-resolver-node (ljharb) doesn't have the time implementing this feature and he locked the issue https://github.com/import-js/eslint-plugin-import/issues/1810.

    So we decided to implement our own resolver that "just works". The new resolver is built upon the enhanced-resolve that implements the full Node.js Resolver Algorithm. The new resolver only implements the import resolver interface v3, which means you can only use it with ESLint Flat config. For more details about the import resolver interface v3, please check out #​192.

    In the next major version of eslint-plugin-import-x, we will remove the eslint-import-resolver-node and use this new resolver by default. In the meantime, you can try out this new resolver by setting the import-x/resolver-next option in your eslint.config.js file:

    // eslint.config.js
    const eslintPluginImportX = require('eslint-plugin-import-x');
    const { createNodeResolver } = eslintPluginImportX;
    
    module.exports = {
      plugins: {
        'import-x': eslintPluginImportX,
      },
      settings: {
        'import-x/resolver-next': [
          // This is the new resolver we are introducing
          createNodeResolver({
            /**
             * The allowed extensions the resolver will attempt to find when resolving a module
             * By default it uses a relaxed extension list to search for both ESM and CJS modules
             * You can customize this list to fit your needs
             *
             * @​default ['.mjs', '.cjs', '.js', '.json', '.node']
             */
            extensions?: string[];
            /**
             * Optional, the import conditions the resolver will used when reading the exports map from "package.json"
             * By default it uses a relaxed condition list to search for both ESM and CJS modules
             * You can customize this list to fit your needs
             *
             * @​default ['default', 'module', 'import', 'require']
             */
            conditions: ['default', 'module', 'import', 'require'],
            // You can pass more options here, see the enhanced-resolve documentation for more details
            // https://github.com/webpack/enhanced-resolve/tree/v5.17.1?tab=readme-ov-file#resolver-options
          }),
          // you can add more resolvers down below
          require('eslint-import-resolver-typescript').createTypeScriptImportResolver(
            /** options of eslint-import-resolver-typescript */
          )
        ],
      },
    };

    We do not plan to implement reading baseUrl and paths from the tsconfig.json file in this resolver. If you need this feature, please checkout eslint-import-resolver-typescript (also powered by enhanced-resolve), eslint-import-resolver-oxc (powered by oxc-resolver), eslint-import-resolver-next (also powered by oxc-resolver), or other similar resolvers.

Patch Changes

v4.5.1

Compare Source

Patch Changes

v4.5.0

Compare Source

Minor Changes
For eslint-plugin-import-x users

Like the ESLint flat config allows you to use js objects (e.g. import and require) as ESLint plugins, the new eslint-plugin-import-x resolver settings allow you to use js objects as custom resolvers through the new setting import-x/resolver-next:

// eslint.config.js
import { createTsResolver } from '#custom-resolver';
const { createOxcResolver } = require('path/to/a/custom/resolver');

const resolverInstance = new ResolverFactory({});
const customResolverObject = {
  interfaceVersion: 3,
  name: 'my-custom-eslint-import-resolver',
  resolve(modPath, sourcePath) {
    const path = resolverInstance.resolve(modPath, sourcePath);
    if (path) {
      return {
        found: true,
        path
      };
    }

    return {
      found: false,
      path: null
    }
  };
};

module.exports = {
  settings: {
    // multiple resolvers
    'import-x/resolver-next': [
      customResolverObject,
      createTsResolver(enhancedResolverOptions),
      createOxcResolver(oxcOptions),
    ],
    // single resolver:
    'import-x/resolver-next': [createOxcResolver(oxcOptions)]
  }
}

The new import-x/resolver-next no longer accepts strings as the resolver, thus will not be compatible with the ESLint legacy config (a.k.a. .eslintrc). Those who are still using the ESLint legacy config should stick with import-x/resolver.

In the next major version of eslint-plugin-import-x (v5), we will rename the currently existing import-x/resolver to import-x/resolver-legacy (which allows the existing ESLint legacy config users to use their existing resolver settings), and import-x/resolver-next will become the new import-x/resolver. When ESLint v9 (the last ESLint version with ESLint legacy config support) reaches EOL in the future, we will remove import-x/resolver-legacy.

We have also made a few breaking changes to the new resolver API design, so you can't use existing custom resolvers directly with import-x/resolver-next:

// When migrating to `import-x/resolver-next`, you CAN'T use legacy versions of resolvers directly:
module.exports = {
  settings: {
    // THIS WON'T WORK, the resolver interface required for `import-x/resolver-next` is different.
    'import-x/resolver-next': [
       require('eslint-import-resolver-node'),
       require('eslint-import-resolver-webpack'),
       require('some-custom-resolver')
    ];
  }
}

For easier migration, the PR also introduces a compat utility importXResolverCompat that you can use in your eslint.config.js:

// eslint.config.js
import eslintPluginImportX, { importXResolverCompat } from 'eslint-plugin-import-x';
// or
const eslintPluginImportX = require('eslint-plugin-import-x');
const { importXResolverCompat } = eslintPluginImportX;

module.exports = {
  settings: {
    // THIS WILL WORK as you have wrapped the previous version of resolvers with the `importXResolverCompat`
    'import-x/resolver-next': [
       importXResolverCompat(require('eslint-import-resolver-node'), nodeResolveOptions),
       importXResolverCompat(require('eslint-import-resolver-webpack'), webpackResolveOptions),
       importXResolverCompat(require('some-custom-resolver'), { option1: true, option2: '' })
    ];
  }
}
For custom import resolver developers

This is the new API design of the resolver interface:

export interface NewResolver {
  interfaceVersion: 3;
  name?: string; // This will be included in the debug log
  resolve: (modulePath: string, sourceFile: string) => ResolvedResult;
}

// The `ResultNotFound` (returned when not resolved) is the same, no changes
export interface ResultNotFound {
  found: false;
  path?: undefined;
}

// The `ResultFound` (returned resolve result) is also the same, no changes
export interface ResultFound {
  found: true;
  path: string | null;
}

export type ResolvedResult = ResultNotFound | ResultFound;

You will be able to import NewResolver from eslint-plugin-import-x/types.

The most notable change is that eslint-plugin-import-x no longer passes the third argument (options) to the resolve function.

We encourage custom resolvers' authors to consume the options outside the actual resolve function implementation. You can export a factory function to accept the options, this factory function will then be called inside the eslint.config.js to get the actual resolver:

// custom-resolver.js
exports.createCustomResolver = (options) => {
  // The options are consumed outside the `resolve` function.
  const resolverInstance = new ResolverFactory(options);

  return {
    name: 'custom-resolver',
    interfaceVersion: 3,
    resolve(mod, source) {
      const found = resolverInstance.resolve(mod, {});

      // Of course, you still have access to the `options` variable here inside
      // the `resolve` function. That's the power of JavaScript Closures~
    }
  }
};

// eslint.config.js
const { createCustomResolver } = require('custom-resolver')

module.exports = {
  settings: {
    'import-x/resolver-next': [
       createCustomResolver(options)
    ];
  }
}

This allows you to create a reusable resolver instance to improve the performance. With the existing version of the resolver interface, because the options are passed to the resolver function, you will have to create a resolver instance every time the resolve function is called:

module.exports = {
  interfaceVersion: 2,
  resolve(mod, source) {
    // every time the `resolve` function is called, a new instance is created
    // This is very slow
    const resolverInstance = ResolverFactory.createResolver({});
    const found = resolverInstance.resolve(mod, {});
  },
};

With the factory function pattern, you can create a resolver instance beforehand:

exports.createCustomResolver = (options) => {
  // `enhance-resolve` allows you to create a reusable instance:
  const resolverInstance = ResolverFactory.createResolver({});
  const resolverInstance = enhanceResolve.create({});

  // `oxc-resolver` also allows you to create a reusable instance:
  const resolverInstance = new ResolverFactory({});

  return {
    name: "custom-resolver",
    interfaceVersion: 3,
    resolve(mod, source) {
      // the same re-usable instance is shared across `resolve` invocations.
      // more performant
      const found = resolverInstance.resolve(mod, {});
    },
  };
};
Patch Changes
gajus/eslint-plugin-jsdoc (eslint-plugin-jsdoc)

v50.6.1

Compare Source

Bug Fixes
eslint-community/eslint-plugin-n (eslint-plugin-n)

v17.15.1

Compare Source

🩹 Fixes
  • Promise.withResolvers is supported since node 22.11 (#​398) (c5bcb3a)

v17.15.0

Compare Source

🌟 Features
🩹 Fixes
  • no-unsupported: Correctly handle recursive objects on a per module basis (#​396) (db384d1)
microsoft/TypeScript (typescript)

v5.7.2: TypeScript 5.7

Compare Source

For release notes, check out the release announcement.

Downloads are available on:

v5.6.3: TypeScript 5.6.3

Compare Source

For release notes, check out the release announcement.

For the complete list of fixed issues, check out the

Downloads are available on:

v5.6.2: TypeScript 5.6

Compare Source

For release notes, check out the release announcement.

For the complete list of fixed issues, check out the

Downloads are available on:

typescript-eslint/typescript-eslint (typescript-eslint)

v8.18.2

Compare Source

🩹 Fixes
  • typescript-eslint: export types so that declarations can be named for dts files (#​10513)
❤️ Thank You

You can read about our versioning strategy and releases on our website.

v8.18.1

Compare Source

This was a version bump only for typescript-eslint to align it with other projects, there were no code changes.

You can read about our versioning strategy and releases on our website.

v8.18.0

Compare Source

🩹 Fixes
❤️ Thank You
  • rtritto

You can read about our versioning strategy and releases on our website.

v8.17.0

Compare Source

This was a version bump only for typescript-eslint to align it with other projects, there were no code changes.

You can read about our versioning strategy and releases on our website.


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 is behind base branch, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@Gudahtt
Copy link
Owner Author

Gudahtt commented Jan 6, 2025

Seeing this peerDependency warning:

typescript is listed by your project with version 5.7.2 (pe52a0), which doesn't satisfy what @metamask/eslint-config-typescript and other dependencies request (>=4.8.4 <5.6.0-0).

I want to close this, but there is a Renovate bug that is causing it to fail to detect this closed PR, so I have to leave this open. I'll at least put it in draft to indicate that this can't yet be merged.

@Gudahtt Gudahtt marked this pull request as draft January 6, 2025 15:41
@Gudahtt Gudahtt force-pushed the renovate/eslint-related branch 6 times, most recently from 35ad080 to 2e63e0a Compare January 14, 2025 00:54
@Gudahtt Gudahtt force-pushed the renovate/eslint-related branch 2 times, most recently from 12149f7 to 7aa014c Compare January 21, 2025 00:55
@Gudahtt Gudahtt force-pushed the renovate/eslint-related branch from 7aa014c to 23a7173 Compare January 25, 2025 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants