less / less.js

Less. The dynamic stylesheet language.
http://lesscss.org
Apache License 2.0
17k stars 3.41k forks source link

Eslint.no unused vars #3699

Open ryouaki opened 2 years ago

ryouaki commented 2 years ago

What: fix the issues about eslint error

Why: code clean

How: fix with add _ for unused args.

Checklist:

No logic change ,Just for eslint fix.

matthew-dean commented 2 years ago

I would take a different approach. In runtime code, unused vars can probably be safely removed. In the "api" code (which is kind of defining / documenting the interface, it should probably have different ESLint rules (in an overrides section). In the case of visitors, some of the vars are there because the interface is not clearly defined, and should be. (It's attempting to document what will be passed into each method.)

So if we address all those, there should be no need to prefix vars with _