Open json-derulo opened 6 months ago
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 @eslint/compat
package:
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 :( And now here is ESLint 10 ;)
Seems like the "correct" approach would be to use fixupConfigRules()
. This worked for us;
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.
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
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.