Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config per file with comments #1227

Open
weary-adventurer opened this issue Aug 26, 2024 · 0 comments
Open

Config per file with comments #1227

weary-adventurer opened this issue Aug 26, 2024 · 0 comments

Comments

@weary-adventurer
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant