Giter Site home page Giter Site logo

Allow lint rules to be configurable about poi HOT 5 CLOSED

egoist avatar egoist commented on August 15, 2024
Allow lint rules to be configurable

from poi.

Comments (5)

egoist avatar egoist commented on August 15, 2024 1

See https://vbuild.js.org/docs/addons.html#eslint

from poi.

egoist avatar egoist commented on August 15, 2024 1

@NemoAlex

If you want to run eslint during building, here's a preset: https://github.com/egoist/vbuild/blob/master/packages/vbuild-preset-eslint/README.md

In fact it's as simple as mutating the webpack config via old webpack(config) {} option for new extendWebpack(config) {} option.

Personally I would use eslint or xo directly like eslint **/src/**/*.{vue,js}, since it's much faster, see here for example

from poi.

egoist avatar egoist commented on August 15, 2024

Oh, I think it's already available as options.eslint, I just haven't documented this because it's not tested yet 😅

By default it uses a preset config file, you can override it though:

module.exports = {
  lint: true,
  eslint: {
    configFile: cwd('.eslintrc') 
  }
}

It accepts the same options in eslint-loader

Will document it after adding more improvements to this.

from poi.

zephraph avatar zephraph commented on August 15, 2024

Sounds good.

from poi.

NemoAlex avatar NemoAlex commented on August 15, 2024

I'm wondering how to do lint in v7. vbuild --eslint doesn't work now.

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.