After make test -j4 I get:
...
Running JS linter...
/Users/martin/projects/node/test/tmp.1/䏿–‡ç›®å½•/file.js
1:1 error Use the global form of 'use strict' strict
1:1 error Mandatory module "common" must be loaded node-core/required-modules
1:21 error Newline required at end of file but not found eol-last
✖ 3 problems (3 errors, 0 warnings)
1 error, 0 warnings potentially fixable with the `--fix` option.
make[3]: *** [lint-js] Error 1
...
Seems like failed cleaning after test/parallel/test-require-unicode.js
cc @nodejs/testing
If we cannot guarantee the clean test folder before linting, maybe it is worth to add a glob for temp folders to .eslintignore?
Adding
process.on('exit', function () {
fs.unlinkSync(dirname);
fs.unlinkSync(path.join(dirname, 'file.js'));
fs.unlinkSync(path.join(dirname, 'package.json'));
});
or
tmpdir.refresh();
at the end of test/parallel/test-require-unicode.js does not help
Current code base uses .tmp (with the leading .) as the prefix for the tmp directory and not tmp. That directory is leftover from a run with an older code base.
rm -rf test/tmp* and try again. That should fix it. Files in .tmp* directories are ignored by the linter.
If we cannot guarantee the clean test folder before linting, maybe it is worth to add a glob for temp folders to .eslintignore?
Not needed. ESLint ignore directories that start with . by default although I'm not sure it's documented. See https://github.com/eslint/eslint/issues/8429.
@Trott Thanks!
rm -rf test/tmp* fixed that for me
Most helpful comment
Current code base uses
.tmp(with the leading.) as the prefix for the tmp directory and nottmp. That directory is leftover from a run with an older code base.rm -rf test/tmp*and try again. That should fix it. Files in.tmp*directories are ignored by the linter.