I'm using Nuxt 3 and trying to apply ESLint 9, but I'm encountering errors. HELP

I'm using IntelliJ IDEA 2024.2.0.2 (latest version).

 

I want to change the indent property from 2 to 4, but it isn't being applied.

 

 

ESLint configuration is as follows.

 

 

If you specify an additional rules directory, the following error occurs.

 

 

 

What's the problem? Am I setting it up wrong? HELP… 

nuxt.config.ts:

 

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
    extends: ['@nuxt/ui-pro'],

    modules: [
        '@nuxt/eslint',
        '@nuxt/fonts',
        '@nuxt/ui',
        '@vueuse/nuxt'
    ],


package.json:

"devDependencies": {
  "@nuxt/eslint": “^0.5.6”
}

0
3 comments

I want to change the indent property from 2 to 4, but it isn't being applied.

Please could you elaborate on this? What do you mean saying that it's not applied?

-1

When I change the indent option from 2 to 4, the space indentation should change from 2 spaces to 4 spaces, but it doesn’t apply.

indent:2 :

__function sample

 

indent:4 :

____function sample

 

 

Or is there a way to configure it directly in IntelliJ?.

I couldn't find how to change the indent option in IntelliJ. After searching for a solution, I found a manual configuration method, and the issue occurred while applying that

 

0

Thank you for your clarification. It's important to note that EsLint is a linter and not a formatting tool, and the code style preferences in your IDE do not automatically sync with the eslint configuration. You might want to consider importing settings from ESLint to see if that resolves your issue. Please keep in mind that only the core ESLint rules (such as indent, semi, quotes, etc.) will be applied when you import code style settings from ESLint.

 

Additionally, be aware that the ESLint team is deprecating the formatting rules, as whitespace management is more effectively handled by source code formatters.

 

0

Please sign in to leave a comment.