elastic / elastic/apm-agent-nodejs

consider adding "no-shadow" eslint rule

Open
#2,580 0 comments 0 reactions 0 assignees View on GitHub
agent-nodejs
Dominant language
JavaScript
Stars
594
Forks
244
Avg merge
1d 8h
Merged PRs (30d)
16

Description

Pre-requisite: moving to eslint instead of standard https://github.com/elastic/apm-agent-nodejs/pull/2579

See https://github.com/elastic/apm-agent-nodejs/pull/2573#discussion_r806320195 for the initial motivation and a start at adding "no-shadow":

```diff
diff --git a/package.json b/package.json
index 4ddb8e38..7c058530 100644
--- a/package.json
+++ b/package.json
@@ -196,7 +196,9 @@
},
"eslintConfig": {
"extends": "standard",
- "rules": {}
+ "rules": {
+ "no-shadow": ["error", { "allow": ["t"] }]
+ }
},
"eslintIgnore": [
"/test/sourcemaps/fixtures/lib",
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.