In ESLint, you can specify globals per file using a comment:
/* global A, B */
A = B * 2;
You also used to be able to specify an environment but it no longer works in latest releases:
/* eslint-env node */
const fs = require("fs"); // used to work but not anymore
I'm used to this comment configuration and it feels much better to use as there is no setup and it just works (unless someone decides to "deprecate" it and it stops working)
I saw that quick-lint-js also supports environment and globals with global groups, but it's part of a single configuration. It would be very useful if parts of the configuration could be parsed from the comments like ESLint used to do (at least globals and env).
In ESLint, you can specify globals per file using a comment:
You also used to be able to specify an environment but it no longer works in latest releases:
I'm used to this comment configuration and it feels much better to use as there is no setup and it just works (unless someone decides to "deprecate" it and it stops working)
I saw that quick-lint-js also supports environment and globals with global groups, but it's part of a single configuration. It would be very useful if parts of the configuration could be parsed from the comments like ESLint used to do (at least globals and env).