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

lint: upgrade linting environment to ECMAScript 2022 #1030

Merged
merged 1 commit into from
Mar 18, 2025

Conversation

raphendyr
Copy link

@raphendyr raphendyr commented Mar 18, 2025

This PR updates the eslint JavaScript linting environment to the 2022 standard. This is based on the wanted Node 18 support and aligns with data in node.green. More importantly, this is what is used in the main express repo currently, see expessjs/express/.eslintrc.yml.

In addition to setting the ES version, we set node environment. It's not needed, I think, but makes the file match more with the main repo. The documentation for that says "Node.js global variables and Node.js scoping".

See comments below about added rule and the rule we have, which doesn't exists in the main repo.

@@ -18,7 +18,10 @@ $ npm install express-session
## API

```js
var session = require('express-session')
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line yielded the following error.

.../express-session/README.md
  21:5  error  'session' is assigned a value but never used  no-unused-vars

✖ 1 problem (1 error, 0 warnings)

Instead of skipping this, I though it would be ok to expand this introduction usage a bit. What do you think?

Copy link
Member

@UlisesGascon UlisesGascon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for investing time on this @raphendyr ❤️!

@UlisesGascon UlisesGascon merged commit 8e18762 into expressjs:v2 Mar 18, 2025
10 checks passed
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

Successfully merging this pull request may close these issues.

3 participants