Skip to content

Commit 62e2c41

Browse files
committed
tools: move ESLint to tools/eslint
Greatly simplify how ESLint and its plugins are installed.
1 parent 94c8178 commit 62e2c41

File tree

3,998 files changed

+29391
-26706
lines changed

Some content is hidden

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

3,998 files changed

+29391
-26706
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ indent_size = unset
2323
indent_style = unset
2424
trim_trailing_whitespace = unset
2525

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

.github/workflows/build-tarball.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
echo "TAR_DIR=$RUNNER_TEMP/`basename tarballs/*.tar.gz .tar.gz`" >> $GITHUB_ENV
9797
- name: Copy directories needed for testing
9898
run: |
99-
cp -r tools/node_modules $TAR_DIR/tools
99+
cp -r tools/eslint $TAR_DIR/tools
100100
cp -r tools/eslint-rules $TAR_DIR/tools
101101
- name: Build
102102
run: |

LICENSE

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

2006-
- ESLint, located at tools/node_modules/eslint, is licensed as follows:
2006+
- ESLint, located at tools/eslint/node_modules/eslint, is licensed as follows:
20072007
"""
20082008
Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
20092009

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ $(TARBALL): release-only doc-only
11911191
$(RM) -r $(TARNAME)/tools/eslint
11921192
$(RM) -r $(TARNAME)/tools/eslint-rules
11931193
$(RM) -r $(TARNAME)/tools/license-builder.sh
1194-
$(RM) -r $(TARNAME)/tools/node_modules
1194+
$(RM) -r $(TARNAME)/tools/eslint/node_modules
11951195
$(RM) -r $(TARNAME)/tools/osx-*
11961196
$(RM) -r $(TARNAME)/tools/osx-pkg.pmdoc
11971197
find $(TARNAME)/deps/v8/test/* -type d ! -regex '.*/test/torque$$' | xargs $(RM) -r
@@ -1377,7 +1377,7 @@ format-md:
13771377

13781378
LINT_JS_TARGETS = eslint.config.mjs benchmark doc lib test tools
13791379

1380-
run-lint-js = tools/node_modules/eslint/bin/eslint.js --cache \
1380+
run-lint-js = tools/eslint/node_modules/eslint/bin/eslint.js --cache \
13811381
--max-warnings=0 --report-unused-disable-directives $(LINT_JS_TARGETS)
13821382
run-lint-js-fix = $(run-lint-js) --fix
13831383

@@ -1401,7 +1401,7 @@ lint-js lint-js-doc:
14011401
jslint: lint-js
14021402
$(warning Please use lint-js instead of jslint)
14031403

1404-
run-lint-js-ci = tools/node_modules/eslint/bin/eslint.js \
1404+
run-lint-js-ci = tools/eslint/node_modules/eslint/bin/eslint.js \
14051405
--max-warnings=0 --report-unused-disable-directives -f tap \
14061406
-o test-eslint.tap $(LINT_JS_TARGETS)
14071407

@@ -1561,7 +1561,7 @@ lint-yaml:
15611561

15621562
.PHONY: lint
15631563
.PHONY: lint-ci
1564-
ifneq ("","$(wildcard tools/node_modules/eslint/)")
1564+
ifneq ("","$(wildcard tools/eslint/node_modules/eslint/)")
15651565
lint: ## Run JS, C++, MD and doc linters.
15661566
@EXIT_STATUS=0 ; \
15671567
$(MAKE) lint-js || EXIT_STATUS=$$? ; \

benchmark/misc/startup-cli-version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const path = require('path');
1111
// indispensible part of the CLI.
1212
// NOTE: not all tools are present in tarball hence need to filter
1313
const availableCli = [
14-
'tools/node_modules/eslint/bin/eslint.js',
14+
'tools/eslint/node_modules/eslint/bin/eslint.js',
1515
'deps/npm/bin/npx-cli.js',
1616
'deps/npm/bin/npm-cli.js',
1717
'deps/corepack/dist/corepack.js',

doc/contributing/collaborator-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ might impact an LTS release.
855855
| `src/node_api.*` | @nodejs/node-api |
856856
| `src/node_crypto.*`, `src/crypto` | @nodejs/crypto |
857857
| `test/*` | @nodejs/testing |
858-
| `tools/node_modules/eslint`, `eslint.config.mjs` | @nodejs/linting |
858+
| `tools/eslint`, `eslint.config.mjs` | @nodejs/linting |
859859
| build | @nodejs/build |
860860
| `src/module_wrap.*`, `lib/internal/modules/*`, `lib/internal/vm/module.js` | @nodejs/modules |
861861
| GYP | @nodejs/gyp |

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exclude = [
44
"tools/cpplint.py",
55
"tools/gyp",
66
"tools/inspector_protocol",
7-
"tools/node_modules",
7+
"tools/eslint/node_modules",
88
]
99
line-length = 172
1010
target-version = "py37"

test/common/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ Skip the rest of the tests if the current terminal is a dumb terminal
472472
### `skipIfEslintMissing()`
473473

474474
Skip the rest of the tests in the current file when `ESLint` is not available
475-
at `tools/node_modules/eslint`
475+
at `tools/eslint/node_modules/eslint`
476476

477477
### `skipIfInspectorDisabled()`
478478

test/common/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ function hasMultiLocalhost() {
499499

500500
function skipIfEslintMissing() {
501501
if (!fs.existsSync(
502-
path.join(__dirname, '..', '..', 'tools', 'node_modules', 'eslint'),
502+
path.join(__dirname, '..', '..', 'tools', 'eslint', 'node_modules', 'eslint'),
503503
)) {
504504
skip('missing ESLint');
505505
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if ((!common.hasCrypto) || (!common.hasIntl)) {
66
}
77
common.skipIfEslintMissing();
88

9-
const RuleTester = require('../../tools/node_modules/eslint').RuleTester;
9+
const RuleTester = require('../../tools/eslint/node_modules/eslint').RuleTester;
1010
const rule = require('../../tools/eslint-rules/alphabetize-errors');
1111

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

0 commit comments

Comments
 (0)