Coder Social home page Coder Social logo

Unused variables in callbacks about jslintmate HOT 4 OPEN

darobin avatar darobin commented on July 18, 2024
Unused variables in callbacks

from jslintmate.

Comments (4)

rondevera avatar rondevera commented on July 18, 2024

Thanks for reporting this, Robin. Are you having this issue with JSLint or JSHint?

from jslintmate.

darobin avatar darobin commented on July 18, 2024

With JSHint. Thanks for looking into this.

from jslintmate.

rondevera avatar rondevera commented on July 18, 2024

This new behavior is happening because of a recent change in JSHint itself. Each new release of JSLintMate just contains the latest version of JSLint and JSHint, which is why it's appearing now.

It looks like this has been addressed in a recently JSHint nightly build: jshint/jshint#639

Other related discussions:

If you'd like to use a version of JSHint other than JSLintMate's packaged version (e.g., if you want to use a JSHint nightly build), you can configure JSLintMate to use a custom linter. Here's how: https://github.com/rondevera/jslintmate#custom-jslintjshint-builds

from jslintmate.

adambullmer avatar adambullmer commented on July 18, 2024

I'm kinda plagued by this one too. My programmer OCD kicks in if I leave out variables as in other languages it changes the signature of the function.

My solution is to comment out the arguments that I don't need. That way they are still documented in code that they are an option, but don't throw linter errors. I've been seeing this practice crop up for more and more boilerplate javascript code I've used.

function temp (arg1 /* arg2, arg3, ...*/) { // Doesn't throw errors and is completely valid 
    return arg1;
}

from jslintmate.

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.