-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESLint v9 support #23
Comments
Also, this plugin doesn't send context information correctly to ESLint 9, causing "parserOptions.project" to be empty. |
@cartant: do you have a plan how you wish to proceed with all the recent changes? (flat config, takeuntildestroyed, ...). Since not too much happened here for quite some time, might it be an option to integrate and update the three rules in https://github.com/angular-eslint/angular-eslint ? I am just thinking out loud and I have no idea what JamesHenry would say to that |
I got the plugin working in ESLint v9 with the help of the import { fixupPluginRules } from '@eslint/compat';
import rxjsAngular from 'eslint-plugin-rxjs-angular';
export default tseslint.config(
{
files: ['**/*.ts'],
plugins: {
'rxjs-angular': fixupPluginRules(rxjsAngular),
},
},
); Additionally I needed to add a npm override to silence the peer dependency error. |
Didn't work for me :( |
Seems like the "correct" approach would be to use const eslint = require('@eslint/js');
const tseslint = require('typescript-eslint');
const eslintrc = require('@eslint/eslintrc');
const { fixupConfigRules } = require('@eslint/compat');
const compat = new eslintrc.FlatCompat({
baseDirectory: __dirname,
});
module.exports = [
{
files: ['**/*.ts'],
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
},
},
extends: [
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
...fixupConfigRules(compat.extends('plugin:rxjs/recommended')),
],
rules: {
// `eslint-plugin-rxjs` overrides
'rxjs/no-implicit-any-catch': 0,
'rxjs/no-subject-value': 'error',
},
}
] |
I don't understand how you can call "patching" a correct approach. It's just a temporary patch. |
To make it work right now of course, not as a permantent solution |
There is already a discussion ongoing at angular-eslint/angular-eslint#2094. If you also like the idea, please upvote the first comment/post to get some attention there. :) |
As mentioned in that discussion, I've published an initial fork of this project. Unless the community moves in a different direction, it's currently open for PRs.
I've also started a discussion on the main RxJS plugin to propose moving additional rules into this plugin: JasonWeinzierl/eslint-plugin-rxjs-x#132 |
fwiw I also forked these last october to support both config file formats and plan to maintain them until the community settles on something: |
Hah that brings us to 4 forks I've seen in the wild. For now, I'll continue my own fork because I believe in its merits (good commit history, adding new rules, re-organizing and re-documenting existing rules). But I'll shut down and point at another fork if the community settles elsewhere. There are open discussions in the following places:
|
ESLint v9 has been released recently. This plugin has a peer dependency to ESLint ^8.0.0 and causes peer dependency conflicts with ESLint v9.
The text was updated successfully, but these errors were encountered: