Code Monkey home page Code Monkey logo

Comments (7)

mysticatea avatar mysticatea commented on May 18, 2024

Thank you for this issue.

Hm, probably we can replace the assertions by assert module of Node.js core in order to solve this issue.


  1. It's better if the assertions exist in order to develop this plugin.
  2. At least, console.assert exists on all popular browsers (including old IE) and Node.js. Also, VSCode which is based on Electron seems no problem. However, console object is not standard. It might be better that we don't assume it to work...

from eslint-plugin-vue.

gabrielboliveira avatar gabrielboliveira commented on May 18, 2024

Great! Liked your approach.

Perhaps it's an Atom package issue as well. I agree with you that it should have the console.assert method. I'll open an issue there also.

from eslint-plugin-vue.

Bartheleway avatar Bartheleway commented on May 18, 2024

As a quick fix you can open node_modules/eslint-plugin-vue/lib/utils/index.js and remove all the console.assert. I tried and this fixed the issue.

from eslint-plugin-vue.

gabrielboliveira avatar gabrielboliveira commented on May 18, 2024

@Bartheleway Yes, that works. I'm using this to be able to use the linter on Atom

from eslint-plugin-vue.

gabrielboliveira avatar gabrielboliveira commented on May 18, 2024

So, I've done some more testing, and the only console method I was able to use was console.log.

Not sure why other methods are not available, but it's not an eslint-plugin-vue issue for sure, perhaps an improvement not trusting on console.assert being available.

from eslint-plugin-vue.

michalsnik avatar michalsnik commented on May 18, 2024

Fix released as v3.1.3 🚀 It's funny though - in order to make eslint work on .vue files in atom you need to set Lint HTML files in linter-eslint atom's package and install eslint-plugin-html, but you don't need to include it in .esllintrc.* anywhere.

from eslint-plugin-vue.

gabrielboliveira avatar gabrielboliveira commented on May 18, 2024

@michalsnik Thanks!!

I was able to make it work only with Lint HTML files enabled, installed eslint on project and not globally.

Then my .eslintrc.json looks like the default config:

{
  "extends": [
    "eslint:recommended",
    "plugin:vue/recommended"
  ],
  "parserOptions": {
    "ecmaFeatures": {
      "experimentalObjectRestSpread": true
    }
  }
}

Also installed only eslint and eslint-plugin-vue as devDependencies.

from eslint-plugin-vue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.