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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -6,10 +6,14 @@ plugins:
overrides:
- files: '**/*.md'
processor: 'markdown/markdown'
env:
es2022: true
node: true
rules:
eol-last: error
eqeqeq: ["error", "always", { "null": "ignore" }]
indent: ["error", 2, { "MemberExpression": "off", "SwitchCase": 1 }]
no-mixed-spaces-and-tabs: error
no-trailing-spaces: error
no-unused-vars: [error, { vars: all, args: none, ignoreRestSiblings: true }]
one-var: ["error", { "initialized": "never" }]
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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?

const session = require('express-session')

const app = express()
app.use(session(/* options */))
```

### session(options)