@nuxt/eslint & ESLint Flat File Config
Hey,
I'm really struggling to work out the new flat file format for ES Lint. Ideally I want to use Prettier for formatting,
Vue-eslint-parser
for handling Vue. Also Tailwind CSS linting with the es lint plugin and type checking for typescript.
Here's my eslint.config.mjs
file, anything commented out just started breaking -
How do I actually configure this, I'm very confused so to what the proper format is now.7 Replies
Have the same issue. Need some usable template to work with 😢
Particularly on how to import the plugins, like eslint:recommended, typescript-eslint/recommended and vue recommended/essentials
Atleast for semi i can tell you: if you structure it like this itll work:
'semi': ['error', 'always'],
And for eslint:recommended:
import eslint from '@eslint/js';
...eslint.configs.recommended,
with a new way to install it according to typescript-eslint
https://typescript-eslint.io/users/configs/Hey! I just se this up today!
Here's my .eslint.config.mjs
And then my prettier config:
I think this wasn't working properly. I think the thing that needs to happen is that stylistic needs to be disabled
even with this export, it doesn't override stylistic properly
It looks like you have to disable the stylistic plugin by setting
stylistic: false
and then it'll runanyone using the tseslint or vue plugins? can't get that to work...
I think the Nuxt config should handle Vue as well
It's a flat file, so you can echo out the config that gets generated if you want to look at it
how do i do that?
Sorry, echo was the wrong term there
too many programming languages!
try
tailwindcss: eslintPluginTailwindCSS,
...eslintPluginTailwindCSS.configs.recommended.rules,