Commit 485bf9b
committed
bench: migrate custom ESLint rules to modern APIs
Replace deprecated ESLint rule APIs with their modern equivalents
to prepare for the ESLint v9 migration (see [1][2]):
- `context.getSourceCode()` → `context.sourceCode` (100 files)
- `context.getScope()` → `sourceCode.getScope(node)` (4 files)
The `context.getSourceCode()` method was deprecated in ESLint v8.40.0
in favor of the `context.sourceCode` property. The `context.getScope()`
method was deprecated in ESLint v8.38.0 in favor of
`sourceCode.getScope(node)`, which takes an explicit node argument
rather than relying on implicit traversal state.
For `no-builtin-big-int`, the scope acquisition was moved from the
`create` function (which previously captured the global scope once)
into the `CallExpression` visitor, and `isImportedBigInt` was updated
to walk up the scope chain to find `BigInt` declarations in outer
scopes.
Also fixes pre-existing lint violations in touched files:
- Move `copyLocationInfo`, `locationInfo`, `checkComment`,
`extractPackagePath`, `getAlias`, and `sortExpressions` from nested
functions to module scope
- Replace `.toUpperCase()`, `.toLowerCase()`, `.trim()` with stdlib
equivalents
- Fix variable declaration ordering
No other deprecated APIs (`context.getAncestors`,
`context.getDeclaredVariables`, `context.markVariableAsUsed`,
deprecated comment/token access patterns) were found in the codebase.
All rules with `context.options` already have proper `meta.schema`.
[1]: https://eslint.org/blog/2023/09/preparing-custom-rules-eslint-v9/
[2]: https://eslint.org/docs/latest/use/migrate-to-9.0.0
Ref: stdlib-js/metr-issue-tracker#54
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: na
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: na
- task: lint_javascript_benchmarks
status: na
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---1 parent 51981c7 commit 485bf9b
File tree
103 files changed
+1214
-1198
lines changed- lib/node_modules/@stdlib/_tools/eslint
- rules
- capitalized-comments/lib
- doctest-annotation-spacing/lib
- doctest-marker/lib
- doctest-quote-props/lib
- doctest/lib
- empty-line-before-comment/lib
- eol-open-bracket-spacing/lib
- jsdoc-blockquote-indentation/lib
- jsdoc-checkbox-character-style/lib
- jsdoc-checkbox-content-indent/lib
- jsdoc-code-block-style/lib
- jsdoc-definition-case/lib
- jsdoc-definition-spacing/lib
- jsdoc-doctest-decimal-point/lib
- jsdoc-doctest-marker/lib
- jsdoc-doctest-quote-props/lib
- jsdoc-doctest/lib
- jsdoc-emphasis-marker/lib
- jsdoc-empty-line-before-example/lib
- jsdoc-example-require-spacing/lib
- jsdoc-fenced-code-flag/lib
- jsdoc-fenced-code-marker/lib
- jsdoc-final-definition/lib
- jsdoc-first-heading-level/lib
- jsdoc-hard-break-spaces/lib
- jsdoc-heading-increment/lib
- jsdoc-heading-style/lib
- jsdoc-leading-description-sentence/lib
- jsdoc-license-header-year/lib
- jsdoc-linebreak-style/lib
- jsdoc-link-title-style/lib
- jsdoc-list-item-bullet-indent/lib
- jsdoc-list-item-content-indent/lib
- jsdoc-list-item-indent/lib
- jsdoc-list-item-spacing/lib
- jsdoc-main-export/lib
- jsdoc-markdown-remark/lib
- jsdoc-maximum-heading-length/lib
- jsdoc-maximum-line-length/lib
- jsdoc-no-auto-link-without-protocol/lib
- jsdoc-no-blockquote-without-marker/lib
- jsdoc-no-consecutive-blank-lines/lib
- jsdoc-no-duplicate-definitions/lib
- jsdoc-no-duplicate-headings-in-section/lib
- jsdoc-no-duplicate-headings/lib
- jsdoc-no-duplicate-tags/lib
- jsdoc-no-emphasis-as-heading/lib
- jsdoc-no-empty-url/lib
- jsdoc-no-heading-content-indent/lib
- jsdoc-no-heading-indent/lib
- jsdoc-no-heading-like-paragraph/lib
- jsdoc-no-heading-punctuation/lib
- jsdoc-no-html/lib
- jsdoc-no-inline-padding/lib
- jsdoc-no-literal-urls/lib
- jsdoc-no-missing-blank-lines/lib
- jsdoc-no-multiple-blank-lines/lib
- jsdoc-no-multiple-toplevel-headings/lib
- jsdoc-no-paragraph-content-indent/lib
- jsdoc-no-reference-like-url/lib
- jsdoc-no-shell-dollars/lib
- jsdoc-no-shortcut-reference-image/lib
- jsdoc-no-shortcut-reference-link/lib
- jsdoc-no-space-aligned-asterisks/lib
- jsdoc-no-table-indentation/lib
- jsdoc-no-tabs/lib
- jsdoc-no-undefined-references/lib
- jsdoc-no-unused-definitions/lib
- jsdoc-ordered-list-marker-style/lib
- jsdoc-ordered-list-marker-value/lib
- jsdoc-private-annotation/lib
- jsdoc-require-throws-tags/lib
- jsdoc-rule-style/lib
- jsdoc-strong-marker/lib
- jsdoc-table-cell-padding/lib
- jsdoc-table-pipe-alignment/lib
- jsdoc-table-pipes/lib
- jsdoc-tag-names/lib
- jsdoc-tag-order/lib
- jsdoc-tag-spacing/lib
- jsdoc-typedef-typos/lib
- jsdoc-unordered-list-marker-style/lib
- line-closing-bracket-spacing/lib
- namespace-export-all/lib
- namespace-index-order/lib
- no-builtin-big-int/lib
- no-empty-comments/lib
- no-empty-lines-between-requires/lib
- no-multiple-empty-lines/lib
- no-redeclare/lib
- no-unnecessary-nested-functions/lib
- repl-namespace-order/lib
- require-globals/lib
- require-leading-slash/lib
- require-order/lib
- require-spaces/lib
- section-header-empty-lines/lib
- section-headers/lib
- ternary-condition-parentheses/lib
- tsdoc-declarations-doctest/lib
- uppercase-required-constants/lib
- vars-order/lib
- utils/find-jsdoc/examples
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
103 files changed
+1214
-1198
lines changedLines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | | - | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | | - | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
197 | | - | |
| 198 | + | |
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
Lines changed: 53 additions & 53 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
34 | 86 | | |
35 | 87 | | |
36 | 88 | | |
37 | 89 | | |
38 | 90 | | |
39 | 91 | | |
40 | 92 | | |
41 | | - | |
| 93 | + | |
42 | 94 | | |
43 | 95 | | |
44 | 96 | | |
| |||
93 | 145 | | |
94 | 146 | | |
95 | 147 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
Lines changed: 21 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
46 | 66 | | |
47 | 67 | | |
48 | 68 | | |
| |||
63 | 83 | | |
64 | 84 | | |
65 | 85 | | |
66 | | - | |
| 86 | + | |
67 | 87 | | |
68 | 88 | | |
69 | 89 | | |
| |||
121 | 141 | | |
122 | 142 | | |
123 | 143 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
Lines changed: 21 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
43 | 63 | | |
44 | 64 | | |
45 | 65 | | |
| |||
60 | 80 | | |
61 | 81 | | |
62 | 82 | | |
63 | | - | |
| 83 | + | |
64 | 84 | | |
65 | 85 | | |
66 | 86 | | |
| |||
115 | 135 | | |
116 | 136 | | |
117 | 137 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
Lines changed: 21 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
42 | 62 | | |
43 | 63 | | |
44 | 64 | | |
| |||
57 | 77 | | |
58 | 78 | | |
59 | 79 | | |
60 | | - | |
| 80 | + | |
61 | 81 | | |
62 | 82 | | |
63 | 83 | | |
| |||
112 | 132 | | |
113 | 133 | | |
114 | 134 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
0 commit comments