Giter Site home page Giter Site logo

Comments (6)

egoist avatar egoist commented on August 15, 2024

Yeah, but it's out of the scope of vbuild.

$ eslint ./src/** --ext .vue --ext .js

Add add eslint-config-vue to your .eslintrc or anywhere eslint can read.

from poi.

layanto avatar layanto commented on August 15, 2024

But then I will need to add eslint as a dependency to my project when it already is a dependency of vbuild.
I thought since vbuild already does eslint but only when building, maybe can add feature to do eslint on its own with vbuild like vbuild --eslint

from poi.

egoist avatar egoist commented on August 15, 2024

I will consider this, since it doesn't run webpack at all so it might be vbuild eslint instead. And it can simply spawn node_modules/.bin/eslint in a child process with some default options.

So PR welcome ;)

btw, if you installed vbuild as devDependency the eslint command would be available in your project already.

from poi.

layanto avatar layanto commented on August 15, 2024

Wanted to give this a go but not sure where to start. I also tried overriding the indent rule to 4 spaces via .eslintrc below but eslint appeared to still expect 2 spaces for indent as per eslint-config-vue

{
  "extends": "vue",
  "rules": {
    "indent": ["error", 4]
  }
}

from poi.

egoist avatar egoist commented on August 15, 2024

First you need to set eslint in vue.config.js:

export default {
  eslint: {
    configFile: '/path/to/.eslintrc'
  }
}

If you're running eslint independently I think your current setup should work?

from poi.

egoist avatar egoist commented on August 15, 2024

Closed since this is not going to happen in the near future.

from poi.

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.