New Nov 15, 2024

ESLint v9.15.0 released

Libraries, Frameworks, etc. All from ESLint Blog View ESLint v9.15.0 released on eslint.org

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

Features

Bug Fixes

Documentation

Chores

Scroll to top