Comments (8)
So I've look at it and both the types shipped by @types/eslint and TSESLint in typescript-eslint/typescript-eslint#7273 makes it totally useless to ship types for plugin, there is absolutely no validation on plugin name or options. This is sad. This is one of the reason I'm working on a new linter. Until ESLint takes really care about typing of their config, I considered this out of scope.
from eslint-plugin-react-refresh.
I can do that, but I'm quite unhappy is the low guidance of ESLint core for that. What are types you using to type your config? I don't think this is worth it adding a dependency on @types/eslint
or a subpackage of @typescipt-eslint
, so maybe having the module typed as { "only-export-components": any }
would be a start, but that's bad that you can't get types for the parameters
from eslint-plugin-react-refresh.
@ArnaudBarre I completely agree.
The thing is I am using ES modules.
Probably with commonjs your current types are correct.
But with ES Modules there are some breaking changes.
Basically typescript with ES Modules does not work with namespaces any more.
You can check out this blogpost: https://devblogs.microsoft.com/typescript/typescripts-migration-to-modules/
You can check out my project here: https://github.com/valerii15298/int20h-2024/blob/main/api/eslint.config.js
It is a small one, so you can clone install deps and see that there is no any autocomplete for all eslint plugins...
Maybe I am doing something wrong though...
I also can create separate reproduction repo specifically for it if you want :)
from eslint-plugin-react-refresh.
I'll look at it, if you find any plugin that does things right, please share!
from eslint-plugin-react-refresh.
@ArnaudBarre can you share which linter are you working on?
I heard that Biome is quite promising...
from eslint-plugin-react-refresh.
I don't have anything ready for now, I've worked on something on Christmas/January but I have still some rules I want to implement before making the project public.
Here are some tweets I made about it:
- https://twitter.com/_ArnaudBarre/status/1738729664481268018
- https://twitter.com/_ArnaudBarre/status/1740145997035266098
- https://twitter.com/_ArnaudBarre/status/1740511694399426914
Biome and OXC linter are two promising projects, but the lack of custom rules and type aware rules is a deal breaker for me.
A project in the same idea but IMO with a public API too low level is https://github.com/johnsoncodehk/typescript-linter
from eslint-plugin-react-refresh.
Related Issues (20)
- Support for constant objects? HOT 3
- Warning is not appearing for enums HOT 1
- Fast Refresh and Hooks HOT 1
- Throwing error for typescript type exports. HOT 2
- Correct use with Context API and Vite - docs missing? HOT 2
- Consider not warning on `export *` when re-exported file is passing HOT 5
- Lazy Loading react component get some warning HOT 14
- Capitalized non-function not triggering rule HOT 2
- Possible false-positive with memo default export HOT 4
- Please add better description what it does HOT 2
- Add option for allowList of export names HOT 3
- False positives in v0.4.4 HOT 12
- How to use in flat config HOT 1
- Support for styled components HOT 1
- Warn exports instead of components when using only components HOT 3
- How to configure your plugin to work with a Vite+React project? HOT 2
- Possible false positive/negative HOT 1
- Allow constant exports doesn't work with objects. HOT 3
- Question about potential problems with barrel files HOT 1
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-react-refresh.