Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: move eslint and install babel-eslint #17820

Merged
merged 4 commits into from
Jan 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
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
4 changes: 3 additions & 1 deletion .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ env:
node: true
es6: true

parser: babel-eslint

parserOptions:
ecmaVersion: 2017
sourceType: script

overrides:
- files: ["doc/api/esm.md", "*.mjs", "test/es-module/test-esm-example-loader.js"]
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
28 changes: 27 additions & 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 All @@ -1084,6 +1084,32 @@ The externally maintained libraries used by Node.js are:
THE SOFTWARE.
"""

- babel-eslint, located at tools/node_modules/babel-eslint, is licensed as follows:
"""
Copyright (c) 2014-2016 Sebastian McKenzie <[email protected]>

MIT License

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""

- gtest, located at deps/gtest, is licensed as follows:
"""
Copyright 2008, Google Inc.
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.

Loading