gxmari007 / vite-plugin-eslint

🚨 ESLint plugin for vite
MIT License
266 stars 44 forks source link

No ESLint configuration found at 1.8.0 #38

Closed jiexaspb closed 1 year ago

jiexaspb commented 1 year ago

After calling npm run build command I get the following error

What can be wrong?

 — -zsh — 210×48 2022-08-13 01-25-06

The .eslintrc.js configuration file exists and is located at the root of the project

gxmari007 commented 1 year ago

Can you show me your config?

jiexaspb commented 1 year ago

.eslintrc.js

module.exports = {
  root: true,
  env: {
    node: true,
  },
  extends: ['plugin:vue/recommended', 'plugin:prettier-vue/recommended'],
  parserOptions: {
    ecmaVersion: 2020,
  },
  rules: {
    'prettier-vue/prettier': [
      'warn',
      {
        printWidth: 120,
        singleQuote: true,
        semi: true,
        tabWidth: 2,
        trailingComma: 'es5',
        singleAttributePerLine: true,
        bracketSpacing: true,
      },
    ],
    'vue/no-v-model-argument': 'off',
  },
};

i use plugin https://github.com/meteorlxy/eslint-plugin-prettier-vue

gxmari007 commented 1 year ago

Can you show me a demo project?

avxit commented 1 year ago

I had the same problem. It's look like new version (1.8.0) of the plugin doesn't ignore node_modules. The old one (1.7.0) works fine.

Here is the log.

 ERROR  [commonjs--resolver] Failed to load config "./.config/eslint.config" to extend from.
Referenced from: [PATH_TO_PROJECT]/node_modules/@popperjs/core/package.json
file: [PATH_TO_PROJECT]/node_modules/@popperjs/core/lib/modifiers/arrow.js

 ERROR  error during build:
Error: Failed to load config "./.config/eslint.config" to extend from.
Referenced from: [PATH_TO_PROJECT]/node_modules/@popperjs/core/package.json
    at configInvalidError ([PATH_TO_PROJECT]/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2624:9)
    at ConfigArrayFactory._loadExtendedShareableConfig ([PATH_TO_PROJECT]/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3242:23)
    at ConfigArrayFactory._loadExtends ([PATH_TO_PROJECT]/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3119:25)
    at ConfigArrayFactory._normalizeObjectConfigDataBody ([PATH_TO_PROJECT]/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3058:25)
    at _normalizeObjectConfigDataBody.next (<anonymous>)
    at ConfigArrayFactory._normalizeObjectConfigData ([PATH_TO_PROJECT]/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3003:20)
    at _normalizeObjectConfigData.next (<anonymous>)
    at ConfigArrayFactory.loadInDirectory ([PATH_TO_PROJECT]/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2849:28)
    at CascadingConfigArrayFactory._loadConfigInAncestors ([PATH_TO_PROJECT]/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3833:46)
    at CascadingConfigArrayFactory._loadConfigInAncestors ([PATH_TO_PROJECT]/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3852:20)
alexmccabe commented 1 year ago

Same issue for me for various packages in our project