elastic / elastic/apm-agent-nodejs
consider adding "no-shadow" eslint rule
Open
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
Assessment
This issue has not been assessed yet.