Comments (2)
For now I disable this config in component files:
{
files: ["*.component.ts"],
rules: {
// Factories (including lifecycles) should be named functions
"extra-rules/potential-point-free": "warn",
"prefer-arrow/prefer-arrow-functions": [
"error",
{
...preferArrowFunctionsConfig,
"singleReturnOnly": true,
},
],
},
},
from eslint-plugin-prefer-arrow-functions.
Hi @michaeljota @Samuel-Beslogic,
This should be possible by modifying isSafeTransformation
to return false if the name matches one of the ones you want to ignore:
eslint-plugin-prefer-arrow-functions/src/prefer-arrow-functions.ts
Lines 203 to 214 in 4520ba6
There is a `getFunctionName function
eslint-plugin-prefer-arrow-functions/src/prefer-arrow-functions.ts
Lines 80 to 81 in 4520ba6
Adding a new option of names to ignore gets read here
eslint-plugin-prefer-arrow-functions/src/prefer-arrow-functions.ts
Lines 35 to 43 in 4520ba6
And the new value will also want adding the ESLint's schema
eslint-plugin-prefer-arrow-functions/src/prefer-arrow-functions.ts
Lines 17 to 32 in 4520ba6
Thanks a lot.
from eslint-plugin-prefer-arrow-functions.
Related Issues (17)
- Fix loses generic HOT 2
- Functions as Object properties
- Ignore generator functions HOT 2
- Prevent or ignore overload functions HOT 1
- Allow named functions HOT 1
- TypeScript return types go missing with --fix HOT 1
- Plugin auto-fix can't handle empty function
- More intelligent `returnStyle` option HOT 2
- Shouldn't flag/auto-fix "assertion" functions
- Option to only allow named function *expressions*, not declarations
- Removes comments and formatting HOT 2
- Generic on TSX (React Component) gets incorrectly converted HOT 2
- Functions containing dollar signs (`$`) are incorrectly fixed HOT 1
- Warn constructor of class when classPropertiesAllowed is true
- ESLint 9 support HOT 8
- Fix removes the function name
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-plugin-prefer-arrow-functions.