nuxt-modules / eslint

ESLint module for Nuxt.js
MIT License
159 stars 15 forks source link

Can't use module with my nuxt 3 project getting error #92

Closed sarwan920 closed 1 year ago

sarwan920 commented 1 year ago

Hello,

I have trying to use this eslint module my nuxt 3 project, but getting error mentioned in the screenshot.

I have eslint and @nuxtjs/eslint-module installed using npm, and added to the nuxt.config.ts file but still getting this error.

image

huynvebisolvn commented 1 year ago

I had the same problem with nuxt 3.3.3 I hope it gets fixed soon

image

ricardogobbosouza commented 1 year ago

Hi @sarwan920, @huynvebisolvn Are you using eslint-module version 4?

CJ-Uy-EVC commented 1 year ago

I had the same issue then i found the solution. You need to let "@nuxtjs/eslint-module" to be the first in the list of modules in the nuxt.config.ts

sebj54 commented 1 year ago

I had to create an eslint config file (like .eslintrc) to make it work.

tanerijun commented 1 year ago

To solve this issue, you need to create ESLint config file in your root. Here is an example:

File name: .eslintrc

{
  "root": true,
  "extends": ["@nuxtjs/eslint-config-typescript"],
  "rules": {
    "vue/multi-word-component-names": false
  }
}
ricardogobbosouza commented 1 year ago

It is necessary to create the eslint configuration file https://eslint.org/docs/latest/use/configure/configuration-files

whimsicaldreamer commented 1 year ago

@ricardogobbosouza @tanerijun I am having a different error.

.eslintrc

{
    "root": true,
    "extends": ["@nuxtjs/eslint-config-typescript"],
    "rules": {
      "vue/multi-word-component-names": false
    }
}

package.json

image

nuxt.config.ts

image

ERROR

image

ricardogobbosouza commented 1 year ago

Hi @whimsicaldreamer

Have you tried reinstalling the dependencies?

rm -rf node_modules package-lock.json yarn.lock pnpm-lock.yaml 

npm install
# yarn install
# pnpm install
whimsicaldreamer commented 1 year ago

Yes @ricardogobbosouza, multiple times