Skip to content

Commit 3dc3063

Browse files
committed
tools: move eslint from tools to tools/node_modules
This is required because we need to add the babel-eslint dependency and it has to be able to resolve "eslint". babel-eslint is required to support future ES features such as async iterators and import.meta. Refs: #17755 PR-URL: #17820 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
1 parent a2c7085 commit 3dc3063

File tree

2,582 files changed

+72
-71
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,582 files changed

+72
-71
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ end_of_line = ignore
3636
trim_trailing_whitespace = ignore
3737
charset = ignore
3838

39-
[{test/fixtures,deps,tools/eslint,tools/gyp,tools/icu,tools/msvs}/**]
39+
[{test/fixtures,deps,tools/node_modules,tools/gyp,tools/icu,tools/msvs}/**]
4040
insert_final_newline = false

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test/addons/??_*
55
test/es-module/test-esm-dynamic-import.js
66
test/fixtures
77
test/message/esm_display_syntax_error.mjs
8-
tools/eslint
8+
tools/node_modules
99
tools/icu
1010
tools/remark-*
1111
node_modules

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.*
33
!deps/**/.*
44
!test/fixtures/**/.*
5-
!tools/eslint/**/.*
5+
!tools/node_modules/**/.*
66
!tools/doc/node_modules/**/.*
77
!.editorconfig
88
!.eslintignore

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ The externally maintained libraries used by Node.js are:
10611061
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10621062
"""
10631063

1064-
- ESLint, located at tools/eslint, is licensed as follows:
1064+
- ESLint, located at tools/node_modules/eslint, is licensed as follows:
10651065
"""
10661066
Copyright JS Foundation and other contributors, https://js.foundation
10671067

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ $(TARBALL): release-only $(NODE_EXE) doc
914914
$(RM) -r $(TARNAME)/deps/openssl/openssl/{doc,demos,test}
915915
$(RM) -r $(TARNAME)/deps/zlib/contrib # too big, unused
916916
$(RM) -r $(TARNAME)/.{editorconfig,git*,mailmap}
917-
$(RM) -r $(TARNAME)/tools/{eslint,eslint-rules,osx-pkg.pmdoc,pkgsrc,remark-cli,remark-preset-lint-node}
917+
$(RM) -r $(TARNAME)/tools/{eslint-rules,node_modules,osx-pkg.pmdoc,pkgsrc,remark-cli,remark-preset-lint-node}
918918
$(RM) -r $(TARNAME)/tools/{osx-*,license-builder.sh,cpplint.py}
919919
$(RM) -r $(TARNAME)/test*.tap
920920
find $(TARNAME)/ -name ".eslint*" -maxdepth 2 | xargs $(RM)
@@ -1116,7 +1116,7 @@ lint-md:
11161116
endif
11171117

11181118
LINT_JS_TARGETS = benchmark doc lib test tools
1119-
LINT_JS_CMD = tools/eslint/bin/eslint.js --cache \
1119+
LINT_JS_CMD = tools/node_modules/eslint/bin/eslint.js --cache \
11201120
--rulesdir=tools/eslint-rules --ext=.js,.mjs,.md \
11211121
$(LINT_JS_TARGETS)
11221122

@@ -1207,7 +1207,7 @@ cpplint: lint-cpp
12071207

12081208
.PHONY: lint
12091209
.PHONY: lint-ci
1210-
ifneq ("","$(wildcard tools/eslint/)")
1210+
ifneq ("","$(wildcard tools/node_modules/eslint/)")
12111211
lint: ## Run JS, C++, MD and doc linters.
12121212
@EXIT_STATUS=0 ; \
12131213
$(MAKE) lint-js || EXIT_STATUS=$$? ; \

doc/onboarding-extras.md

Lines changed: 39 additions & 39 deletions

test/doctool/test-doctool-html.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use strict';
22

33
const common = require('../common');
4-
// The doctool currently uses js-yaml from the tool/eslint/ tree.
4+
// The doctool currently uses js-yaml from the tool/node_modules/eslint/ tree.
55
try {
6-
require('../../tools/eslint/node_modules/js-yaml');
6+
require('../../tools/node_modules/eslint/node_modules/js-yaml');
77
} catch (e) {
88
common.skip('missing js-yaml (eslint not present)');
99
}

test/parallel/test-eslint-alphabetize-errors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require('../common');
44

5-
const RuleTester = require('../../tools/eslint').RuleTester;
5+
const RuleTester = require('../../tools/node_modules/eslint').RuleTester;
66
const rule = require('../../tools/eslint-rules/alphabetize-errors');
77

88
new RuleTester().run('alphabetize-errors', rule, {

test/parallel/test-eslint-buffer-constructor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require('../common');
44

5-
const RuleTester = require('../../tools/eslint').RuleTester;
5+
const RuleTester = require('../../tools/node_modules/eslint').RuleTester;
66
const rule = require('../../tools/eslint-rules/buffer-constructor');
77

88
const message = 'Use of the Buffer() constructor has been deprecated. ' +

test/parallel/test-eslint-crypto-check.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require('../common');
44

5-
const RuleTester = require('../../tools/eslint').RuleTester;
5+
const RuleTester = require('../../tools/node_modules/eslint').RuleTester;
66
const rule = require('../../tools/eslint-rules/crypto-check');
77

88
const message = 'Please add a hasCrypto check to allow this test to be ' +

0 commit comments

Comments
 (0)