
This release updates the @eslint/plugin-kit dependency to the latest version 0.2.3 which includes the fix for security advisory GHSA-7q7g-4xm8-89cq.
Highlights
meta.defaultOptions
Rules can now specify default options. ESLint will recursively merge any user-provided options elements on top of the default elements.
This feature makes it easier to work with options in rules.
// my-rule.js
export default {
    meta: {
        defaultOptions: [{
            alias: "basic",
            ignoreClassFields: false
        }],
        schema: [{
            type: "object",
            properties: {
                alias: {
                    type: "string"
                },
                ignoreClassFields: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }]
    },
    create(context) {
        // `context.options` is guaranteed to be an array with a single object
        // that has a string property `alias` and a boolean property `ignoreClassFields`.
        // If the rule is enabled with no options specified in the configuration file,
        // `alias` will be `"basic"`, and `ignoreClassFields` will be `false`.
        const [{ alias, ignoreClassFields }] = context.options;
        return { /* ... */ };
    }
};This feature also allows document generators, other tools and integrations, and end users to easily find the default options for rules.
Other notable changes
- Custom languages can now provide the normalizeLanguageOptions(languageOptions)method. The return value will be used aslanguageOptionswhen callingparse(),createSourceCode(), andapplyLanguageOptions()methods and as the value ofcontext.languageOptionsproperty in rules.
- The no-useless-computed-keyrule now fully supports object destructuring patterns.
Features
- 01557cefeat: Implement Language#normalizeLanguageOptions() (#19104) (Nicholas C. Zakas)
- 2edc0e2feat: add meta.defaultOptions (#17656) (Josh Goldberg ✨)
- bdec50efeat: fix- no-useless-computed-keyfalse negative with- __proto__(#19123) (Milos Djermanovic)
- 3087c9efeat: add- metaobject to- @eslint/jsplugin (#19095) (Francesco Trotta)
Bug Fixes
- fd33f13fix: update types for- no-restricted-importsrule (#19060) (Nitin Kumar)
- bd35098fix: switch away from Node.js node:assert and AssertionError (#19082) (Josh Goldberg ✨)
- 9db5b15fix: unsafe report for- no-lonely-if(#19087) (Abraham Guo)
- 68fa497fix: ignore files on a different drive on Windows (#19069) (Francesco Trotta)
- 4ce625afix: upgrade @humanwhocodes/retry@0.4.1 to avoid debug logs (#19102) (Milos Djermanovic)
Documentation
- d927920docs: fix styles in no-js mode (#18916) (Tanuj Kanti)
- 09bc2a8docs: Update README (GitHub Actions Bot)
- 39089c8docs: add- no-useless-computed-keyexamples with object patterns (#19109) (Milos Djermanovic)
- 895c60fdocs: add missing messageId property and suggestion properties (#19122) (fnx)
- 298625edocs: Change CLI -c to use flat config (#19103) (Nicholas C. Zakas)
- 522d8a3docs: add deprecation on- indent,- quotesand- semirule types (#19090) (Marco Pasqualetti)
Chores
- 2967d91chore: upgrade @eslint/js@9.15.0 (#19133) (Milos Djermanovic)
- b441beechore: package.json update for @eslint/js release (Jenkins)
- 7d6bf4achore: upgrade @eslint/core@0.9.0 (#19131) (Milos Djermanovic)
- 902e707chore: upgrade @eslint/plugin-kit@0.2.3 (#19130) (Milos Djermanovic)
- 5ff6c1dchore: bump cross-spawn (#19125) (Ian Bobinac)
- cceccc7chore: update dependency @eslint/json to ^0.6.0 (#19117) (renovate[bot])
- 0da3f73chore: update algolia referrer (#19114) (Strek)
- 4f08332ci: unpin- trunk-io/trunk-action(#19108) (Francesco Trotta)
- 6b75683perf: optimize- text-tableby replacing regex with- trimEnd(#19061) (Nitin Kumar)
