eslint-plugin-editorconfig icon indicating copy to clipboard operation
eslint-plugin-editorconfig copied to clipboard

Flat config & ESLint 9 support

Open phanect opened this issue 1 year ago • 4 comments

Priority: High ― Start after #70

phanect avatar Dec 30 '23 08:12 phanect

What exactly is needed here? I was able to use this plugin with flat config with the following config:


import editorConfigPlugin from "eslint-plugin-editorconfig";

 {
    files: ["**/*"],
    plugins: {
      editorconfig: editorConfigPlugin,
    },
    rules: {
      ...editorConfigPlugin.configs.all.rules,
    },
  },

FezVrasta avatar Oct 25 '24 16:10 FezVrasta

Really? When I tested, this plugin didn't work properly at all with flat config.

IIRC, I have tested when ESLint was v8, so ESLint might be updated so that legacy .eslintrc-based plugin works. I will test if it works as expected with flat config, and if it works, I will add instructions for flat config into README.

Thanks for the info!

phanect avatar Oct 26 '24 14:10 phanect

I quickly tested your config, but unfortunately, it didn't work on my end. This plugin internally calls the ESLint rules such as indent and linebreak-style, so it should not work with ESLint v9 since those rules are already removed.

phanect avatar Oct 28 '24 11:10 phanect

I'm using it only for the empty line at EOF so maybe that's why it worked for me.

FezVrasta avatar Oct 28 '24 13:10 FezVrasta