Skip to content

Commit

Permalink
tools: move eslint from tools to tools/node_modules
Browse files Browse the repository at this point in the history
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: nodejs#17755
PR-URL: nodejs#17820
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
  • Loading branch information
targos committed Jan 11, 2018
1 parent a2c7085 commit 3dc3063
Show file tree
Hide file tree
Showing 2,582 changed files with 72 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ end_of_line = ignore
trim_trailing_whitespace = ignore
charset = ignore

[{test/fixtures,deps,tools/eslint,tools/gyp,tools/icu,tools/msvs}/**]
[{test/fixtures,deps,tools/node_modules,tools/gyp,tools/icu,tools/msvs}/**]
insert_final_newline = false
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test/addons/??_*
test/es-module/test-esm-dynamic-import.js
test/fixtures
test/message/esm_display_syntax_error.mjs
tools/eslint
tools/node_modules
tools/icu
tools/remark-*
node_modules
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.*
!deps/**/.*
!test/fixtures/**/.*
!tools/eslint/**/.*
!tools/node_modules/**/.*
!tools/doc/node_modules/**/.*
!.editorconfig
!.eslintignore
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ The externally maintained libraries used by Node.js are:
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""

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

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ $(TARBALL): release-only $(NODE_EXE) doc
$(RM) -r $(TARNAME)/deps/openssl/openssl/{doc,demos,test}
$(RM) -r $(TARNAME)/deps/zlib/contrib # too big, unused
$(RM) -r $(TARNAME)/.{editorconfig,git*,mailmap}
$(RM) -r $(TARNAME)/tools/{eslint,eslint-rules,osx-pkg.pmdoc,pkgsrc,remark-cli,remark-preset-lint-node}
$(RM) -r $(TARNAME)/tools/{eslint-rules,node_modules,osx-pkg.pmdoc,pkgsrc,remark-cli,remark-preset-lint-node}
$(RM) -r $(TARNAME)/tools/{osx-*,license-builder.sh,cpplint.py}
$(RM) -r $(TARNAME)/test*.tap
find $(TARNAME)/ -name ".eslint*" -maxdepth 2 | xargs $(RM)
Expand Down Expand Up @@ -1116,7 +1116,7 @@ lint-md:
endif

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

Expand Down Expand Up @@ -1207,7 +1207,7 @@ cpplint: lint-cpp

.PHONY: lint
.PHONY: lint-ci
ifneq ("","$(wildcard tools/eslint/)")
ifneq ("","$(wildcard tools/node_modules/eslint/)")
lint: ## Run JS, C++, MD and doc linters.
@EXIT_STATUS=0 ; \
$(MAKE) lint-js || EXIT_STATUS=$$? ; \
Expand Down
78 changes: 39 additions & 39 deletions doc/onboarding-extras.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,45 @@

## Who to CC in issues

| Subsystem | Maintainers |
| --- | --- |
| `benchmark/*` | @nodejs/benchmarking, @mscdex |
| `bootstrap_node.js` | @fishrock123 |
| `doc/*`, `*.md` | @nodejs/documentation |
| `lib/assert` | @nodejs/testing |
| `lib/async_hooks` | @nodejs/async\_hooks for bugs/reviews (+ @nodejs/diagnostics for API) |
| `lib/buffer` | @nodejs/buffer |
| `lib/child_process` | @bnoordhuis, @cjihrig |
| `lib/cluster` | @bnoordhuis, @cjihrig, @mcollina |
| `lib/{crypto,tls,https}` | @nodejs/crypto |
| `lib/dgram` | @cjihrig, @mcollina |
| `lib/domains` | @misterdjules |
| `lib/fs`, `src/{fs,file}` | @nodejs/fs |
| `lib/{_}http{*}` | @nodejs/http |
| `lib/inspector.js`, `src/inspector_*` | @nodejs/v8-inspector |
| `lib/internal/url`, `src/node_url` | @nodejs/url |
| `lib/net` | @bnoordhuis, @indutny, @nodejs/streams |
| `lib/repl` | @addaleax, @fishrock123 |
| `lib/{_}stream{*}` | @nodejs/streams |
| `lib/timers` | @fishrock123, @misterdjules |
| `lib/util` | @bnoordhuis, @cjihrig, @evanlucas |
| `lib/zlib` | @addaleax, @bnoordhuis, @indutny |
| `src/async-wrap.*` | @nodejs/async\_hooks |
| `src/node_api.*` | @nodejs/n-api |
| `src/node_crypto.*` | @nodejs/crypto |
| `test/*` | @nodejs/testing |
| `tools/eslint`, `.eslintrc` | @not-an-aardvark, @silverwind, @trott |
| build | @nodejs/build |
| ES Modules | @bmeck, @Fishrock123, @guybedford, @MylesBorins, @targos |
| GYP | @nodejs/gyp |
| performance | @nodejs/performance |
| platform specific | @nodejs/platform-{aix,arm,freebsd,macos,ppc,smartos,s390,windows} |
| python code | @nodejs/python |
| upgrading c-ares | @jbergstroem |
| upgrading http-parser | @jbergstroem, @nodejs/http |
| upgrading libuv | @saghul |
| upgrading npm | @fishrock123, @MylesBorins |
| upgrading V8 | @nodejs/v8, @nodejs/post-mortem |
| Subsystem | Maintainers |
| --- | --- |
| `benchmark/*` | @nodejs/benchmarking, @mscdex |
| `bootstrap_node.js` | @fishrock123 |
| `doc/*`, `*.md` | @nodejs/documentation |
| `lib/assert` | @nodejs/testing |
| `lib/async_hooks` | @nodejs/async\_hooks for bugs/reviews (+ @nodejs/diagnostics for API) |
| `lib/buffer` | @nodejs/buffer |
| `lib/child_process` | @bnoordhuis, @cjihrig |
| `lib/cluster` | @bnoordhuis, @cjihrig, @mcollina |
| `lib/{crypto,tls,https}` | @nodejs/crypto |
| `lib/dgram` | @cjihrig, @mcollina |
| `lib/domains` | @misterdjules |
| `lib/fs`, `src/{fs,file}` | @nodejs/fs |
| `lib/{_}http{*}` | @nodejs/http |
| `lib/inspector.js`, `src/inspector_*` | @nodejs/v8-inspector |
| `lib/internal/url`, `src/node_url` | @nodejs/url |
| `lib/net` | @bnoordhuis, @indutny, @nodejs/streams |
| `lib/repl` | @addaleax, @fishrock123 |
| `lib/{_}stream{*}` | @nodejs/streams |
| `lib/timers` | @fishrock123, @misterdjules |
| `lib/util` | @bnoordhuis, @cjihrig, @evanlucas |
| `lib/zlib` | @addaleax, @bnoordhuis, @indutny |
| `src/async-wrap.*` | @nodejs/async\_hooks |
| `src/node_api.*` | @nodejs/n-api |
| `src/node_crypto.*` | @nodejs/crypto |
| `test/*` | @nodejs/testing |
| `tools/node_modules/eslint`, `.eslintrc` | @not-an-aardvark, @silverwind, @trott |
| build | @nodejs/build |
| ES Modules | @bmeck, @Fishrock123, @guybedford, @MylesBorins, @targos |
| GYP | @nodejs/gyp |
| performance | @nodejs/performance |
| platform specific | @nodejs/platform-{aix,arm,freebsd,macos,ppc,smartos,s390,windows} |
| python code | @nodejs/python |
| upgrading c-ares | @jbergstroem |
| upgrading http-parser | @jbergstroem, @nodejs/http |
| upgrading libuv | @saghul |
| upgrading npm | @fishrock123, @MylesBorins |
| upgrading V8 | @nodejs/v8, @nodejs/post-mortem |

When things need extra attention, are controversial, or `semver-major`:
@nodejs/tsc
Expand Down
4 changes: 2 additions & 2 deletions test/doctool/test-doctool-html.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict';

const common = require('../common');
// The doctool currently uses js-yaml from the tool/eslint/ tree.
// The doctool currently uses js-yaml from the tool/node_modules/eslint/ tree.
try {
require('../../tools/eslint/node_modules/js-yaml');
require('../../tools/node_modules/eslint/node_modules/js-yaml');
} catch (e) {
common.skip('missing js-yaml (eslint not present)');
}
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-eslint-alphabetize-errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require('../common');

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

new RuleTester().run('alphabetize-errors', rule, {
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-eslint-buffer-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require('../common');

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

const message = 'Use of the Buffer() constructor has been deprecated. ' +
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-eslint-crypto-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require('../common');

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

const message = 'Please add a hasCrypto check to allow this test to be ' +
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-eslint-documented-errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require('../common');

const RuleTester = require('../../tools/eslint').RuleTester;
const RuleTester = require('../../tools/node_modules/eslint').RuleTester;
const rule = require('../../tools/eslint-rules/documented-errors');

const invalidCode = 'UNDOCUMENTED ERROR CODE';
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-eslint-inspector-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require('../common');

const RuleTester = require('../../tools/eslint').RuleTester;
const RuleTester = require('../../tools/node_modules/eslint').RuleTester;
const rule = require('../../tools/eslint-rules/inspector-check');

const message = 'Please add a skipIfInspectorDisabled() call to allow this ' +
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-eslint-lowercase-name-for-primitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require('../common');

const RuleTester = require('../../tools/eslint').RuleTester;
const RuleTester = require('../../tools/node_modules/eslint').RuleTester;
const rule = require('../../tools/eslint-rules/lowercase-name-for-primitive');

const valid = [
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-eslint-no-let-in-for-declaration.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require('../common');

const RuleTester = require('../../tools/eslint').RuleTester;
const RuleTester = require('../../tools/node_modules/eslint').RuleTester;
const rule = require('../../tools/eslint-rules/no-let-in-for-declaration');

const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 6 } });
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-eslint-no-unescaped-regexp-dot.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require('../common');

const RuleTester = require('../../tools/eslint').RuleTester;
const RuleTester = require('../../tools/node_modules/eslint').RuleTester;
const rule = require('../../tools/eslint-rules/no-unescaped-regexp-dot');

new RuleTester().run('no-unescaped-regexp-dot', rule, {
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-eslint-number-isnan.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require('../common');

const RuleTester = require('../../tools/eslint').RuleTester;
const RuleTester = require('../../tools/node_modules/eslint').RuleTester;
const rule = require('../../tools/eslint-rules/number-isnan');

const message = 'Please use Number.isNaN instead of the global isNaN function';
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-eslint-prefer-assert-iferror.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require('../common');

const RuleTester = require('../../tools/eslint').RuleTester;
const RuleTester = require('../../tools/node_modules/eslint').RuleTester;
const rule = require('../../tools/eslint-rules/prefer-assert-iferror');

new RuleTester().run('prefer-assert-iferror', rule, {
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-eslint-prefer-assert-methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require('../common');

const RuleTester = require('../../tools/eslint').RuleTester;
const RuleTester = require('../../tools/node_modules/eslint').RuleTester;
const rule = require('../../tools/eslint-rules/prefer-assert-methods');

new RuleTester().run('prefer-assert-methods', rule, {
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-eslint-prefer-common-expectserror.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require('../common');

const RuleTester = require('../../tools/eslint').RuleTester;
const RuleTester = require('../../tools/node_modules/eslint').RuleTester;
const rule = require('../../tools/eslint-rules/prefer-common-expectserror');

const message = 'Please use common.expectsError(fn, err) instead of ' +
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-eslint-prefer-common-mustnotcall.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require('../common');

const RuleTester = require('../../tools/eslint').RuleTester;
const RuleTester = require('../../tools/node_modules/eslint').RuleTester;
const rule = require('../../tools/eslint-rules/prefer-common-mustnotcall');

const message = 'Please use common.mustNotCall(msg) instead of ' +
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-eslint-prefer-util-format-errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

require('../common');

const RuleTester = require('../../tools/eslint').RuleTester;
const RuleTester = require('../../tools/node_modules/eslint').RuleTester;
const rule = require('../../tools/eslint-rules/prefer-util-format-errors');

new RuleTester({ parserOptions: { ecmaVersion: 6 } })
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-eslint-require-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require('../common');

const RuleTester = require('../../tools/eslint').RuleTester;
const RuleTester = require('../../tools/node_modules/eslint').RuleTester;
const rule = require('../../tools/eslint-rules/require-buffer');
const ruleTester = new RuleTester({
parserOptions: { ecmaVersion: 6 },
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-eslint-required-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require('../common');

const RuleTester = require('../../tools/eslint').RuleTester;
const RuleTester = require('../../tools/node_modules/eslint').RuleTester;
const rule = require('../../tools/eslint-rules/required-modules');

new RuleTester().run('required-modules', rule, {
Expand Down
1 change: 1 addition & 0 deletions tools/doc/node_modules/js-yaml/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tools/license-builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ addlicense "marked" "tools/doc/node_modules/marked" \
# Testing tools
addlicense "cpplint.py" "tools/cpplint.py" \
"$(sed -e '/^$/,$d' -e 's/^#$//' -e 's/^# //' ${rootdir}/tools/cpplint.py | tail -n +3)"
addlicense "ESLint" "tools/eslint" "$(cat ${rootdir}/tools/eslint/LICENSE)"
addlicense "ESLint" "tools/node_modules/eslint" "$(cat ${rootdir}/tools/node_modules/eslint/LICENSE)"
addlicense "gtest" "deps/gtest" "$(cat ${rootdir}/deps/gtest/LICENSE)"

# nghttp2
Expand Down
4 changes: 2 additions & 2 deletions tools/lint-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const path = require('path');
const fs = require('fs');
const totalCPUs = require('os').cpus().length;

const CLIEngine = require('./eslint').CLIEngine;
const glob = require('./eslint/node_modules/glob');
const CLIEngine = require('eslint').CLIEngine;
const glob = require('eslint/node_modules/glob');

const cliOptions = {
rulePaths: rulesDirs,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 3dc3063

Please sign in to comment.