Giter Club home page Giter Club logo

Comments (9)

sindresorhus avatar sindresorhus commented on May 27, 2024

It has almost always done that. I like it this way as it will parse anything without having to set an option. You can easily just override if you don't agree, though. That's the beauty of shareable configs :)

from eslint-config-xo.

sjswoboda avatar sjswoboda commented on May 27, 2024

It does not override, though. It will take the the plugin version...the problem is setting the parserOptions explicitly. If that's not set, all works fine. (This was added recently, 83aad21)

from eslint-config-xo.

sindresorhus avatar sindresorhus commented on May 27, 2024

Yes, but it already had the es6 environment variable set, which triggered ES6 parsing implicitly. 83aad21#diff-168726dbe96b3ce427e7fedce31bb0bcL11 So nothing new here.

from eslint-config-xo.

sjswoboda avatar sjswoboda commented on May 27, 2024

The es6 environment variable gets overriden, however, parserOptions do not get overriden. So this is new and a breaking change for us :(

from eslint-config-xo.

sindresorhus avatar sindresorhus commented on May 27, 2024

If you're saying you can not do the following, it sounds like a bug in ESLint and should be reported there:

{
    extends: 'xo',
    parserOptions: {
        ecmaVersion: 5
    }
}

from eslint-config-xo.

sjswoboda avatar sjswoboda commented on May 27, 2024

Plugins override the parser options (I asked the es team); I will put in a feature request (they asked me to see if xo team will change :P)

from eslint-config-xo.

sindresorhus avatar sindresorhus commented on May 27, 2024

@sjswoboda I know, but this is not a plugin. It's a shareable config.

from eslint-config-xo.

sjswoboda avatar sjswoboda commented on May 27, 2024

Sorry, I meant the shareable config is overriding the parser options. (no plugin here) I was under the impression that this is an eslint config -- in which case anyone using this config (esling-config-google, etc.) are all now getting "upgraded" to ecma6 because eslint does not support (currently) overriding parserOptions.

from eslint-config-xo.

sindresorhus avatar sindresorhus commented on May 27, 2024

eslint does not support (currently) overriding parserOptions.

And if so, is a ESLint problem, and should be opened there.

from eslint-config-xo.

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.