default-param-last
eslint
No autofix
eslint.config.js
export default [
{
rules: {
"default-param-last": "error",
},
},
];function f(a = 0, b) {}
function g(a, b = 0, c) {}function h(a = 0, b: number) {}function f(a, b = 0) {}
function g(a, b = 0, c = 0) {}function h(a = 0, b?: number) {}Examples from the ESLint documentation.
default-param-last
eslint
export default [
{
rules: {
"default-param-last": "error",
},
},
];default-param-last
eslint plugin · style
{
"rules": {
"default-param-last": "error"
}
}style/useDefaultParameterLast
style · since 1.0.0
{
"linter": {
"rules": {
"style": {
"useDefaultParameterLast": "error"
}
}
}
}Require default cases in switch statements
Enforce a maximum number of classes per file
Enforce that class methods utilize this
Disallow nested ternary expressions
Disallow the unary operators ++ and --