Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b764269

Browse filesBrowse files
aduh95danielleadams
authored andcommitted
lib: remove v8_prof_polyfill from eslint ignore list
PR-URL: #36537 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent fa54f01 commit b764269
Copy full SHA for b764269

File tree

Expand file treeCollapse file tree

2 files changed

+16
-15
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+16
-15
lines changed
Open diff view settings
Collapse file

‎.eslintignore‎

Copy file name to clipboardExpand all lines: .eslintignore
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
node_modules
2-
lib/internal/v8_prof_polyfill.js
32
lib/punycode.js
43
test/addons/??_*
54
test/fixtures
Collapse file

‎lib/internal/v8_prof_polyfill.js‎

Copy file name to clipboardExpand all lines: lib/internal/v8_prof_polyfill.js
+16-14Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@
2525
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2626
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727

28-
/* eslint-disable no-restricted-globals */
28+
'use strict';
29+
30+
/* eslint-disable node-core/prefer-primordials */
31+
/* global Buffer, console */
2932

3033
module.exports = { versionCheck };
3134

@@ -37,7 +40,7 @@ if (module.id === 'internal/v8_prof_polyfill') return;
3740
// Node polyfill
3841
const fs = require('fs');
3942
const cp = require('child_process');
40-
const os = {
43+
const os = { // eslint-disable-line no-unused-vars
4144
system: function(name, args) {
4245
if (process.platform === 'linux' && name === 'nm') {
4346
// Filter out vdso and vsyscall entries.
@@ -51,28 +54,29 @@ const os = {
5154
let out = cp.spawnSync(name, args).stdout.toString();
5255
// Auto c++filt names, but not [iItT]
5356
if (process.platform === 'darwin' && name === 'nm') {
54-
// nm prints an error along the lines of "Run xcodebuild -license" and
57+
// `nm` prints an error along the lines of "Run xcodebuild -license" and
5558
// exits when Xcode hasn't been properly installed or when its license
5659
// hasn't been accepted yet. Basically any mention of xcodebuild in
5760
// the output means the nm command is non-functional.
5861
const match = out.match(/(?:^|\n)([^\n]*xcodebuild[^\n]*)(?:\n|$)/);
62+
// eslint-disable-next-line no-restricted-syntax
5963
if (match) throw new Error(match[1]);
6064
out = macCppfiltNm(out);
6165
}
6266
return out;
6367
}
6468
};
65-
const print = console.log;
66-
function read(fileName) {
69+
const print = console.log; // eslint-disable-line no-unused-vars
70+
function read(fileName) { // eslint-disable-line no-unused-vars
6771
return fs.readFileSync(fileName, 'utf8');
6872
}
69-
const quit = process.exit;
73+
const quit = process.exit; // eslint-disable-line no-unused-vars
7074

7175
// Polyfill "readline()".
72-
const logFile = arguments[arguments.length - 1];
76+
const logFile = arguments[arguments.length - 1]; // eslint-disable-line no-undef
7377
try {
7478
fs.accessSync(logFile);
75-
} catch(e) {
79+
} catch {
7680
console.error('Please provide a valid isolate file as the final argument.');
7781
process.exit(1);
7882
}
@@ -121,8 +125,8 @@ function versionCheck(firstLine, expected) {
121125
// whereas process.versions.v8 is either "$major.$minor.$build-$embedder" or
122126
// "$major.$minor.$build.$patch-$embedder".
123127
firstLine = firstLine.split(',');
124-
const curVer = expected.split(/[.\-]/);
125-
if (firstLine.length !== 6 && firstLine.length !== 7 ||
128+
const curVer = expected.split(/[.-]/);
129+
if ((firstLine.length !== 6 && firstLine.length !== 7) ||
126130
firstLine[0] !== 'v8-version') {
127131
return 'Unable to read v8-version from log file.';
128132
}
@@ -140,13 +144,11 @@ function macCppfiltNm(out) {
140144
if (entries === null)
141145
return out;
142146

143-
entries = entries.map((entry) => {
144-
return entry.replace(CLEAN_RE, '')
145-
});
147+
entries = entries.map((entry) => entry.replace(CLEAN_RE, ''));
146148

147149
let filtered;
148150
try {
149-
filtered = cp.spawnSync('c++filt', [ '-p' , '-i' ], {
151+
filtered = cp.spawnSync('c++filt', [ '-p', '-i' ], {
150152
input: entries.join('\n')
151153
}).stdout.toString();
152154
} catch {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.