oxc/no-this-in-exported-function
oxc plugin · suspicious
No autofix
.oxlintrc.json
{
"rules": {
"oxc/no-this-in-exported-function": "error"
}
}Disallows the use of this in exported functions.
export function foo() {
console.log(this);
}
export default function bar() {
this.something();
}
function baz() {
const self = this;
}
export { baz };function foo() {
console.log(this);
}
export const bar = () => {
console.log(this);
};Examples from the Oxlint documentation.
ESLint does not have this rule.
oxc/no-this-in-exported-function
oxc plugin · suspicious
{
"rules": {
"oxc/no-this-in-exported-function": "error"
}
}Biome does not have this rule.
Disallow the use of barrel files where the file contains export * statements, and the total number of modules exceeds a threshold.
Disallows the use of async functions as Express endpoint handlers.
Prevents using object or array spreads on accumulators in Array.prototype.reduce() and in loops.
Https://rust-lang.github.io/rust-clippy/master/#/misrefactored_assign_op
Disallows the use of approximate constants, instead preferring the use of the constants in the Math object.