eslint-plugin-prefer-arrow-functions icon indicating copy to clipboard operation
eslint-plugin-prefer-arrow-functions copied to clipboard

Auto-fix plain Functions into Arrow Functions, in all cases where conversion would result in the same behaviour

Results 25 eslint-plugin-prefer-arrow-functions issues
Sort by recently updated
recently updated
newest added

## Description According to the document, `classPropertiesAllowed` is for methods that "when doing so would not alter or break their behaviour". So a method like: ```ts class A { method()...

Currently no violations are flagged for `function f() { function g() { return this; } }`. We should fix this to `const f = () => { function g() {...

This rule auto-fixes `f || function () {}` to `f || () => {}`, which is syntactically invalid. Since an arrow function has lower [precedence](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_precedence) than a `function` expression, the...

## Description With ESLint V9, it now became very valuable for ESlint plugins to export types declaration. ## Suggested Solution The project is already in Typescript. Use some kind of...

Code: ```js static #table(pattern) { const table = new Uint8Array(256).fill(pattern.length); for (let i = 0, length = pattern.length - 1; i !== length; ++i) { table[pattern[i]] = length - i;...

## Description Typescript supports functions returning `never`. It means the function will always throw or make the program quit. But, for whatever reason, there is some limitation on the VSCode...

## Description When I try to upgrade typescript package to 5.8.3 I have an npm error from this plugin : ``` npm warn ERESOLVE overriding peer dependency npm warn While...

## Description ```js const foo = 'bar'; export default { [foo]() { console.log('output'); }, }; ``` Expected: ```js const foo = 'bar'; export default { [foo]: () => console.log('output'), };...

Use semver ranges for production dependencies so consumers can use non-exact but compatible versions closes #58