Skip to content

Help - Diff Plugin not compatible with new flat configΒ #47

@mlwyatt

Description

@mlwyatt

Either this plugin isn't compatible with ESLint's flat config file yet, or I'm not setting it up quite right.

Here's a simple example:

Config
import globals from 'globals';
import diff from 'eslint-plugin-diff';

export default [
  {
    ...diff.configs.diff.overrides[0],
    plugins: { diff },
    processor: diff.processors.diff,
  },
  {
    rules: {
      'no-console': ['error'],
    },
  },
];
console.log(1);
+console.log(2);
console.log(3);
console.log(4);

Expected

  2:1  error  Unexpected console statement  no-console

Actual

  1:1  error  Unexpected console statement  no-console
  2:1  error  Unexpected console statement  no-console
  3:1  error  Unexpected console statement  no-console
  4:1  error  Unexpected console statement  no-console

Any help would be appreciated.
Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions