It's a bit hard to set up using flat config style

Author: vandrieshCreated Jan 7, 2025Updated Jan 7, 2025

Can any share their config ?

javascript

const youDontNeedMomentJS = require('eslint-plugin-you-dont-need-momentjs');
...
module.exports = [
    ...,
    {
        files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
        plugins: {
            'you-dont-need-momentjs': youDontNeedMomentJS,
        },
        rules: {
            ...youDontNeedMomentJS.configs.recommended.rules,
        },
    },
];
bash
TypeError: Error while loading rule 'you-dont-need-momentjs/no-dynamic-import-moment': Rule must be an object with a `create` method
Occurred while linting /Users/vandries/my-repos/.../eslint.config.js

TypeError: Error while loading rule 'you-dont-need-momentjs/no-dynamic-import-moment': Rule must be an object with a `create` method
Occurred while linting /Users/vandries/my-repos/.../eslint.config.js

does it meant it's not compatibil with flat approach ?

Source: you-dont-need/You-Dont-Need-Momentjs