feat(oxlint-config): add oxlint config#1475
Conversation
|
FWIW, based on the logs from https://github.com/taiga-family/toolkit/actions/runs/20557598294/job/59043899936?pr=1475 I think you could use the |
| @@ -0,0 +1,464 @@ | |||
| { | |||
There was a problem hiding this comment.
Can we automate this? Generate configs from our eslint config?
There was a problem hiding this comment.
Yes, you can use oxlint-migrate. However, it produces a more complex configuration file, as it completely duplicates the eslint settings.
There was a problem hiding this comment.
why didn't I use the config that is generated in oxlint-migrate?:
- The complexity of the resulting configuration: automatic migration honestly turns the eslint config into an oxlint config. this means that the oxlint config will be divided into file patterns. This is unnecessary work for oxlint because the rules are automatically applied to the correct file extensions.
- In the following steps, I indicated that can try to enable jsPlugins, but they do not migrate using oxlint-migrate, so will have to register them manually and it will be problematic to make automatic migration completely.
There was a problem hiding this comment.
@lld4n Can we partially implement a migrator at the CI level somehow? So that we don’t have to copy-paste rules from eslint-plugin-experience-next, because they may change often (or not so often). In any case, I’m happy to hear any suggestions.
There was a problem hiding this comment.
I don't think it's worth writing a full-fledged config generator from eslint to oxlint, as it would take a lot of time and the result would not be as useful as it seems at first glance. But there is a solution that should theoretically be useful. First, make the oxlint config backward compatible with the eslint config. When changing any file from eslint-plugin-experience-next, define a list of rules that have changed. Use the resulting data to change the oxlint config. Also, keep an eye on oxlint updates and determine which rules they have managed to implement in Rust in order to abandon jsPlugins whenever possible. So, as I understand it, the plan is as follows:
- Merge the current PR so that people can test the configuration on their projects
- Complete the config using jsPlugins
- Implement a script to identify differences in rules in eslint configurations and update oxlint based on this data
- Implement a script to identify new features in oxlint and update oxlint based on this data
|
@lld4n Could you please rebase? |
|
would love to test that config in our project |
b7bf4c9 to
93cef6f
Compare
dce2850 to
e71da3b
Compare
Add basic oxlint config. During the implementation of the configuration, I used the rules settings from eslint-plugin-experience-next (recommended) and only those rules that are already ready in oxlint
Test oxlint config in taiga-ui
I think the basic idea of the following steps is:
Fixes #1474