mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
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: https://github.com/nodejs/node/pull/17755 PR-URL: https://github.com/nodejs/node/pull/17820 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
This commit is contained in:
parent
a2c7085dd4
commit
3dc3063275
@ -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
|
||||
|
@ -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
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,7 +2,7 @@
|
||||
.*
|
||||
!deps/**/.*
|
||||
!test/fixtures/**/.*
|
||||
!tools/eslint/**/.*
|
||||
!tools/node_modules/**/.*
|
||||
!tools/doc/node_modules/**/.*
|
||||
!.editorconfig
|
||||
!.eslintignore
|
||||
|
2
LICENSE
2
LICENSE
@ -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
|
||||
|
||||
|
6
Makefile
6
Makefile
@ -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)
|
||||
@ -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)
|
||||
|
||||
@ -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=$$? ; \
|
||||
|
@ -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
|
||||
|
@ -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)');
|
||||
}
|
||||
|
@ -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, {
|
||||
|
@ -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. ' +
|
||||
|
@ -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 ' +
|
||||
|
@ -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';
|
||||
|
@ -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 ' +
|
||||
|
@ -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 = [
|
||||
|
@ -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 } });
|
||||
|
@ -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, {
|
||||
|
@ -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';
|
||||
|
@ -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, {
|
||||
|
@ -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, {
|
||||
|
@ -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 ' +
|
||||
|
@ -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 ' +
|
||||
|
@ -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 } })
|
||||
|
@ -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 },
|
||||
|
@ -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, {
|
||||
|
1
tools/doc/node_modules/js-yaml/index.js
generated
vendored
1
tools/doc/node_modules/js-yaml/index.js
generated
vendored
@ -7,6 +7,7 @@ const path = require('path');
|
||||
|
||||
const realJSYaml = path.resolve(
|
||||
__dirname, '..', '..', '..', // tools/
|
||||
'node_modules',
|
||||
'eslint',
|
||||
'node_modules',
|
||||
'js-yaml'
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
0
tools/eslint/LICENSE → tools/node_modules/eslint/LICENSE
generated
vendored
0
tools/eslint/LICENSE → tools/node_modules/eslint/LICENSE
generated
vendored
0
tools/eslint/README.md → tools/node_modules/eslint/README.md
generated
vendored
0
tools/eslint/README.md → tools/node_modules/eslint/README.md
generated
vendored
0
tools/eslint/bin/eslint.js → tools/node_modules/eslint/bin/eslint.js
generated
vendored
0
tools/eslint/bin/eslint.js → tools/node_modules/eslint/bin/eslint.js
generated
vendored
0
tools/eslint/conf/config-schema.js → tools/node_modules/eslint/conf/config-schema.js
generated
vendored
0
tools/eslint/conf/config-schema.js → tools/node_modules/eslint/conf/config-schema.js
generated
vendored
0
tools/eslint/conf/environments.js → tools/node_modules/eslint/conf/environments.js
generated
vendored
0
tools/eslint/conf/environments.js → tools/node_modules/eslint/conf/environments.js
generated
vendored
0
tools/eslint/conf/eslint-all.js → tools/node_modules/eslint/conf/eslint-all.js
generated
vendored
0
tools/eslint/conf/eslint-all.js → tools/node_modules/eslint/conf/eslint-all.js
generated
vendored
0
tools/eslint/lib/api.js → tools/node_modules/eslint/lib/api.js
generated
vendored
0
tools/eslint/lib/api.js → tools/node_modules/eslint/lib/api.js
generated
vendored
0
tools/eslint/lib/ast-utils.js → tools/node_modules/eslint/lib/ast-utils.js
generated
vendored
0
tools/eslint/lib/ast-utils.js → tools/node_modules/eslint/lib/ast-utils.js
generated
vendored
0
tools/eslint/lib/cli-engine.js → tools/node_modules/eslint/lib/cli-engine.js
generated
vendored
0
tools/eslint/lib/cli-engine.js → tools/node_modules/eslint/lib/cli-engine.js
generated
vendored
0
tools/eslint/lib/cli.js → tools/node_modules/eslint/lib/cli.js
generated
vendored
0
tools/eslint/lib/cli.js → tools/node_modules/eslint/lib/cli.js
generated
vendored
0
tools/eslint/lib/config.js → tools/node_modules/eslint/lib/config.js
generated
vendored
0
tools/eslint/lib/config.js → tools/node_modules/eslint/lib/config.js
generated
vendored
0
tools/eslint/lib/config/plugins.js → tools/node_modules/eslint/lib/config/plugins.js
generated
vendored
0
tools/eslint/lib/config/plugins.js → tools/node_modules/eslint/lib/config/plugins.js
generated
vendored
0
tools/eslint/lib/file-finder.js → tools/node_modules/eslint/lib/file-finder.js
generated
vendored
0
tools/eslint/lib/file-finder.js → tools/node_modules/eslint/lib/file-finder.js
generated
vendored
0
tools/eslint/lib/formatters/tap.js → tools/node_modules/eslint/lib/formatters/tap.js
generated
vendored
0
tools/eslint/lib/formatters/tap.js → tools/node_modules/eslint/lib/formatters/tap.js
generated
vendored
0
tools/eslint/lib/ignored-paths.js → tools/node_modules/eslint/lib/ignored-paths.js
generated
vendored
0
tools/eslint/lib/ignored-paths.js → tools/node_modules/eslint/lib/ignored-paths.js
generated
vendored
0
tools/eslint/lib/linter.js → tools/node_modules/eslint/lib/linter.js
generated
vendored
0
tools/eslint/lib/linter.js → tools/node_modules/eslint/lib/linter.js
generated
vendored
0
tools/eslint/lib/load-rules.js → tools/node_modules/eslint/lib/load-rules.js
generated
vendored
0
tools/eslint/lib/load-rules.js → tools/node_modules/eslint/lib/load-rules.js
generated
vendored
0
tools/eslint/lib/logging.js → tools/node_modules/eslint/lib/logging.js
generated
vendored
0
tools/eslint/lib/logging.js → tools/node_modules/eslint/lib/logging.js
generated
vendored
0
tools/eslint/lib/options.js → tools/node_modules/eslint/lib/options.js
generated
vendored
0
tools/eslint/lib/options.js → tools/node_modules/eslint/lib/options.js
generated
vendored
0
tools/eslint/lib/rules.js → tools/node_modules/eslint/lib/rules.js
generated
vendored
0
tools/eslint/lib/rules.js → tools/node_modules/eslint/lib/rules.js
generated
vendored
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user