From b4fea2a3d62da5e2e3f90d7f2109f02f927f7174 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Fri, 21 Apr 2017 22:55:51 +0300 Subject: [PATCH] doc: add eslint-plugin-markdown * install eslint-plugin-markdown * add doc/.eslintrc.yaml * add `` or `` for the rest of problematic code * .js files in doc folder added to .eslintignore * update Makefile and vcbuild.bat PR-URL: https://github.com/nodejs/node/pull/12563 Refs: https://github.com/nodejs/node/pull/12557#issuecomment-296015032 Reviewed-By: Teddy Katz Reviewed-By: James M Snell Reviewed-By: Timothy Gu Reviewed-By: Gibson Fahnestock Reviewed-By: Yuta Hiroto --- .eslintignore | 1 + .eslintrc.yaml | 3 + Makefile | 4 +- doc/.eslintrc.yaml | 5 + doc/api/assert.md | 1 + doc/api/cluster.md | 13 +- doc/api/console.md | 5 +- doc/api/crypto.md | 4 +- doc/api/debugger.md | 1 + doc/api/dns.md | 3 + doc/api/fs.md | 2 +- doc/api/http.md | 3 + doc/api/modules.md | 7 +- doc/api/os.md | 2 + doc/api/process.md | 10 +- doc/api/querystring.md | 1 + doc/api/readline.md | 2 +- doc/api/repl.md | 7 + doc/api/stream.md | 2 +- doc/api/v8.md | 1 + doc/api/zlib.md | 10 +- test/README.md | 1 + tools/eslint/node_modules/.bin/remark | 15 + tools/eslint/node_modules/.bin/remark.cmd | 7 + tools/eslint/node_modules/bail/LICENSE | 22 + tools/eslint/node_modules/bail/history.md | 12 + tools/eslint/node_modules/bail/index.js | 34 + tools/eslint/node_modules/bail/package.json | 138 + tools/eslint/node_modules/bail/readme.md | 73 + tools/eslint/node_modules/ccount/LICENSE | 22 + tools/eslint/node_modules/ccount/history.md | 11 + tools/eslint/node_modules/ccount/index.js | 46 + tools/eslint/node_modules/ccount/package.json | 136 + tools/eslint/node_modules/ccount/readme.md | 57 + .../character-entities-html4/LICENSE | 22 + .../character-entities-html4/index.json | 254 + .../character-entities-html4/package.json | 133 + .../character-entities-html4/readme.md | 52 + .../character-entities-legacy/LICENSE | 22 + .../character-entities-legacy/index.json | 108 + .../character-entities-legacy/package.json | 133 + .../character-entities-legacy/readme.md | 54 + .../node_modules/character-entities/LICENSE | 22 + .../character-entities/index.json | 2224 ++++++ .../character-entities/package.json | 132 + .../node_modules/character-entities/readme.md | 53 + .../character-reference-invalid/LICENSE | 22 + .../character-reference-invalid/index.json | 30 + .../character-reference-invalid/package.json | 136 + .../character-reference-invalid/readme.md | 51 + .../node_modules/collapse-white-space/LICENSE | 22 + .../collapse-white-space/history.md | 16 + .../collapse-white-space/index.js | 27 + .../collapse-white-space/package.json | 136 + .../collapse-white-space/readme.md | 67 + .../eslint-plugin-markdown/LICENSE | 21 + .../eslint-plugin-markdown/README.md | 121 + .../eslint-plugin-markdown/index.js | 8 + .../eslint-plugin-markdown/lib/index.js | 17 + .../eslint-plugin-markdown/lib/processor.js | 151 + .../eslint-plugin-markdown/package.json | 106 + tools/eslint/node_modules/extend/.eslintrc | 192 + tools/eslint/node_modules/extend/.jscs.json | 103 + tools/eslint/node_modules/extend/.npmignore | 1 + tools/eslint/node_modules/extend/.travis.yml | 44 + tools/eslint/node_modules/extend/CHANGELOG.md | 68 + tools/eslint/node_modules/extend/LICENSE | 22 + tools/eslint/node_modules/extend/README.md | 61 + .../eslint/node_modules/extend/component.json | 31 + tools/eslint/node_modules/extend/index.js | 85 + tools/eslint/node_modules/extend/package.json | 108 + .../node_modules/function-bind/.eslintrc | 13 + .../node_modules/function-bind/.jscs.json | 158 + .../node_modules/function-bind/.npmignore | 16 + .../node_modules/function-bind/.travis.yml | 77 + .../eslint/node_modules/function-bind/LICENSE | 19 + .../node_modules/function-bind/README.md | 48 + .../function-bind/implementation.js | 48 + .../node_modules/function-bind/index.js | 3 + .../node_modules/function-bind/package.json | 137 + .../node_modules/function-bind/test/index.js | 250 + tools/eslint/node_modules/has/.jshintrc | 14 + tools/eslint/node_modules/has/.npmignore | 3 + tools/eslint/node_modules/has/LICENSE-MIT | 22 + tools/eslint/node_modules/has/README.mkd | 18 + tools/eslint/node_modules/has/package.json | 95 + tools/eslint/node_modules/has/src/index.js | 3 + tools/eslint/node_modules/has/test/.jshintrc | 7 + tools/eslint/node_modules/has/test/index.js | 10 + .../node_modules/is-alphabetical/LICENSE | 22 + .../node_modules/is-alphabetical/history.md | 6 + .../node_modules/is-alphabetical/index.js | 29 + .../node_modules/is-alphabetical/package.json | 144 + .../node_modules/is-alphabetical/readme.md | 58 + .../node_modules/is-alphanumerical/LICENSE | 22 + .../node_modules/is-alphanumerical/history.md | 6 + .../node_modules/is-alphanumerical/index.js | 29 + .../is-alphanumerical/package.json | 150 + .../node_modules/is-alphanumerical/readme.md | 60 + tools/eslint/node_modules/is-decimal/LICENSE | 22 + .../eslint/node_modules/is-decimal/history.md | 6 + tools/eslint/node_modules/is-decimal/index.js | 28 + .../node_modules/is-decimal/package.json | 145 + .../eslint/node_modules/is-decimal/readme.md | 58 + .../node_modules/is-hexadecimal/LICENSE | 22 + .../node_modules/is-hexadecimal/history.md | 6 + .../node_modules/is-hexadecimal/index.js | 30 + .../node_modules/is-hexadecimal/package.json | 145 + .../node_modules/is-hexadecimal/readme.md | 58 + .../node_modules/longest-streak/LICENSE | 22 + .../node_modules/longest-streak/history.md | 9 + .../node_modules/longest-streak/index.js | 51 + .../node_modules/longest-streak/package.json | 115 + .../node_modules/longest-streak/readme.md | 52 + .../node_modules/markdown-table/History.md | 63 + .../node_modules/markdown-table/LICENSE | 22 + .../node_modules/markdown-table/Readme.md | 132 + .../node_modules/markdown-table/index.js | 284 + .../node_modules/markdown-table/package.json | 104 + .../node_modules/parse-entities/LICENSE | 22 + .../node_modules/parse-entities/history.md | 23 + .../node_modules/parse-entities/index.js | 519 ++ .../node_modules/parse-entities/package.json | 167 + .../node_modules/parse-entities/readme.md | 157 + tools/eslint/node_modules/parse5/LICENSE | 19 + tools/eslint/node_modules/parse5/README.md | 40 + .../node_modules/parse5/lib/common/doctype.js | 137 + .../parse5/lib/common/foreign_content.js | 260 + .../node_modules/parse5/lib/common/html.js | 266 + .../parse5/lib/common/merge_options.js | 13 + .../node_modules/parse5/lib/common/unicode.js | 47 + tools/eslint/node_modules/parse5/lib/index.js | 108 + .../parse5/lib/location_info/parser_mixin.js | 216 + .../lib/location_info/tokenizer_mixin.js | 169 + .../lib/parser/formatting_element_list.js | 167 + .../node_modules/parse5/lib/parser/index.js | 2817 ++++++++ .../parse5/lib/parser/open_element_stack.js | 395 ++ .../node_modules/parse5/lib/parser/stream.js | 139 + .../parse5/lib/sax/dev_null_stream.js | 14 + .../node_modules/parse5/lib/sax/index.js | 230 + .../lib/sax/parser_feedback_simulator.js | 153 + .../parse5/lib/serializer/index.js | 180 + .../parse5/lib/serializer/stream.js | 49 + .../parse5/lib/tokenizer/index.js | 2101 ++++++ .../parse5/lib/tokenizer/named_entity_trie.js | 6 + .../parse5/lib/tokenizer/preprocessor.js | 154 + .../parse5/lib/tree_adapters/default.js | 578 ++ .../parse5/lib/tree_adapters/htmlparser2.js | 327 + tools/eslint/node_modules/parse5/package.json | 149 + .../eslint/node_modules/remark-parse/index.js | 30 + .../remark-parse/lib/block-elements.json | 52 + .../node_modules/remark-parse/lib/defaults.js | 21 + .../remark-parse/lib/escapes.json | 75 + .../node_modules/remark-parse/lib/parser.js | 6318 +++++++++++++++++ .../node_modules/remark-parse/package.json | 117 + .../node_modules/remark-parse/readme.md | 436 ++ .../node_modules/remark-stringify/index.js | 30 + .../remark-stringify/lib/compiler.js | 2629 +++++++ .../remark-stringify/lib/defaults.js | 32 + .../remark-stringify/package.json | 116 + .../node_modules/remark-stringify/readme.md | 209 + tools/eslint/node_modules/remark/cli.js | 11 + tools/eslint/node_modules/remark/index.js | 19 + tools/eslint/node_modules/remark/package.json | 112 + tools/eslint/node_modules/remark/readme.md | 84 + .../eslint/node_modules/repeat-string/LICENSE | 21 + .../node_modules/repeat-string/README.md | 136 + .../node_modules/repeat-string/index.js | 70 + .../node_modules/repeat-string/package.json | 169 + .../node_modules/stringify-entities/LICENSE | 22 + .../stringify-entities/dangerous.json | 10 + .../node_modules/stringify-entities/index.js | 131 + .../stringify-entities/package.json | 151 + .../node_modules/stringify-entities/readme.md | 118 + .../node_modules/trim-trailing-lines/LICENSE | 22 + .../node_modules/trim-trailing-lines/index.js | 15 + .../trim-trailing-lines/package.json | 131 + .../trim-trailing-lines/readme.md | 55 + tools/eslint/node_modules/trim/.npmignore | 4 + tools/eslint/node_modules/trim/History.md | 5 + tools/eslint/node_modules/trim/Makefile | 7 + tools/eslint/node_modules/trim/Readme.md | 69 + tools/eslint/node_modules/trim/component.json | 7 + tools/eslint/node_modules/trim/index.js | 14 + tools/eslint/node_modules/trim/package.json | 79 + tools/eslint/node_modules/trough/LICENSE | 21 + tools/eslint/node_modules/trough/history.md | 6 + tools/eslint/node_modules/trough/index.js | 176 + tools/eslint/node_modules/trough/package.json | 157 + tools/eslint/node_modules/trough/readme.md | 281 + tools/eslint/node_modules/unherit/LICENSE | 21 + tools/eslint/node_modules/unherit/index.js | 67 + .../eslint/node_modules/unherit/package.json | 145 + tools/eslint/node_modules/unherit/readme.md | 66 + tools/eslint/node_modules/unified/LICENSE | 21 + tools/eslint/node_modules/unified/history.md | 85 + tools/eslint/node_modules/unified/index.js | 637 ++ .../eslint/node_modules/unified/package.json | 173 + tools/eslint/node_modules/unified/readme.md | 708 ++ .../unist-util-remove-position/LICENSE | 22 + .../unist-util-remove-position/history.md | 11 + .../unist-util-remove-position/index.js | 42 + .../unist-util-remove-position/package.json | 150 + .../unist-util-remove-position/readme.md | 169 + .../node_modules/unist-util-visit/LICENSE | 22 + .../node_modules/unist-util-visit/index.js | 55 + .../unist-util-visit/package.json | 138 + .../node_modules/unist-util-visit/readme.md | 108 + .../node_modules/vfile-location/LICENSE | 22 + .../node_modules/vfile-location/index.js | 123 + .../node_modules/vfile-location/package.json | 144 + .../node_modules/vfile-location/readme.md | 83 + tools/eslint/node_modules/vfile/LICENSE | 21 + tools/eslint/node_modules/vfile/history.md | 56 + tools/eslint/node_modules/vfile/index.js | 628 ++ tools/eslint/node_modules/vfile/package.json | 130 + tools/eslint/node_modules/vfile/readme.md | 538 ++ tools/icu/README.md | 8 +- vcbuild.bat | 2 +- 219 files changed, 34509 insertions(+), 33 deletions(-) create mode 100644 doc/.eslintrc.yaml create mode 100644 tools/eslint/node_modules/.bin/remark create mode 100644 tools/eslint/node_modules/.bin/remark.cmd create mode 100644 tools/eslint/node_modules/bail/LICENSE create mode 100644 tools/eslint/node_modules/bail/history.md create mode 100644 tools/eslint/node_modules/bail/index.js create mode 100644 tools/eslint/node_modules/bail/package.json create mode 100644 tools/eslint/node_modules/bail/readme.md create mode 100644 tools/eslint/node_modules/ccount/LICENSE create mode 100644 tools/eslint/node_modules/ccount/history.md create mode 100644 tools/eslint/node_modules/ccount/index.js create mode 100644 tools/eslint/node_modules/ccount/package.json create mode 100644 tools/eslint/node_modules/ccount/readme.md create mode 100644 tools/eslint/node_modules/character-entities-html4/LICENSE create mode 100644 tools/eslint/node_modules/character-entities-html4/index.json create mode 100644 tools/eslint/node_modules/character-entities-html4/package.json create mode 100644 tools/eslint/node_modules/character-entities-html4/readme.md create mode 100644 tools/eslint/node_modules/character-entities-legacy/LICENSE create mode 100644 tools/eslint/node_modules/character-entities-legacy/index.json create mode 100644 tools/eslint/node_modules/character-entities-legacy/package.json create mode 100644 tools/eslint/node_modules/character-entities-legacy/readme.md create mode 100644 tools/eslint/node_modules/character-entities/LICENSE create mode 100644 tools/eslint/node_modules/character-entities/index.json create mode 100644 tools/eslint/node_modules/character-entities/package.json create mode 100644 tools/eslint/node_modules/character-entities/readme.md create mode 100644 tools/eslint/node_modules/character-reference-invalid/LICENSE create mode 100644 tools/eslint/node_modules/character-reference-invalid/index.json create mode 100644 tools/eslint/node_modules/character-reference-invalid/package.json create mode 100644 tools/eslint/node_modules/character-reference-invalid/readme.md create mode 100644 tools/eslint/node_modules/collapse-white-space/LICENSE create mode 100644 tools/eslint/node_modules/collapse-white-space/history.md create mode 100644 tools/eslint/node_modules/collapse-white-space/index.js create mode 100644 tools/eslint/node_modules/collapse-white-space/package.json create mode 100644 tools/eslint/node_modules/collapse-white-space/readme.md create mode 100644 tools/eslint/node_modules/eslint-plugin-markdown/LICENSE create mode 100644 tools/eslint/node_modules/eslint-plugin-markdown/README.md create mode 100644 tools/eslint/node_modules/eslint-plugin-markdown/index.js create mode 100644 tools/eslint/node_modules/eslint-plugin-markdown/lib/index.js create mode 100644 tools/eslint/node_modules/eslint-plugin-markdown/lib/processor.js create mode 100644 tools/eslint/node_modules/eslint-plugin-markdown/package.json create mode 100644 tools/eslint/node_modules/extend/.eslintrc create mode 100644 tools/eslint/node_modules/extend/.jscs.json create mode 100644 tools/eslint/node_modules/extend/.npmignore create mode 100644 tools/eslint/node_modules/extend/.travis.yml create mode 100644 tools/eslint/node_modules/extend/CHANGELOG.md create mode 100644 tools/eslint/node_modules/extend/LICENSE create mode 100644 tools/eslint/node_modules/extend/README.md create mode 100644 tools/eslint/node_modules/extend/component.json create mode 100644 tools/eslint/node_modules/extend/index.js create mode 100644 tools/eslint/node_modules/extend/package.json create mode 100644 tools/eslint/node_modules/function-bind/.eslintrc create mode 100644 tools/eslint/node_modules/function-bind/.jscs.json create mode 100644 tools/eslint/node_modules/function-bind/.npmignore create mode 100644 tools/eslint/node_modules/function-bind/.travis.yml create mode 100644 tools/eslint/node_modules/function-bind/LICENSE create mode 100644 tools/eslint/node_modules/function-bind/README.md create mode 100644 tools/eslint/node_modules/function-bind/implementation.js create mode 100644 tools/eslint/node_modules/function-bind/index.js create mode 100644 tools/eslint/node_modules/function-bind/package.json create mode 100644 tools/eslint/node_modules/function-bind/test/index.js create mode 100644 tools/eslint/node_modules/has/.jshintrc create mode 100644 tools/eslint/node_modules/has/.npmignore create mode 100644 tools/eslint/node_modules/has/LICENSE-MIT create mode 100644 tools/eslint/node_modules/has/README.mkd create mode 100644 tools/eslint/node_modules/has/package.json create mode 100644 tools/eslint/node_modules/has/src/index.js create mode 100644 tools/eslint/node_modules/has/test/.jshintrc create mode 100644 tools/eslint/node_modules/has/test/index.js create mode 100644 tools/eslint/node_modules/is-alphabetical/LICENSE create mode 100644 tools/eslint/node_modules/is-alphabetical/history.md create mode 100644 tools/eslint/node_modules/is-alphabetical/index.js create mode 100644 tools/eslint/node_modules/is-alphabetical/package.json create mode 100644 tools/eslint/node_modules/is-alphabetical/readme.md create mode 100644 tools/eslint/node_modules/is-alphanumerical/LICENSE create mode 100644 tools/eslint/node_modules/is-alphanumerical/history.md create mode 100644 tools/eslint/node_modules/is-alphanumerical/index.js create mode 100644 tools/eslint/node_modules/is-alphanumerical/package.json create mode 100644 tools/eslint/node_modules/is-alphanumerical/readme.md create mode 100644 tools/eslint/node_modules/is-decimal/LICENSE create mode 100644 tools/eslint/node_modules/is-decimal/history.md create mode 100644 tools/eslint/node_modules/is-decimal/index.js create mode 100644 tools/eslint/node_modules/is-decimal/package.json create mode 100644 tools/eslint/node_modules/is-decimal/readme.md create mode 100644 tools/eslint/node_modules/is-hexadecimal/LICENSE create mode 100644 tools/eslint/node_modules/is-hexadecimal/history.md create mode 100644 tools/eslint/node_modules/is-hexadecimal/index.js create mode 100644 tools/eslint/node_modules/is-hexadecimal/package.json create mode 100644 tools/eslint/node_modules/is-hexadecimal/readme.md create mode 100644 tools/eslint/node_modules/longest-streak/LICENSE create mode 100644 tools/eslint/node_modules/longest-streak/history.md create mode 100644 tools/eslint/node_modules/longest-streak/index.js create mode 100644 tools/eslint/node_modules/longest-streak/package.json create mode 100644 tools/eslint/node_modules/longest-streak/readme.md create mode 100644 tools/eslint/node_modules/markdown-table/History.md create mode 100644 tools/eslint/node_modules/markdown-table/LICENSE create mode 100644 tools/eslint/node_modules/markdown-table/Readme.md create mode 100644 tools/eslint/node_modules/markdown-table/index.js create mode 100644 tools/eslint/node_modules/markdown-table/package.json create mode 100644 tools/eslint/node_modules/parse-entities/LICENSE create mode 100644 tools/eslint/node_modules/parse-entities/history.md create mode 100644 tools/eslint/node_modules/parse-entities/index.js create mode 100644 tools/eslint/node_modules/parse-entities/package.json create mode 100644 tools/eslint/node_modules/parse-entities/readme.md create mode 100644 tools/eslint/node_modules/parse5/LICENSE create mode 100644 tools/eslint/node_modules/parse5/README.md create mode 100644 tools/eslint/node_modules/parse5/lib/common/doctype.js create mode 100644 tools/eslint/node_modules/parse5/lib/common/foreign_content.js create mode 100644 tools/eslint/node_modules/parse5/lib/common/html.js create mode 100644 tools/eslint/node_modules/parse5/lib/common/merge_options.js create mode 100644 tools/eslint/node_modules/parse5/lib/common/unicode.js create mode 100644 tools/eslint/node_modules/parse5/lib/index.js create mode 100644 tools/eslint/node_modules/parse5/lib/location_info/parser_mixin.js create mode 100644 tools/eslint/node_modules/parse5/lib/location_info/tokenizer_mixin.js create mode 100644 tools/eslint/node_modules/parse5/lib/parser/formatting_element_list.js create mode 100644 tools/eslint/node_modules/parse5/lib/parser/index.js create mode 100644 tools/eslint/node_modules/parse5/lib/parser/open_element_stack.js create mode 100644 tools/eslint/node_modules/parse5/lib/parser/stream.js create mode 100644 tools/eslint/node_modules/parse5/lib/sax/dev_null_stream.js create mode 100644 tools/eslint/node_modules/parse5/lib/sax/index.js create mode 100644 tools/eslint/node_modules/parse5/lib/sax/parser_feedback_simulator.js create mode 100644 tools/eslint/node_modules/parse5/lib/serializer/index.js create mode 100644 tools/eslint/node_modules/parse5/lib/serializer/stream.js create mode 100644 tools/eslint/node_modules/parse5/lib/tokenizer/index.js create mode 100644 tools/eslint/node_modules/parse5/lib/tokenizer/named_entity_trie.js create mode 100644 tools/eslint/node_modules/parse5/lib/tokenizer/preprocessor.js create mode 100644 tools/eslint/node_modules/parse5/lib/tree_adapters/default.js create mode 100644 tools/eslint/node_modules/parse5/lib/tree_adapters/htmlparser2.js create mode 100644 tools/eslint/node_modules/parse5/package.json create mode 100644 tools/eslint/node_modules/remark-parse/index.js create mode 100644 tools/eslint/node_modules/remark-parse/lib/block-elements.json create mode 100644 tools/eslint/node_modules/remark-parse/lib/defaults.js create mode 100644 tools/eslint/node_modules/remark-parse/lib/escapes.json create mode 100644 tools/eslint/node_modules/remark-parse/lib/parser.js create mode 100644 tools/eslint/node_modules/remark-parse/package.json create mode 100644 tools/eslint/node_modules/remark-parse/readme.md create mode 100644 tools/eslint/node_modules/remark-stringify/index.js create mode 100644 tools/eslint/node_modules/remark-stringify/lib/compiler.js create mode 100644 tools/eslint/node_modules/remark-stringify/lib/defaults.js create mode 100644 tools/eslint/node_modules/remark-stringify/package.json create mode 100644 tools/eslint/node_modules/remark-stringify/readme.md create mode 100644 tools/eslint/node_modules/remark/cli.js create mode 100644 tools/eslint/node_modules/remark/index.js create mode 100644 tools/eslint/node_modules/remark/package.json create mode 100644 tools/eslint/node_modules/remark/readme.md create mode 100644 tools/eslint/node_modules/repeat-string/LICENSE create mode 100644 tools/eslint/node_modules/repeat-string/README.md create mode 100644 tools/eslint/node_modules/repeat-string/index.js create mode 100644 tools/eslint/node_modules/repeat-string/package.json create mode 100644 tools/eslint/node_modules/stringify-entities/LICENSE create mode 100644 tools/eslint/node_modules/stringify-entities/dangerous.json create mode 100644 tools/eslint/node_modules/stringify-entities/index.js create mode 100644 tools/eslint/node_modules/stringify-entities/package.json create mode 100644 tools/eslint/node_modules/stringify-entities/readme.md create mode 100644 tools/eslint/node_modules/trim-trailing-lines/LICENSE create mode 100644 tools/eslint/node_modules/trim-trailing-lines/index.js create mode 100644 tools/eslint/node_modules/trim-trailing-lines/package.json create mode 100644 tools/eslint/node_modules/trim-trailing-lines/readme.md create mode 100644 tools/eslint/node_modules/trim/.npmignore create mode 100644 tools/eslint/node_modules/trim/History.md create mode 100644 tools/eslint/node_modules/trim/Makefile create mode 100644 tools/eslint/node_modules/trim/Readme.md create mode 100644 tools/eslint/node_modules/trim/component.json create mode 100644 tools/eslint/node_modules/trim/index.js create mode 100644 tools/eslint/node_modules/trim/package.json create mode 100644 tools/eslint/node_modules/trough/LICENSE create mode 100644 tools/eslint/node_modules/trough/history.md create mode 100644 tools/eslint/node_modules/trough/index.js create mode 100644 tools/eslint/node_modules/trough/package.json create mode 100644 tools/eslint/node_modules/trough/readme.md create mode 100644 tools/eslint/node_modules/unherit/LICENSE create mode 100644 tools/eslint/node_modules/unherit/index.js create mode 100644 tools/eslint/node_modules/unherit/package.json create mode 100644 tools/eslint/node_modules/unherit/readme.md create mode 100644 tools/eslint/node_modules/unified/LICENSE create mode 100644 tools/eslint/node_modules/unified/history.md create mode 100644 tools/eslint/node_modules/unified/index.js create mode 100644 tools/eslint/node_modules/unified/package.json create mode 100644 tools/eslint/node_modules/unified/readme.md create mode 100644 tools/eslint/node_modules/unist-util-remove-position/LICENSE create mode 100644 tools/eslint/node_modules/unist-util-remove-position/history.md create mode 100644 tools/eslint/node_modules/unist-util-remove-position/index.js create mode 100644 tools/eslint/node_modules/unist-util-remove-position/package.json create mode 100644 tools/eslint/node_modules/unist-util-remove-position/readme.md create mode 100644 tools/eslint/node_modules/unist-util-visit/LICENSE create mode 100644 tools/eslint/node_modules/unist-util-visit/index.js create mode 100644 tools/eslint/node_modules/unist-util-visit/package.json create mode 100644 tools/eslint/node_modules/unist-util-visit/readme.md create mode 100644 tools/eslint/node_modules/vfile-location/LICENSE create mode 100644 tools/eslint/node_modules/vfile-location/index.js create mode 100644 tools/eslint/node_modules/vfile-location/package.json create mode 100644 tools/eslint/node_modules/vfile-location/readme.md create mode 100644 tools/eslint/node_modules/vfile/LICENSE create mode 100644 tools/eslint/node_modules/vfile/history.md create mode 100644 tools/eslint/node_modules/vfile/index.js create mode 100644 tools/eslint/node_modules/vfile/package.json create mode 100644 tools/eslint/node_modules/vfile/readme.md diff --git a/.eslintignore b/.eslintignore index 1ccb8f831ba..bd85fff8e42 100644 --- a/.eslintignore +++ b/.eslintignore @@ -7,3 +7,4 @@ test/tmp*/ tools/eslint node_modules benchmark/tmp/ +doc/**/*.js diff --git a/.eslintrc.yaml b/.eslintrc.yaml index de26dadbcc0..4efdc976081 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -1,5 +1,8 @@ root: true +plugins: + - markdown + env: node: true es6: true diff --git a/Makefile b/Makefile index 14fbc3e4274..497ec976eaf 100644 --- a/Makefile +++ b/Makefile @@ -855,8 +855,8 @@ bench-ci: bench jslint: @echo "Running JS linter..." - $(NODE) tools/eslint/bin/eslint.js --cache --rulesdir=tools/eslint-rules \ - benchmark lib test tools + $(NODE) tools/eslint/bin/eslint.js --cache --rulesdir=tools/eslint-rules --ext=.js,.md \ + benchmark doc lib test tools jslint-ci: @echo "Running JS linter..." diff --git a/doc/.eslintrc.yaml b/doc/.eslintrc.yaml new file mode 100644 index 00000000000..b81bec65088 --- /dev/null +++ b/doc/.eslintrc.yaml @@ -0,0 +1,5 @@ +rules: + strict: 0 + no-restricted-properties: 0 + no-undef: 0 + no-unused-vars: 0 diff --git a/doc/api/assert.md b/doc/api/assert.md index 2ab93c8de0f..74fd2a37d07 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -554,6 +554,7 @@ Note that `error` can not be a string. If a string is provided as the second argument, then `error` is assumed to be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes: + ```js // THIS IS A MISTAKE! DO NOT DO THIS! assert.throws(myFunction, 'missing foo', 'did not throw with expected message'); diff --git a/doc/api/cluster.md b/doc/api/cluster.md index 069f9f20031..858c98dab67 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -523,14 +523,11 @@ When any of the workers die the cluster module will emit the `'exit'` event. This can be used to restart the worker by calling `.fork()` again. ```js -cluster.on( - 'exit', - (worker, code, signal) => { - console.log('worker %d died (%s). restarting...', - worker.process.pid, signal || code); - cluster.fork(); - } -); +cluster.on('exit', (worker, code, signal) => { + console.log('worker %d died (%s). restarting...', + worker.process.pid, signal || code); + cluster.fork(); +}); ``` See [child_process event: 'exit'][]. diff --git a/doc/api/console.md b/doc/api/console.md index 900a7aa9c15..1fc034e4f84 100644 --- a/doc/api/console.md +++ b/doc/api/console.md @@ -135,6 +135,7 @@ by extending Node.js' `console` and overriding the `console.assert()` method. In the following example, a simple module is created that extends and overrides the default behavior of `console` in Node.js. + ```js 'use strict'; @@ -142,7 +143,7 @@ the default behavior of `console` in Node.js. // new impl for assert without monkey-patching. const myConsole = Object.create(console, { assert: { - value(assertion, message, ...args) { + value: function assert(assertion, message, ...args) { try { console.assert(assertion, message, ...args); } catch (err) { @@ -276,7 +277,7 @@ prints the result to `stdout`: ```js console.time('100-elements'); -for (let i = 0; i < 100; i++) ; +for (let i = 0; i < 100; i++) {} console.timeEnd('100-elements'); // prints 100-elements: 225.438ms ``` diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 6392491f3a8..fc41123eba3 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -289,7 +289,7 @@ decipher.on('end', () => { }); const encrypted = - 'ca981be48e90867604588e75d04feabb63cc007a8f8ad89b10616ed84d815504'; + 'ca981be48e90867604588e75d04feabb63cc007a8f8ad89b10616ed84d815504'; decipher.write(encrypted, 'hex'); decipher.end(); ``` @@ -314,7 +314,7 @@ const crypto = require('crypto'); const decipher = crypto.createDecipher('aes192', 'a password'); const encrypted = - 'ca981be48e90867604588e75d04feabb63cc007a8f8ad89b10616ed84d815504'; + 'ca981be48e90867604588e75d04feabb63cc007a8f8ad89b10616ed84d815504'; let decrypted = decipher.update(encrypted, 'hex', 'utf8'); decrypted += decipher.final('utf8'); console.log(decrypted); diff --git a/doc/api/debugger.md b/doc/api/debugger.md index 3807f278bdd..090bf7f2a8e 100644 --- a/doc/api/debugger.md +++ b/doc/api/debugger.md @@ -26,6 +26,7 @@ inspection are possible. Inserting the statement `debugger;` into the source code of a script will enable a breakpoint at that position in the code: + ```js // myscript.js global.x = 5; diff --git a/doc/api/dns.md b/doc/api/dns.md index b667d7d6f03..48990b5bc8e 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -293,6 +293,7 @@ function will contain an array of objects with the following properties: For example: + ```js { flags: 's', @@ -352,6 +353,7 @@ be an object with the following properties: * `expire` * `minttl` + ```js { nsname: 'ns.example.com', @@ -382,6 +384,7 @@ be an array of objects with the following properties: * `port` * `name` + ```js { priority: 10, diff --git a/doc/api/fs.md b/doc/api/fs.md index e41b135b6e8..41b01c9c701 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -217,7 +217,7 @@ synchronous counterparts are of this type. For a regular file [`util.inspect(stats)`][] would return a string very similar to this: -```txt +``` Stats { dev: 2114, ino: 48064969, diff --git a/doc/api/http.md b/doc/api/http.md index 3cf80923ddb..ba76269c0a4 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -12,6 +12,7 @@ user is able to stream data. HTTP message headers are represented by an object like this: + ```js { 'content-length': '123', 'content-type': 'text/plain', @@ -34,6 +35,7 @@ property, which is an array of `[key, value, key2, value2, ...]`. For example, the previous message header object might have a `rawHeaders` list like the following: + ```js [ 'ConTent-Length', '123456', 'content-LENGTH', '123', @@ -1460,6 +1462,7 @@ Accept: text/plain\r\n Then `request.url` will be: + ```js '/status?name=ryan' ``` diff --git a/doc/api/modules.md b/doc/api/modules.md index 48a4d1f3cfb..5f1cf96ebb4 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -67,11 +67,7 @@ The module system is implemented in the `require('module')` module. When a file is run directly from Node.js, `require.main` is set to its `module`. That means that you can determine whether a file has been run -directly by testing - -```js -require.main === module; -``` +directly by testing `require.main === module`. For a file `foo.js`, this will be `true` if run via `node foo.js`, but `false` if run by `require('./foo')`. @@ -556,6 +552,7 @@ exports = { hello: false }; // Not exported, only available in the module When the `module.exports` property is being completely replaced by a new object, it is common to also reassign `exports`, for example: + ```js module.exports = exports = function Constructor() { // ... etc. diff --git a/doc/api/os.md b/doc/api/os.md index 44bbe0b4371..b9f2775ce6a 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -71,6 +71,7 @@ The properties included on each object include: For example: + ```js [ { @@ -253,6 +254,7 @@ The properties available on the assigned network address object include: * `scopeid` {number} The numeric IPv6 scope ID (only specified when `family` is `IPv6`) + ```js { lo: [ diff --git a/doc/api/process.md b/doc/api/process.md index 3f7c6d4e5a2..3f853e55116 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -528,7 +528,8 @@ running the `./configure` script. An example of the possible output looks like: -```txt + +```js { target_defaults: { cflags: [], @@ -745,6 +746,7 @@ See environ(7). An example of this object looks like: + ```js { TERM: 'xterm-256color', @@ -832,12 +834,14 @@ $ node --harmony script.js --version Results in `process.execArgv`: + ```js ['--harmony'] ``` And `process.argv`: + ```js ['/usr/local/bin/node', 'script.js', '--version'] ``` @@ -854,6 +858,7 @@ that started the Node.js process. For example: + ```js '/usr/local/bin/node' ``` @@ -1173,6 +1178,7 @@ console.log(process.memoryUsage()); Will generate: + ```js { rss: 4935680, @@ -1344,6 +1350,7 @@ tarball. For example: + ```js { name: 'node', @@ -1705,6 +1712,7 @@ console.log(process.versions); Will generate an object similar to: + ```js { http_parser: '2.3.0', diff --git a/doc/api/querystring.md b/doc/api/querystring.md index d82bf645e45..580ae676bec 100644 --- a/doc/api/querystring.md +++ b/doc/api/querystring.md @@ -59,6 +59,7 @@ collection of key and value pairs. For example, the query string `'foo=bar&abc=xyz&abc=123'` is parsed into: + ```js { foo: 'bar', diff --git a/doc/api/readline.md b/doc/api/readline.md index b4c0df9f43b..2a8c2aed882 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -414,7 +414,7 @@ For instance: `[[substr1, substr2, ...], originalsubstring]`. ```js function completer(line) { const completions = '.help .error .exit .quit .q'.split(' '); - const hits = completions.filter((c) => { return c.indexOf(line) === 0; }); + const hits = completions.filter((c) => c.indexOf(line) === 0); // show all completions if none found return [hits.length ? hits : completions, line]; } diff --git a/doc/api/repl.md b/doc/api/repl.md index dff2f8f51d7..e5d2fa41d6c 100644 --- a/doc/api/repl.md +++ b/doc/api/repl.md @@ -40,6 +40,7 @@ The following special commands are supported by all REPL instances: `> .load ./file/to/load.js` * `.editor` - Enter editor mode (`-D` to finish, `-C` to cancel) + ```js > .editor // Entering editor mode (^D to finish, ^C to cancel) @@ -75,6 +76,7 @@ evaluation function when the `repl.REPLServer` instance is created. The default evaluator supports direct evaluation of JavaScript expressions: + ```js > 1 + 1 2 @@ -103,6 +105,7 @@ repl.start('> ').context.m = msg; Properties in the `context` object appear as local within the REPL: + ```js $ node repl_test.js > m @@ -132,6 +135,7 @@ REPL environment when used. For instance, unless otherwise declared as a global or scoped variable, the input `fs` will be evaluated on-demand as `global.fs = require('fs')`. + ```js > fs.createReadStream('./some/file'); ``` @@ -142,6 +146,7 @@ The default evaluator will, by default, assign the result of the most recently evaluated expression to the special variable `_` (underscore). Explicitly setting `_` to a value will disable this behavior. + ```js > [ 'a', 'b', 'c' ] [ 'a', 'b', 'c' ] @@ -288,6 +293,7 @@ r.on('reset', initializeContext); When this code is executed, the global `'m'` variable can be modified but then reset to its initial value using the `.clear` command: + ```js $ ./node example.js > m @@ -438,6 +444,7 @@ Node.js itself uses the `repl` module to provide its own interactive interface for executing JavaScript. This can be used by executing the Node.js binary without passing any arguments (or by passing the `-i` argument): + ```js $ node > const a = [1, 2, 3]; diff --git a/doc/api/stream.md b/doc/api/stream.md index da6c51907a8..c8462760f5a 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -280,7 +280,7 @@ has been called, and all data has been flushed to the underlying system. ```js const writer = getWritableStreamSomehow(); -for (var i = 0; i < 100; i++) { +for (let i = 0; i < 100; i++) { writer.write(`hello, #${i}!\n`); } writer.end('This is the end\n'); diff --git a/doc/api/v8.md b/doc/api/v8.md index 8d5d428e561..e766d7c1012 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -116,6 +116,7 @@ swapped out by the operating system. For example: + ```js { total_heap_size: 7326976, diff --git a/doc/api/zlib.md b/doc/api/zlib.md index 73aa81ede97..340470a4e1a 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -151,8 +151,9 @@ From `zlib/zconf.h`, modified to node.js's usage: The memory requirements for deflate are (in bytes): + ```js -(1 << (windowBits + 2)) + (1 << (memLevel + 9)); +(1 << (windowBits + 2)) + (1 << (memLevel + 9)) ``` That is: 128K for windowBits=15 + 128K for memLevel = 8 @@ -167,12 +168,7 @@ const options = { windowBits: 14, memLevel: 7 }; This will, however, generally degrade compression. -The memory requirements for inflate are (in bytes) - -```js -1 << windowBits; -``` - +The memory requirements for inflate are (in bytes) `1 << windowBits`. That is, 32K for windowBits=15 (default value) plus a few kilobytes for small objects. diff --git a/test/README.md b/test/README.md index e73d278653b..6b073c75726 100644 --- a/test/README.md +++ b/test/README.md @@ -352,6 +352,7 @@ A non-op `Function` that can be used for a variety of scenarios. For instance, + ```js const common = require('../common'); diff --git a/tools/eslint/node_modules/.bin/remark b/tools/eslint/node_modules/.bin/remark new file mode 100644 index 00000000000..ba550cb8cd2 --- /dev/null +++ b/tools/eslint/node_modules/.bin/remark @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../remark/cli.js" "$@" + ret=$? +else + node "$basedir/../remark/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/tools/eslint/node_modules/.bin/remark.cmd b/tools/eslint/node_modules/.bin/remark.cmd new file mode 100644 index 00000000000..78192589eb2 --- /dev/null +++ b/tools/eslint/node_modules/.bin/remark.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\remark\cli.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\remark\cli.js" %* +) \ No newline at end of file diff --git a/tools/eslint/node_modules/bail/LICENSE b/tools/eslint/node_modules/bail/LICENSE new file mode 100644 index 00000000000..32e7a3d93ca --- /dev/null +++ b/tools/eslint/node_modules/bail/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2015 Titus Wormer + +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. diff --git a/tools/eslint/node_modules/bail/history.md b/tools/eslint/node_modules/bail/history.md new file mode 100644 index 00000000000..4f794e30a91 --- /dev/null +++ b/tools/eslint/node_modules/bail/history.md @@ -0,0 +1,12 @@ + + + + +1.0.1 / 2016-07-23 +================== + +* Rewrite module ([`75e6d41`](https://github.com/wooorm/bail/commit/75e6d41)) +* Update dev-dependencies ([`9ec98f9`](https://github.com/wooorm/bail/commit/9ec98f9)) + +1.0.0 / 2015-07-28 +================== diff --git a/tools/eslint/node_modules/bail/index.js b/tools/eslint/node_modules/bail/index.js new file mode 100644 index 00000000000..7772d5634fe --- /dev/null +++ b/tools/eslint/node_modules/bail/index.js @@ -0,0 +1,34 @@ +/** + * @author Titus Wormer + * @copyright 2015 Titus Wormer + * @license MIT + * @module bail + * @fileoverview Throw a given error. + */ + +'use strict'; + +/* Expose. */ +module.exports = bail; + +/** + * Throw a given error. + * + * @example + * bail(); + * + * @example + * bail(new Error('failure')); + * // Error: failure + * // at repl:1:6 + * // at REPLServer.defaultEval (repl.js:154:27) + * // ... + * + * @param {Error?} [err] - Optional error. + * @throws {Error} - `err`, when given. + */ +function bail(err) { + if (err) { + throw err; + } +} diff --git a/tools/eslint/node_modules/bail/package.json b/tools/eslint/node_modules/bail/package.json new file mode 100644 index 00000000000..d705a3b1ad6 --- /dev/null +++ b/tools/eslint/node_modules/bail/package.json @@ -0,0 +1,138 @@ +{ + "_args": [ + [ + { + "raw": "bail@^1.0.0", + "scope": null, + "escapedName": "bail", + "name": "bail", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\unified" + ] + ], + "_from": "bail@>=1.0.0 <2.0.0", + "_id": "bail@1.0.1", + "_inCache": true, + "_location": "/bail", + "_nodeVersion": "5.0.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/bail-1.0.1.tgz_1469301368484_0.1634318893775344" + }, + "_npmUser": { + "name": "wooorm", + "email": "tituswormer@gmail.com" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "raw": "bail@^1.0.0", + "scope": null, + "escapedName": "bail", + "name": "bail", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/unified" + ], + "_resolved": "https://registry.npmjs.org/bail/-/bail-1.0.1.tgz", + "_shasum": "912579de8b391aadf3c5fdf4cd2a0fc225df3bc2", + "_shrinkwrap": null, + "_spec": "bail@^1.0.0", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\unified", + "author": { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + }, + "bugs": { + "url": "https://github.com/wooorm/bail/issues" + }, + "contributors": [ + { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + } + ], + "dependencies": {}, + "description": "Throw a given error", + "devDependencies": { + "browserify": "^13.0.1", + "esmangle": "^1.0.1", + "nyc": "^7.0.0", + "remark-cli": "^1.0.0", + "remark-comment-config": "^4.0.0", + "remark-github": "^5.0.0", + "remark-lint": "^4.0.0", + "remark-validate-links": "^4.0.0", + "tape": "^4.0.0", + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "912579de8b391aadf3c5fdf4cd2a0fc225df3bc2", + "tarball": "https://registry.npmjs.org/bail/-/bail-1.0.1.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "5f9cf008fe599445037e88974801dfd66f9c1911", + "homepage": "https://github.com/wooorm/bail#readme", + "keywords": [ + "fail", + "bail", + "throw", + "callback", + "error" + ], + "license": "MIT", + "maintainers": [ + { + "name": "wooorm", + "email": "tituswormer@gmail.com" + } + ], + "name": "bail", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "remarkConfig": { + "output": true, + "plugins": [ + "comment-config", + "github", + "lint", + "validate-links" + ], + "settings": { + "bullet": "*" + } + }, + "repository": { + "type": "git", + "url": "git+https://github.com/wooorm/bail.git" + }, + "scripts": { + "build": "npm run build-md && npm run build-bundle && npm run build-mangle", + "build-bundle": "browserify index.js --bare -s bail > bail.js", + "build-mangle": "esmangle bail.js > bail.min.js", + "build-md": "remark . --quiet --frail", + "lint": "xo", + "test": "npm run build && npm run lint && npm run test-coverage", + "test-api": "node test", + "test-coverage": "nyc --reporter lcov tape test.js" + }, + "version": "1.0.1", + "xo": { + "space": true, + "ignores": [ + "bail.js", + "bail.min.js" + ] + } +} diff --git a/tools/eslint/node_modules/bail/readme.md b/tools/eslint/node_modules/bail/readme.md new file mode 100644 index 00000000000..b35158cd735 --- /dev/null +++ b/tools/eslint/node_modules/bail/readme.md @@ -0,0 +1,73 @@ +# bail [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] + + + +:warning: Throw a given error. + +## Installation + +[npm][npm-install]: + +```bash +npm install bail +``` + +## Usage + +```js +var bail = require('bail'); + +bail(); + +bail(new Error('failure')); +// Error: failure +// at repl:1:6 +// at REPLServer.defaultEval (repl.js:154:27) +// ... +``` + +## API + +### `bail([err])` + +Throw a given error. + +###### Parameters + +* `err` (`Error?`) — Optional error. + +###### Throws + +* `Error` — Given error, if any. + +## Related + +* [`noop`][noop]; +* [`noop2`][noop2]; +* [`noop3`][noop3]; + +## License + +[MIT][license] © [Titus Wormer][author] + + + +[travis-badge]: https://img.shields.io/travis/wooorm/bail.svg + +[travis]: https://travis-ci.org/wooorm/bail + +[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/bail.svg + +[codecov]: https://codecov.io/github/wooorm/bail + +[npm-install]: https://docs.npmjs.com/cli/install + +[license]: LICENSE + +[author]: http://wooorm.com + +[noop]: https://www.npmjs.com/package/noop + +[noop2]: https://www.npmjs.com/package/noop2 + +[noop3]: https://www.npmjs.com/package/noop3 diff --git a/tools/eslint/node_modules/ccount/LICENSE b/tools/eslint/node_modules/ccount/LICENSE new file mode 100644 index 00000000000..32e7a3d93ca --- /dev/null +++ b/tools/eslint/node_modules/ccount/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2015 Titus Wormer + +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. diff --git a/tools/eslint/node_modules/ccount/history.md b/tools/eslint/node_modules/ccount/history.md new file mode 100644 index 00000000000..908b6f75789 --- /dev/null +++ b/tools/eslint/node_modules/ccount/history.md @@ -0,0 +1,11 @@ + + + + +1.0.1 / 2016-07-23 +================== + +* Rewrite module ([`c3cd494`](https://github.com/wooorm/ccount/commit/c3cd494)) + +1.0.0 / 2015-07-12 +================== diff --git a/tools/eslint/node_modules/ccount/index.js b/tools/eslint/node_modules/ccount/index.js new file mode 100644 index 00000000000..0d72d6e5276 --- /dev/null +++ b/tools/eslint/node_modules/ccount/index.js @@ -0,0 +1,46 @@ +/** + * @author Titus Wormer + * @copyright 2015 Titus Wormer + * @license MIT + * @module ccount + * @fileoverview Count characters. + */ + +'use strict'; + +/* Expose. */ +module.exports = ccount; + +/** + * Count how many characters `character` occur in `value`. + * + * @example + * ccount('foo(bar(baz)', '(') // 2 + * ccount('foo(bar(baz)', ')') // 1 + * + * @param {string} value - Content, coerced to string. + * @param {string} character - Single character to look + * for. + * @return {number} - Count. + * @throws {Error} - when `character` is not a single + * character. + */ +function ccount(value, character) { + var count = 0; + var index; + + value = String(value); + + if (typeof character !== 'string' || character.length !== 1) { + throw new Error('Expected character'); + } + + index = value.indexOf(character); + + while (index !== -1) { + count++; + index = value.indexOf(character, index + 1); + } + + return count; +} diff --git a/tools/eslint/node_modules/ccount/package.json b/tools/eslint/node_modules/ccount/package.json new file mode 100644 index 00000000000..7983fc003d9 --- /dev/null +++ b/tools/eslint/node_modules/ccount/package.json @@ -0,0 +1,136 @@ +{ + "_args": [ + [ + { + "raw": "ccount@^1.0.0", + "scope": null, + "escapedName": "ccount", + "name": "ccount", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\remark-stringify" + ] + ], + "_from": "ccount@>=1.0.0 <2.0.0", + "_id": "ccount@1.0.1", + "_inCache": true, + "_location": "/ccount", + "_nodeVersion": "5.0.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/ccount-1.0.1.tgz_1469303388454_0.4032677055802196" + }, + "_npmUser": { + "name": "wooorm", + "email": "tituswormer@gmail.com" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "raw": "ccount@^1.0.0", + "scope": null, + "escapedName": "ccount", + "name": "ccount", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/remark-stringify" + ], + "_resolved": "https://registry.npmjs.org/ccount/-/ccount-1.0.1.tgz", + "_shasum": "665687945168c218ec77ff61a4155ae00227a96c", + "_shrinkwrap": null, + "_spec": "ccount@^1.0.0", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\remark-stringify", + "author": { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + }, + "bugs": { + "url": "https://github.com/wooorm/ccount/issues" + }, + "contributors": [ + { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + } + ], + "dependencies": {}, + "description": "Count characters", + "devDependencies": { + "browserify": "^13.0.1", + "esmangle": "^1.0.1", + "nyc": "^7.0.0", + "remark-cli": "^1.0.0", + "remark-comment-config": "^4.0.0", + "remark-github": "^5.0.0", + "remark-lint": "^4.0.0", + "remark-validate-links": "^4.0.0", + "tape": "^4.0.0", + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "665687945168c218ec77ff61a4155ae00227a96c", + "tarball": "https://registry.npmjs.org/ccount/-/ccount-1.0.1.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "5a787f3e93dd18d121b9bd4be6d1da96c8c17187", + "homepage": "https://github.com/wooorm/ccount#readme", + "keywords": [ + "character", + "count", + "char" + ], + "license": "MIT", + "maintainers": [ + { + "name": "wooorm", + "email": "tituswormer@gmail.com" + } + ], + "name": "ccount", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "remarkConfig": { + "output": true, + "plugins": [ + "comment-config", + "github", + "lint", + "validate-links" + ], + "settings": { + "bullet": "*" + } + }, + "repository": { + "type": "git", + "url": "git+https://github.com/wooorm/ccount.git" + }, + "scripts": { + "build": "npm run build-md && npm run build-bundle && npm run build-mangle", + "build-bundle": "browserify index.js --bare -s ccount > ccount.js", + "build-mangle": "esmangle ccount.js > ccount.min.js", + "build-md": "remark . --quiet --frail", + "lint": "xo", + "test": "npm run build && npm run lint && npm run test-coverage", + "test-api": "node test", + "test-coverage": "nyc --reporter lcov tape test.js" + }, + "version": "1.0.1", + "xo": { + "space": true, + "ignores": [ + "ccount.js", + "ccount.min.js" + ] + } +} diff --git a/tools/eslint/node_modules/ccount/readme.md b/tools/eslint/node_modules/ccount/readme.md new file mode 100644 index 00000000000..d773d12c8c5 --- /dev/null +++ b/tools/eslint/node_modules/ccount/readme.md @@ -0,0 +1,57 @@ +# ccount [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] + + + +Count characters. + +## Installation + +[npm][npm-install]: + +```bash +npm install ccount +``` + +## Usage + +```javascript +var ccount = require('ccount'); + +ccount('foo(bar(baz)', '(') // 2 +ccount('foo(bar(baz)', ')') // 1 +``` + +## API + +### `ccount(value, character)` + +Get the total count of `character` in `value`. + +###### Parameters + +* `value` (`string`) — Content, coerced to string. +* `character` (`string`) — Single character to look for. + +###### Returns + +`number` — Number of times `character` occurred in `value`. + +## License + +[MIT][license] © [Titus Wormer][author] + + + +[travis-badge]: https://img.shields.io/travis/wooorm/ccount.svg + +[travis]: https://travis-ci.org/wooorm/ccount + +[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/ccount.svg + +[codecov]: https://codecov.io/github/wooorm/ccount + +[npm-install]: https://docs.npmjs.com/cli/install + +[license]: LICENSE + +[author]: http://wooorm.com diff --git a/tools/eslint/node_modules/character-entities-html4/LICENSE b/tools/eslint/node_modules/character-entities-html4/LICENSE new file mode 100644 index 00000000000..32e7a3d93ca --- /dev/null +++ b/tools/eslint/node_modules/character-entities-html4/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2015 Titus Wormer + +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. diff --git a/tools/eslint/node_modules/character-entities-html4/index.json b/tools/eslint/node_modules/character-entities-html4/index.json new file mode 100644 index 00000000000..fa0d7bc7c77 --- /dev/null +++ b/tools/eslint/node_modules/character-entities-html4/index.json @@ -0,0 +1,254 @@ +{ + "nbsp": " ", + "iexcl": "¡", + "cent": "¢", + "pound": "£", + "curren": "¤", + "yen": "¥", + "brvbar": "¦", + "sect": "§", + "uml": "¨", + "copy": "©", + "ordf": "ª", + "laquo": "«", + "not": "¬", + "shy": "­", + "reg": "®", + "macr": "¯", + "deg": "°", + "plusmn": "±", + "sup2": "²", + "sup3": "³", + "acute": "´", + "micro": "µ", + "para": "¶", + "middot": "·", + "cedil": "¸", + "sup1": "¹", + "ordm": "º", + "raquo": "»", + "frac14": "¼", + "frac12": "½", + "frac34": "¾", + "iquest": "¿", + "Agrave": "À", + "Aacute": "Á", + "Acirc": "Â", + "Atilde": "Ã", + "Auml": "Ä", + "Aring": "Å", + "AElig": "Æ", + "Ccedil": "Ç", + "Egrave": "È", + "Eacute": "É", + "Ecirc": "Ê", + "Euml": "Ë", + "Igrave": "Ì", + "Iacute": "Í", + "Icirc": "Î", + "Iuml": "Ï", + "ETH": "Ð", + "Ntilde": "Ñ", + "Ograve": "Ò", + "Oacute": "Ó", + "Ocirc": "Ô", + "Otilde": "Õ", + "Ouml": "Ö", + "times": "×", + "Oslash": "Ø", + "Ugrave": "Ù", + "Uacute": "Ú", + "Ucirc": "Û", + "Uuml": "Ü", + "Yacute": "Ý", + "THORN": "Þ", + "szlig": "ß", + "agrave": "à", + "aacute": "á", + "acirc": "â", + "atilde": "ã", + "auml": "ä", + "aring": "å", + "aelig": "æ", + "ccedil": "ç", + "egrave": "è", + "eacute": "é", + "ecirc": "ê", + "euml": "ë", + "igrave": "ì", + "iacute": "í", + "icirc": "î", + "iuml": "ï", + "eth": "ð", + "ntilde": "ñ", + "ograve": "ò", + "oacute": "ó", + "ocirc": "ô", + "otilde": "õ", + "ouml": "ö", + "divide": "÷", + "oslash": "ø", + "ugrave": "ù", + "uacute": "ú", + "ucirc": "û", + "uuml": "ü", + "yacute": "ý", + "thorn": "þ", + "yuml": "ÿ", + "fnof": "ƒ", + "Alpha": "Α", + "Beta": "Β", + "Gamma": "Γ", + "Delta": "Δ", + "Epsilon": "Ε", + "Zeta": "Ζ", + "Eta": "Η", + "Theta": "Θ", + "Iota": "Ι", + "Kappa": "Κ", + "Lambda": "Λ", + "Mu": "Μ", + "Nu": "Ν", + "Xi": "Ξ", + "Omicron": "Ο", + "Pi": "Π", + "Rho": "Ρ", + "Sigma": "Σ", + "Tau": "Τ", + "Upsilon": "Υ", + "Phi": "Φ", + "Chi": "Χ", + "Psi": "Ψ", + "Omega": "Ω", + "alpha": "α", + "beta": "β", + "gamma": "γ", + "delta": "δ", + "epsilon": "ε", + "zeta": "ζ", + "eta": "η", + "theta": "θ", + "iota": "ι", + "kappa": "κ", + "lambda": "λ", + "mu": "μ", + "nu": "ν", + "xi": "ξ", + "omicron": "ο", + "pi": "π", + "rho": "ρ", + "sigmaf": "ς", + "sigma": "σ", + "tau": "τ", + "upsilon": "υ", + "phi": "φ", + "chi": "χ", + "psi": "ψ", + "omega": "ω", + "thetasym": "ϑ", + "upsih": "ϒ", + "piv": "ϖ", + "bull": "•", + "hellip": "…", + "prime": "′", + "Prime": "″", + "oline": "‾", + "frasl": "⁄", + "weierp": "℘", + "image": "ℑ", + "real": "ℜ", + "trade": "™", + "alefsym": "ℵ", + "larr": "←", + "uarr": "↑", + "rarr": "→", + "darr": "↓", + "harr": "↔", + "crarr": "↵", + "lArr": "⇐", + "uArr": "⇑", + "rArr": "⇒", + "dArr": "⇓", + "hArr": "⇔", + "forall": "∀", + "part": "∂", + "exist": "∃", + "empty": "∅", + "nabla": "∇", + "isin": "∈", + "notin": "∉", + "ni": "∋", + "prod": "∏", + "sum": "∑", + "minus": "−", + "lowast": "∗", + "radic": "√", + "prop": "∝", + "infin": "∞", + "ang": "∠", + "and": "∧", + "or": "∨", + "cap": "∩", + "cup": "∪", + "int": "∫", + "there4": "∴", + "sim": "∼", + "cong": "≅", + "asymp": "≈", + "ne": "≠", + "equiv": "≡", + "le": "≤", + "ge": "≥", + "sub": "⊂", + "sup": "⊃", + "nsub": "⊄", + "sube": "⊆", + "supe": "⊇", + "oplus": "⊕", + "otimes": "⊗", + "perp": "⊥", + "sdot": "⋅", + "lceil": "⌈", + "rceil": "⌉", + "lfloor": "⌊", + "rfloor": "⌋", + "lang": "〈", + "rang": "〉", + "loz": "◊", + "spades": "♠", + "clubs": "♣", + "hearts": "♥", + "diams": "♦", + "quot": "\"", + "amp": "&", + "lt": "<", + "gt": ">", + "OElig": "Œ", + "oelig": "œ", + "Scaron": "Š", + "scaron": "š", + "Yuml": "Ÿ", + "circ": "ˆ", + "tilde": "˜", + "ensp": " ", + "emsp": " ", + "thinsp": " ", + "zwnj": "‌", + "zwj": "‍", + "lrm": "‎", + "rlm": "‏", + "ndash": "–", + "mdash": "—", + "lsquo": "‘", + "rsquo": "’", + "sbquo": "‚", + "ldquo": "“", + "rdquo": "”", + "bdquo": "„", + "dagger": "†", + "Dagger": "‡", + "permil": "‰", + "lsaquo": "‹", + "rsaquo": "›", + "euro": "€" +} diff --git a/tools/eslint/node_modules/character-entities-html4/package.json b/tools/eslint/node_modules/character-entities-html4/package.json new file mode 100644 index 00000000000..69767c940ff --- /dev/null +++ b/tools/eslint/node_modules/character-entities-html4/package.json @@ -0,0 +1,133 @@ +{ + "_args": [ + [ + { + "raw": "character-entities-html4@^1.0.0", + "scope": null, + "escapedName": "character-entities-html4", + "name": "character-entities-html4", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\stringify-entities" + ] + ], + "_from": "character-entities-html4@>=1.0.0 <2.0.0", + "_id": "character-entities-html4@1.1.0", + "_inCache": true, + "_location": "/character-entities-html4", + "_nodeVersion": "4.0.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/character-entities-html4-1.1.0.tgz_1478288953070_0.18045797967351973" + }, + "_npmUser": { + "name": "wooorm", + "email": "tituswormer@gmail.com" + }, + "_npmVersion": "2.14.2", + "_phantomChildren": {}, + "_requested": { + "raw": "character-entities-html4@^1.0.0", + "scope": null, + "escapedName": "character-entities-html4", + "name": "character-entities-html4", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/stringify-entities" + ], + "_resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-1.1.0.tgz", + "_shasum": "1ab08551d3ce1fa1df08d00fb9ca1defb147a06c", + "_shrinkwrap": null, + "_spec": "character-entities-html4@^1.0.0", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\stringify-entities", + "author": { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + }, + "bugs": { + "url": "https://github.com/wooorm/character-entities-html4/issues" + }, + "contributors": [ + { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + } + ], + "dependencies": {}, + "description": "HTML4 character entity information", + "devDependencies": { + "bail": "^1.0.1", + "browserify": "^13.0.1", + "concat-stream": "^1.5.2", + "esmangle": "^1.0.1", + "nyc": "^8.0.0", + "remark-cli": "^2.0.0", + "remark-preset-wooorm": "^1.0.0", + "tape": "^4.0.0", + "xo": "^0.17.0" + }, + "directories": {}, + "dist": { + "shasum": "1ab08551d3ce1fa1df08d00fb9ca1defb147a06c", + "tarball": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-1.1.0.tgz" + }, + "files": [ + "index.json" + ], + "gitHead": "85835d7948614c96443f5191ea0e2265b41987da", + "homepage": "https://github.com/wooorm/character-entities-html4#readme", + "keywords": [ + "html", + "html4", + "entity", + "entities", + "character", + "reference", + "name", + "replacement" + ], + "license": "MIT", + "main": "index.json", + "maintainers": [ + { + "name": "wooorm", + "email": "tituswormer@gmail.com" + } + ], + "name": "character-entities-html4", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "remarkConfig": { + "output": true, + "presets": "wooorm" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/wooorm/character-entities-html4.git" + }, + "scripts": { + "build": "npm run build-md && npm run build-generate && npm run build-bundle && npm run build-mangle", + "build-bundle": "browserify index.json --bare -s characterEntitiesHTML4 > character-entities-html4.js", + "build-generate": "node build", + "build-mangle": "esmangle character-entities-html4.js > character-entities-html4.min.js", + "build-md": "remark . --quiet --frail", + "lint": "xo", + "test": "npm run build && npm run lint && npm run test-coverage", + "test-api": "node test", + "test-coverage": "nyc --reporter lcov tape test.js" + }, + "version": "1.1.0", + "xo": { + "space": true, + "ignores": [ + "character-entities-html4.js" + ] + } +} diff --git a/tools/eslint/node_modules/character-entities-html4/readme.md b/tools/eslint/node_modules/character-entities-html4/readme.md new file mode 100644 index 00000000000..d607a6483e2 --- /dev/null +++ b/tools/eslint/node_modules/character-entities-html4/readme.md @@ -0,0 +1,52 @@ +# character-entities-html4 [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] + +HTML4 character entity information. + +## Installation + +[npm][npm-install]: + +```bash +npm install character-entities-html4 +``` + +## Usage + +```js +console.log(characterEntities.AElig); // Æ +console.log(characterEntities.aelig); // æ +console.log(characterEntities.amp); // & +console.log(characterEntities.apos); // undefined +``` + +## API + +### `characterEntitiesHTML4` + +Mapping between (case-sensitive) character entity names to replacements. + +## Support + +See [w3.org][html]. + +## License + +[MIT][license] © [Titus Wormer][author] + + + +[travis-badge]: https://img.shields.io/travis/wooorm/character-entities-html4.svg + +[travis]: https://travis-ci.org/wooorm/character-entities-html4 + +[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/character-entities-html4.svg + +[codecov]: https://codecov.io/github/wooorm/character-entities-html4 + +[npm-install]: https://docs.npmjs.com/cli/install + +[license]: LICENSE + +[author]: http://wooorm.com + +[html]: http://www.w3.org/TR/html4/sgml/entities.html diff --git a/tools/eslint/node_modules/character-entities-legacy/LICENSE b/tools/eslint/node_modules/character-entities-legacy/LICENSE new file mode 100644 index 00000000000..32e7a3d93ca --- /dev/null +++ b/tools/eslint/node_modules/character-entities-legacy/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2015 Titus Wormer + +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. diff --git a/tools/eslint/node_modules/character-entities-legacy/index.json b/tools/eslint/node_modules/character-entities-legacy/index.json new file mode 100644 index 00000000000..d83b75251b7 --- /dev/null +++ b/tools/eslint/node_modules/character-entities-legacy/index.json @@ -0,0 +1,108 @@ +{ + "AElig": "Æ", + "AMP": "&", + "Aacute": "Á", + "Acirc": "Â", + "Agrave": "À", + "Aring": "Å", + "Atilde": "Ã", + "Auml": "Ä", + "COPY": "©", + "Ccedil": "Ç", + "ETH": "Ð", + "Eacute": "É", + "Ecirc": "Ê", + "Egrave": "È", + "Euml": "Ë", + "GT": ">", + "Iacute": "Í", + "Icirc": "Î", + "Igrave": "Ì", + "Iuml": "Ï", + "LT": "<", + "Ntilde": "Ñ", + "Oacute": "Ó", + "Ocirc": "Ô", + "Ograve": "Ò", + "Oslash": "Ø", + "Otilde": "Õ", + "Ouml": "Ö", + "QUOT": "\"", + "REG": "®", + "THORN": "Þ", + "Uacute": "Ú", + "Ucirc": "Û", + "Ugrave": "Ù", + "Uuml": "Ü", + "Yacute": "Ý", + "aacute": "á", + "acirc": "â", + "acute": "´", + "aelig": "æ", + "agrave": "à", + "amp": "&", + "aring": "å", + "atilde": "ã", + "auml": "ä", + "brvbar": "¦", + "ccedil": "ç", + "cedil": "¸", + "cent": "¢", + "copy": "©", + "curren": "¤", + "deg": "°", + "divide": "÷", + "eacute": "é", + "ecirc": "ê", + "egrave": "è", + "eth": "ð", + "euml": "ë", + "frac12": "½", + "frac14": "¼", + "frac34": "¾", + "gt": ">", + "iacute": "í", + "icirc": "î", + "iexcl": "¡", + "igrave": "ì", + "iquest": "¿", + "iuml": "ï", + "laquo": "«", + "lt": "<", + "macr": "¯", + "micro": "µ", + "middot": "·", + "nbsp": " ", + "not": "¬", + "ntilde": "ñ", + "oacute": "ó", + "ocirc": "ô", + "ograve": "ò", + "ordf": "ª", + "ordm": "º", + "oslash": "ø", + "otilde": "õ", + "ouml": "ö", + "para": "¶", + "plusmn": "±", + "pound": "£", + "quot": "\"", + "raquo": "»", + "reg": "®", + "sect": "§", + "shy": "­", + "sup1": "¹", + "sup2": "²", + "sup3": "³", + "szlig": "ß", + "thorn": "þ", + "times": "×", + "uacute": "ú", + "ucirc": "û", + "ugrave": "ù", + "uml": "¨", + "uuml": "ü", + "yacute": "ý", + "yen": "¥", + "yuml": "ÿ" +} diff --git a/tools/eslint/node_modules/character-entities-legacy/package.json b/tools/eslint/node_modules/character-entities-legacy/package.json new file mode 100644 index 00000000000..29c0d1e46a1 --- /dev/null +++ b/tools/eslint/node_modules/character-entities-legacy/package.json @@ -0,0 +1,133 @@ +{ + "_args": [ + [ + { + "raw": "character-entities-legacy@^1.0.0", + "scope": null, + "escapedName": "character-entities-legacy", + "name": "character-entities-legacy", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\parse-entities" + ] + ], + "_from": "character-entities-legacy@>=1.0.0 <2.0.0", + "_id": "character-entities-legacy@1.1.0", + "_inCache": true, + "_location": "/character-entities-legacy", + "_nodeVersion": "4.0.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/character-entities-legacy-1.1.0.tgz_1478279027342_0.273034636862576" + }, + "_npmUser": { + "name": "wooorm", + "email": "tituswormer@gmail.com" + }, + "_npmVersion": "2.14.2", + "_phantomChildren": {}, + "_requested": { + "raw": "character-entities-legacy@^1.0.0", + "scope": null, + "escapedName": "character-entities-legacy", + "name": "character-entities-legacy", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/parse-entities", + "/stringify-entities" + ], + "_resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.0.tgz", + "_shasum": "b18aad98f6b7bcc646c1e4c81f9f1956376a561a", + "_shrinkwrap": null, + "_spec": "character-entities-legacy@^1.0.0", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\parse-entities", + "author": { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + }, + "bugs": { + "url": "https://github.com/wooorm/character-entities-legacy/issues" + }, + "contributors": [ + { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + } + ], + "dependencies": {}, + "description": "HTML legacy character entity information", + "devDependencies": { + "bail": "^1.0.1", + "browserify": "^13.0.1", + "concat-stream": "^1.5.2", + "esmangle": "^1.0.1", + "nyc": "^8.0.0", + "remark-cli": "^2.0.0", + "remark-preset-wooorm": "^1.0.0", + "tape": "^4.0.0", + "xo": "^0.17.0" + }, + "directories": {}, + "dist": { + "shasum": "b18aad98f6b7bcc646c1e4c81f9f1956376a561a", + "tarball": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.0.tgz" + }, + "files": [ + "index.json" + ], + "gitHead": "2cc6c73d528560ba4664f47a4e7979ab85b245b4", + "homepage": "https://github.com/wooorm/character-entities-legacy#readme", + "keywords": [ + "html", + "entity", + "entities", + "character", + "reference", + "name", + "replacement" + ], + "license": "MIT", + "main": "index.json", + "maintainers": [ + { + "name": "wooorm", + "email": "tituswormer@gmail.com" + } + ], + "name": "character-entities-legacy", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "remarkConfig": { + "output": true, + "presets": "wooorm" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/wooorm/character-entities-legacy.git" + }, + "scripts": { + "build": "npm run build-md && npm run build-generate && npm run build-bundle && npm run build-mangle", + "build-bundle": "browserify index.json --bare -s characterEntitiesLegacy > character-entities-legacy.js", + "build-generate": "node build", + "build-mangle": "esmangle character-entities-legacy.js > character-entities-legacy.min.js", + "build-md": "remark . --quiet --frail", + "lint": "xo", + "test": "npm run build && npm run lint && npm run test-coverage", + "test-api": "node test", + "test-coverage": "nyc --reporter lcov tape test.js" + }, + "version": "1.1.0", + "xo": { + "space": true, + "ignores": [ + "character-entities-legacy.js" + ] + } +} diff --git a/tools/eslint/node_modules/character-entities-legacy/readme.md b/tools/eslint/node_modules/character-entities-legacy/readme.md new file mode 100644 index 00000000000..7f6a876820f --- /dev/null +++ b/tools/eslint/node_modules/character-entities-legacy/readme.md @@ -0,0 +1,54 @@ +# character-entities-legacy [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] + +HTML legacy character entity information: for legacy reasons some +character entities are not required to have a trailing semicolon: +`©` is perfectly okay for `©`. + +## Installation + +[npm][npm-install]: + +```bash +npm install character-entities-legacy +``` + +## Usage + +```js +console.log(characterEntitiesLegacy.copy); // © +console.log(characterEntitiesLegacy.frac34); // ¾ +console.log(characterEntitiesLegacy.sup1); // ¹ +``` + +## API + +### `characterEntitiesLegacy` + +Mapping between (case-sensitive) legacy character entity names to +replacements. + +## Support + +See [whatwg/html][html]. + +## License + +[MIT][license] © [Titus Wormer][author] + + + +[travis-badge]: https://img.shields.io/travis/wooorm/character-entities-legacy.svg + +[travis]: https://travis-ci.org/wooorm/character-entities-legacy + +[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/character-entities-legacy.svg + +[codecov]: https://codecov.io/github/wooorm/character-entities-legacy + +[npm-install]: https://docs.npmjs.com/cli/install + +[license]: LICENSE + +[author]: http://wooorm.com + +[html]: https://raw.githubusercontent.com/whatwg/html/master/json-entities-legacy.inc diff --git a/tools/eslint/node_modules/character-entities/LICENSE b/tools/eslint/node_modules/character-entities/LICENSE new file mode 100644 index 00000000000..32e7a3d93ca --- /dev/null +++ b/tools/eslint/node_modules/character-entities/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2015 Titus Wormer + +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. diff --git a/tools/eslint/node_modules/character-entities/index.json b/tools/eslint/node_modules/character-entities/index.json new file mode 100644 index 00000000000..a63babe0935 --- /dev/null +++ b/tools/eslint/node_modules/character-entities/index.json @@ -0,0 +1,2224 @@ +{ + "AEli": "Æ", + "AElig": "Æ", + "AM": "&", + "AMP": "&", + "Aacut": "Á", + "Aacute": "Á", + "Abreve": "Ă", + "Acir": "Â", + "Acirc": "Â", + "Acy": "А", + "Afr": "𝔄", + "Agrav": "À", + "Agrave": "À", + "Alpha": "Α", + "Amacr": "Ā", + "And": "⩓", + "Aogon": "Ą", + "Aopf": "𝔸", + "ApplyFunction": "⁡", + "Arin": "Å", + "Aring": "Å", + "Ascr": "𝒜", + "Assign": "≔", + "Atild": "Ã", + "Atilde": "Ã", + "Aum": "Ä", + "Auml": "Ä", + "Backslash": "∖", + "Barv": "⫧", + "Barwed": "⌆", + "Bcy": "Б", + "Because": "∵", + "Bernoullis": "ℬ", + "Beta": "Β", + "Bfr": "𝔅", + "Bopf": "𝔹", + "Breve": "˘", + "Bscr": "ℬ", + "Bumpeq": "≎", + "CHcy": "Ч", + "COP": "©", + "COPY": "©", + "Cacute": "Ć", + "Cap": "⋒", + "CapitalDifferentialD": "ⅅ", + "Cayleys": "ℭ", + "Ccaron": "Č", + "Ccedi": "Ç", + "Ccedil": "Ç", + "Ccirc": "Ĉ", + "Cconint": "∰", + "Cdot": "Ċ", + "Cedilla": "¸", + "CenterDot": "·", + "Cfr": "ℭ", + "Chi": "Χ", + "CircleDot": "⊙", + "CircleMinus": "⊖", + "CirclePlus": "⊕", + "CircleTimes": "⊗", + "ClockwiseContourIntegral": "∲", + "CloseCurlyDoubleQuote": "”", + "CloseCurlyQuote": "’", + "Colon": "∷", + "Colone": "⩴", + "Congruent": "≡", + "Conint": "∯", + "ContourIntegral": "∮", + "Copf": "ℂ", + "Coproduct": "∐", + "CounterClockwiseContourIntegral": "∳", + "Cross": "⨯", + "Cscr": "𝒞", + "Cup": "⋓", + "CupCap": "≍", + "DD": "ⅅ", + "DDotrahd": "⤑", + "DJcy": "Ђ", + "DScy": "Ѕ", + "DZcy": "Џ", + "Dagger": "‡", + "Darr": "↡", + "Dashv": "⫤", + "Dcaron": "Ď", + "Dcy": "Д", + "Del": "∇", + "Delta": "Δ", + "Dfr": "𝔇", + "DiacriticalAcute": "´", + "DiacriticalDot": "˙", + "DiacriticalDoubleAcute": "˝", + "DiacriticalGrave": "`", + "DiacriticalTilde": "˜", + "Diamond": "⋄", + "DifferentialD": "ⅆ", + "Dopf": "𝔻", + "Dot": "¨", + "DotDot": "⃜", + "DotEqual": "≐", + "DoubleContourIntegral": "∯", + "DoubleDot": "¨", + "DoubleDownArrow": "⇓", + "DoubleLeftArrow": "⇐", + "DoubleLeftRightArrow": "⇔", + "DoubleLeftTee": "⫤", + "DoubleLongLeftArrow": "⟸", + "DoubleLongLeftRightArrow": "⟺", + "DoubleLongRightArrow": "⟹", + "DoubleRightArrow": "⇒", + "DoubleRightTee": "⊨", + "DoubleUpArrow": "⇑", + "DoubleUpDownArrow": "⇕", + "DoubleVerticalBar": "∥", + "DownArrow": "↓", + "DownArrowBar": "⤓", + "DownArrowUpArrow": "⇵", + "DownBreve": "̑", + "DownLeftRightVector": "⥐", + "DownLeftTeeVector": "⥞", + "DownLeftVector": "↽", + "DownLeftVectorBar": "⥖", + "DownRightTeeVector": "⥟", + "DownRightVector": "⇁", + "DownRightVectorBar": "⥗", + "DownTee": "⊤", + "DownTeeArrow": "↧", + "Downarrow": "⇓", + "Dscr": "𝒟", + "Dstrok": "Đ", + "ENG": "Ŋ", + "ET": "Ð", + "ETH": "Ð", + "Eacut": "É", + "Eacute": "É", + "Ecaron": "Ě", + "Ecir": "Ê", + "Ecirc": "Ê", + "Ecy": "Э", + "Edot": "Ė", + "Efr": "𝔈", + "Egrav": "È", + "Egrave": "È", + "Element": "∈", + "Emacr": "Ē", + "EmptySmallSquare": "◻", + "EmptyVerySmallSquare": "▫", + "Eogon": "Ę", + "Eopf": "𝔼", + "Epsilon": "Ε", + "Equal": "⩵", + "EqualTilde": "≂", + "Equilibrium": "⇌", + "Escr": "ℰ", + "Esim": "⩳", + "Eta": "Η", + "Eum": "Ë", + "Euml": "Ë", + "Exists": "∃", + "ExponentialE": "ⅇ", + "Fcy": "Ф", + "Ffr": "𝔉", + "FilledSmallSquare": "◼", + "FilledVerySmallSquare": "▪", + "Fopf": "𝔽", + "ForAll": "∀", + "Fouriertrf": "ℱ", + "Fscr": "ℱ", + "GJcy": "Ѓ", + "G": ">", + "GT": ">", + "Gamma": "Γ", + "Gammad": "Ϝ", + "Gbreve": "Ğ", + "Gcedil": "Ģ", + "Gcirc": "Ĝ", + "Gcy": "Г", + "Gdot": "Ġ", + "Gfr": "𝔊", + "Gg": "⋙", + "Gopf": "𝔾", + "GreaterEqual": "≥", + "GreaterEqualLess": "⋛", + "GreaterFullEqual": "≧", + "GreaterGreater": "⪢", + "GreaterLess": "≷", + "GreaterSlantEqual": "⩾", + "GreaterTilde": "≳", + "Gscr": "𝒢", + "Gt": "≫", + "HARDcy": "Ъ", + "Hacek": "ˇ", + "Hat": "^", + "Hcirc": "Ĥ", + "Hfr": "ℌ", + "HilbertSpace": "ℋ", + "Hopf": "ℍ", + "HorizontalLine": "─", + "Hscr": "ℋ", + "Hstrok": "Ħ", + "HumpDownHump": "≎", + "HumpEqual": "≏", + "IEcy": "Е", + "IJlig": "IJ", + "IOcy": "Ё", + "Iacut": "Í", + "Iacute": "Í", + "Icir": "Î", + "Icirc": "Î", + "Icy": "И", + "Idot": "İ", + "Ifr": "ℑ", + "Igrav": "Ì", + "Igrave": "Ì", + "Im": "ℑ", + "Imacr": "Ī", + "ImaginaryI": "ⅈ", + "Implies": "⇒", + "Int": "∬", + "Integral": "∫", + "Intersection": "⋂", + "InvisibleComma": "⁣", + "InvisibleTimes": "⁢", + "Iogon": "Į", + "Iopf": "𝕀", + "Iota": "Ι", + "Iscr": "ℐ", + "Itilde": "Ĩ", + "Iukcy": "І", + "Ium": "Ï", + "Iuml": "Ï", + "Jcirc": "Ĵ", + "Jcy": "Й", + "Jfr": "𝔍", + "Jopf": "𝕁", + "Jscr": "𝒥", + "Jsercy": "Ј", + "Jukcy": "Є", + "KHcy": "Х", + "KJcy": "Ќ", + "Kappa": "Κ", + "Kcedil": "Ķ", + "Kcy": "К", + "Kfr": "𝔎", + "Kopf": "𝕂", + "Kscr": "𝒦", + "LJcy": "Љ", + "L": "<", + "LT": "<", + "Lacute": "Ĺ", + "Lambda": "Λ", + "Lang": "⟪", + "Laplacetrf": "ℒ", + "Larr": "↞", + "Lcaron": "Ľ", + "Lcedil": "Ļ", + "Lcy": "Л", + "LeftAngleBracket": "⟨", + "LeftArrow": "←", + "LeftArrowBar": "⇤", + "LeftArrowRightArrow": "⇆", + "LeftCeiling": "⌈", + "LeftDoubleBracket": "⟦", + "LeftDownTeeVector": "⥡", + "LeftDownVector": "⇃", + "LeftDownVectorBar": "⥙", + "LeftFloor": "⌊", + "LeftRightArrow": "↔", + "LeftRightVector": "⥎", + "LeftTee": "⊣", + "LeftTeeArrow": "↤", + "LeftTeeVector": "⥚", + "LeftTriangle": "⊲", + "LeftTriangleBar": "⧏", + "LeftTriangleEqual": "⊴", + "LeftUpDownVector": "⥑", + "LeftUpTeeVector": "⥠", + "LeftUpVector": "↿", + "LeftUpVectorBar": "⥘", + "LeftVector": "↼", + "LeftVectorBar": "⥒", + "Leftarrow": "⇐", + "Leftrightarrow": "⇔", + "LessEqualGreater": "⋚", + "LessFullEqual": "≦", + "LessGreater": "≶", + "LessLess": "⪡", + "LessSlantEqual": "⩽", + "LessTilde": "≲", + "Lfr": "𝔏", + "Ll": "⋘", + "Lleftarrow": "⇚", + "Lmidot": "Ŀ", + "LongLeftArrow": "⟵", + "LongLeftRightArrow": "⟷", + "LongRightArrow": "⟶", + "Longleftarrow": "⟸", + "Longleftrightarrow": "⟺", + "Longrightarrow": "⟹", + "Lopf": "𝕃", + "LowerLeftArrow": "↙", + "LowerRightArrow": "↘", + "Lscr": "ℒ", + "Lsh": "↰", + "Lstrok": "Ł", + "Lt": "≪", + "Map": "⤅", + "Mcy": "М", + "MediumSpace": " ", + "Mellintrf": "ℳ", + "Mfr": "𝔐", + "MinusPlus": "∓", + "Mopf": "𝕄", + "Mscr": "ℳ", + "Mu": "Μ", + "NJcy": "Њ", + "Nacute": "Ń", + "Ncaron": "Ň", + "Ncedil": "Ņ", + "Ncy": "Н", + "NegativeMediumSpace": "​", + "NegativeThickSpace": "​", + "NegativeThinSpace": "​", + "NegativeVeryThinSpace": "​", + "NestedGreaterGreater": "≫", + "NestedLessLess": "≪", + "NewLine": "\n", + "Nfr": "𝔑", + "NoBreak": "⁠", + "NonBreakingSpace": " ", + "Nopf": "ℕ", + "Not": "⫬", + "NotCongruent": "≢", + "NotCupCap": "≭", + "NotDoubleVerticalBar": "∦", + "NotElement": "∉", + "NotEqual": "≠", + "NotEqualTilde": "≂̸", + "NotExists": "∄", + "NotGreater": "≯", + "NotGreaterEqual": "≱", + "NotGreaterFullEqual": "≧̸", + "NotGreaterGreater": "≫̸", + "NotGreaterLess": "≹", + "NotGreaterSlantEqual": "⩾̸", + "NotGreaterTilde": "≵", + "NotHumpDownHump": "≎̸", + "NotHumpEqual": "≏̸", + "NotLeftTriangle": "⋪", + "NotLeftTriangleBar": "⧏̸", + "NotLeftTriangleEqual": "⋬", + "NotLess": "≮", + "NotLessEqual": "≰", + "NotLessGreater": "≸", + "NotLessLess": "≪̸", + "NotLessSlantEqual": "⩽̸", + "NotLessTilde": "≴", + "NotNestedGreaterGreater": "⪢̸", + "NotNestedLessLess": "⪡̸", + "NotPrecedes": "⊀", + "NotPrecedesEqual": "⪯̸", + "NotPrecedesSlantEqual": "⋠", + "NotReverseElement": "∌", + "NotRightTriangle": "⋫", + "NotRightTriangleBar": "⧐̸", + "NotRightTriangleEqual": "⋭", + "NotSquareSubset": "⊏̸", + "NotSquareSubsetEqual": "⋢", + "NotSquareSuperset": "⊐̸", + "NotSquareSupersetEqual": "⋣", + "NotSubset": "⊂⃒", + "NotSubsetEqual": "⊈", + "NotSucceeds": "⊁", + "NotSucceedsEqual": "⪰̸", + "NotSucceedsSlantEqual": "⋡", + "NotSucceedsTilde": "≿̸", + "NotSuperset": "⊃⃒", + "NotSupersetEqual": "⊉", + "NotTilde": "≁", + "NotTildeEqual": "≄", + "NotTildeFullEqual": "≇", + "NotTildeTilde": "≉", + "NotVerticalBar": "∤", + "Nscr": "𝒩", + "Ntild": "Ñ", + "Ntilde": "Ñ", + "Nu": "Ν", + "OElig": "Œ", + "Oacut": "Ó", + "Oacute": "Ó", + "Ocir": "Ô", + "Ocirc": "Ô", + "Ocy": "О", + "Odblac": "Ő", + "Ofr": "𝔒", + "Ograv": "Ò", + "Ograve": "Ò", + "Omacr": "Ō", + "Omega": "Ω", + "Omicron": "Ο", + "Oopf": "𝕆", + "OpenCurlyDoubleQuote": "“", + "OpenCurlyQuote": "‘", + "Or": "⩔", + "Oscr": "𝒪", + "Oslas": "Ø", + "Oslash": "Ø", + "Otild": "Õ", + "Otilde": "Õ", + "Otimes": "⨷", + "Oum": "Ö", + "Ouml": "Ö", + "OverBar": "‾", + "OverBrace": "⏞", + "OverBracket": "⎴", + "OverParenthesis": "⏜", + "PartialD": "∂", + "Pcy": "П", + "Pfr": "𝔓", + "Phi": "Φ", + "Pi": "Π", + "PlusMinus": "±", + "Poincareplane": "ℌ", + "Popf": "ℙ", + "Pr": "⪻", + "Precedes": "≺", + "PrecedesEqual": "⪯", + "PrecedesSlantEqual": "≼", + "PrecedesTilde": "≾", + "Prime": "″", + "Product": "∏", + "Proportion": "∷", + "Proportional": "∝", + "Pscr": "𝒫", + "Psi": "Ψ", + "QUO": "\"", + "QUOT": "\"", + "Qfr": "𝔔", + "Qopf": "ℚ", + "Qscr": "𝒬", + "RBarr": "⤐", + "RE": "®", + "REG": "®", + "Racute": "Ŕ", + "Rang": "⟫", + "Rarr": "↠", + "Rarrtl": "⤖", + "Rcaron": "Ř", + "Rcedil": "Ŗ", + "Rcy": "Р", + "Re": "ℜ", + "ReverseElement": "∋", + "ReverseEquilibrium": "⇋", + "ReverseUpEquilibrium": "⥯", + "Rfr": "ℜ", + "Rho": "Ρ", + "RightAngleBracket": "⟩", + "RightArrow": "→", + "RightArrowBar": "⇥", + "RightArrowLeftArrow": "⇄", + "RightCeiling": "⌉", + "RightDoubleBracket": "⟧", + "RightDownTeeVector": "⥝", + "RightDownVector": "⇂", + "RightDownVectorBar": "⥕", + "RightFloor": "⌋", + "RightTee": "⊢", + "RightTeeArrow": "↦", + "RightTeeVector": "⥛", + "RightTriangle": "⊳", + "RightTriangleBar": "⧐", + "RightTriangleEqual": "⊵", + "RightUpDownVector": "⥏", + "RightUpTeeVector": "⥜", + "RightUpVector": "↾", + "RightUpVectorBar": "⥔", + "RightVector": "⇀", + "RightVectorBar": "⥓", + "Rightarrow": "⇒", + "Ropf": "ℝ", + "RoundImplies": "⥰", + "Rrightarrow": "⇛", + "Rscr": "ℛ", + "Rsh": "↱", + "RuleDelayed": "⧴", + "SHCHcy": "Щ", + "SHcy": "Ш", + "SOFTcy": "Ь", + "Sacute": "Ś", + "Sc": "⪼", + "Scaron": "Š", + "Scedil": "Ş", + "Scirc": "Ŝ", + "Scy": "С", + "Sfr": "𝔖", + "ShortDownArrow": "↓", + "ShortLeftArrow": "←", + "ShortRightArrow": "→", + "ShortUpArrow": "↑", + "Sigma": "Σ", + "SmallCircle": "∘", + "Sopf": "𝕊", + "Sqrt": "√", + "Square": "□", + "SquareIntersection": "⊓", + "SquareSubset": "⊏", + "SquareSubsetEqual": "⊑", + "SquareSuperset": "⊐", + "SquareSupersetEqual": "⊒", + "SquareUnion": "⊔", + "Sscr": "𝒮", + "Star": "⋆", + "Sub": "⋐", + "Subset": "⋐", + "SubsetEqual": "⊆", + "Succeeds": "≻", + "SucceedsEqual": "⪰", + "SucceedsSlantEqual": "≽", + "SucceedsTilde": "≿", + "SuchThat": "∋", + "Sum": "∑", + "Sup": "⋑", + "Superset": "⊃", + "SupersetEqual": "⊇", + "Supset": "⋑", + "THOR": "Þ", + "THORN": "Þ", + "TRADE": "™", + "TSHcy": "Ћ", + "TScy": "Ц", + "Tab": "\t", + "Tau": "Τ", + "Tcaron": "Ť", + "Tcedil": "Ţ", + "Tcy": "Т", + "Tfr": "𝔗", + "Therefore": "∴", + "Theta": "Θ", + "ThickSpace": "  ", + "ThinSpace": " ", + "Tilde": "∼", + "TildeEqual": "≃", + "TildeFullEqual": "≅", + "TildeTilde": "≈", + "Topf": "𝕋", + "TripleDot": "⃛", + "Tscr": "𝒯", + "Tstrok": "Ŧ", + "Uacut": "Ú", + "Uacute": "Ú", + "Uarr": "↟", + "Uarrocir": "⥉", + "Ubrcy": "Ў", + "Ubreve": "Ŭ", + "Ucir": "Û", + "Ucirc": "Û", + "Ucy": "У", + "Udblac": "Ű", + "Ufr": "𝔘", + "Ugrav": "Ù", + "Ugrave": "Ù", + "Umacr": "Ū", + "UnderBar": "_", + "UnderBrace": "⏟", + "UnderBracket": "⎵", + "UnderParenthesis": "⏝", + "Union": "⋃", + "UnionPlus": "⊎", + "Uogon": "Ų", + "Uopf": "𝕌", + "UpArrow": "↑", + "UpArrowBar": "⤒", + "UpArrowDownArrow": "⇅", + "UpDownArrow": "↕", + "UpEquilibrium": "⥮", + "UpTee": "⊥", + "UpTeeArrow": "↥", + "Uparrow": "⇑", + "Updownarrow": "⇕", + "UpperLeftArrow": "↖", + "UpperRightArrow": "↗", + "Upsi": "ϒ", + "Upsilon": "Υ", + "Uring": "Ů", + "Uscr": "𝒰", + "Utilde": "Ũ", + "Uum": "Ü", + "Uuml": "Ü", + "VDash": "⊫", + "Vbar": "⫫", + "Vcy": "В", + "Vdash": "⊩", + "Vdashl": "⫦", + "Vee": "⋁", + "Verbar": "‖", + "Vert": "‖", + "VerticalBar": "∣", + "VerticalLine": "|", + "VerticalSeparator": "❘", + "VerticalTilde": "≀", + "VeryThinSpace": " ", + "Vfr": "𝔙", + "Vopf": "𝕍", + "Vscr": "𝒱", + "Vvdash": "⊪", + "Wcirc": "Ŵ", + "Wedge": "⋀", + "Wfr": "𝔚", + "Wopf": "𝕎", + "Wscr": "𝒲", + "Xfr": "𝔛", + "Xi": "Ξ", + "Xopf": "𝕏", + "Xscr": "𝒳", + "YAcy": "Я", + "YIcy": "Ї", + "YUcy": "Ю", + "Yacut": "Ý", + "Yacute": "Ý", + "Ycirc": "Ŷ", + "Ycy": "Ы", + "Yfr": "𝔜", + "Yopf": "𝕐", + "Yscr": "𝒴", + "Yuml": "Ÿ", + "ZHcy": "Ж", + "Zacute": "Ź", + "Zcaron": "Ž", + "Zcy": "З", + "Zdot": "Ż", + "ZeroWidthSpace": "​", + "Zeta": "Ζ", + "Zfr": "ℨ", + "Zopf": "ℤ", + "Zscr": "𝒵", + "aacut": "á", + "aacute": "á", + "abreve": "ă", + "ac": "∾", + "acE": "∾̳", + "acd": "∿", + "acir": "â", + "acirc": "â", + "acut": "´", + "acute": "´", + "acy": "а", + "aeli": "æ", + "aelig": "æ", + "af": "⁡", + "afr": "𝔞", + "agrav": "à", + "agrave": "à", + "alefsym": "ℵ", + "aleph": "ℵ", + "alpha": "α", + "amacr": "ā", + "amalg": "⨿", + "am": "&", + "amp": "&", + "and": "∧", + "andand": "⩕", + "andd": "⩜", + "andslope": "⩘", + "andv": "⩚", + "ang": "∠", + "ange": "⦤", + "angle": "∠", + "angmsd": "∡", + "angmsdaa": "⦨", + "angmsdab": "⦩", + "angmsdac": "⦪", + "angmsdad": "⦫", + "angmsdae": "⦬", + "angmsdaf": "⦭", + "angmsdag": "⦮", + "angmsdah": "⦯", + "angrt": "∟", + "angrtvb": "⊾", + "angrtvbd": "⦝", + "angsph": "∢", + "angst": "Å", + "angzarr": "⍼", + "aogon": "ą", + "aopf": "𝕒", + "ap": "≈", + "apE": "⩰", + "apacir": "⩯", + "ape": "≊", + "apid": "≋", + "apos": "'", + "approx": "≈", + "approxeq": "≊", + "arin": "å", + "aring": "å", + "ascr": "𝒶", + "ast": "*", + "asymp": "≈", + "asympeq": "≍", + "atild": "ã", + "atilde": "ã", + "aum": "ä", + "auml": "ä", + "awconint": "∳", + "awint": "⨑", + "bNot": "⫭", + "backcong": "≌", + "backepsilon": "϶", + "backprime": "‵", + "backsim": "∽", + "backsimeq": "⋍", + "barvee": "⊽", + "barwed": "⌅", + "barwedge": "⌅", + "bbrk": "⎵", + "bbrktbrk": "⎶", + "bcong": "≌", + "bcy": "б", + "bdquo": "„", + "becaus": "∵", + "because": "∵", + "bemptyv": "⦰", + "bepsi": "϶", + "bernou": "ℬ", + "beta": "β", + "beth": "ℶ", + "between": "≬", + "bfr": "𝔟", + "bigcap": "⋂", + "bigcirc": "◯", + "bigcup": "⋃", + "bigodot": "⨀", + "bigoplus": "⨁", + "bigotimes": "⨂", + "bigsqcup": "⨆", + "bigstar": "★", + "bigtriangledown": "▽", + "bigtriangleup": "△", + "biguplus": "⨄", + "bigvee": "⋁", + "bigwedge": "⋀", + "bkarow": "⤍", + "blacklozenge": "⧫", + "blacksquare": "▪", + "blacktriangle": "▴", + "blacktriangledown": "▾", + "blacktriangleleft": "◂", + "blacktriangleright": "▸", + "blank": "␣", + "blk12": "▒", + "blk14": "░", + "blk34": "▓", + "block": "█", + "bne": "=⃥", + "bnequiv": "≡⃥", + "bnot": "⌐", + "bopf": "𝕓", + "bot": "⊥", + "bottom": "⊥", + "bowtie": "⋈", + "boxDL": "╗", + "boxDR": "╔", + "boxDl": "╖", + "boxDr": "╓", + "boxH": "═", + "boxHD": "╦", + "boxHU": "╩", + "boxHd": "╤", + "boxHu": "╧", + "boxUL": "╝", + "boxUR": "╚", + "boxUl": "╜", + "boxUr": "╙", + "boxV": "║", + "boxVH": "╬", + "boxVL": "╣", + "boxVR": "╠", + "boxVh": "╫", + "boxVl": "╢", + "boxVr": "╟", + "boxbox": "⧉", + "boxdL": "╕", + "boxdR": "╒", + "boxdl": "┐", + "boxdr": "┌", + "boxh": "─", + "boxhD": "╥", + "boxhU": "╨", + "boxhd": "┬", + "boxhu": "┴", + "boxminus": "⊟", + "boxplus": "⊞", + "boxtimes": "⊠", + "boxuL": "╛", + "boxuR": "╘", + "boxul": "┘", + "boxur": "└", + "boxv": "│", + "boxvH": "╪", + "boxvL": "╡", + "boxvR": "╞", + "boxvh": "┼", + "boxvl": "┤", + "boxvr": "├", + "bprime": "‵", + "breve": "˘", + "brvba": "¦", + "brvbar": "¦", + "bscr": "𝒷", + "bsemi": "⁏", + "bsim": "∽", + "bsime": "⋍", + "bsol": "\\", + "bsolb": "⧅", + "bsolhsub": "⟈", + "bull": "•", + "bullet": "•", + "bump": "≎", + "bumpE": "⪮", + "bumpe": "≏", + "bumpeq": "≏", + "cacute": "ć", + "cap": "∩", + "capand": "⩄", + "capbrcup": "⩉", + "capcap": "⩋", + "capcup": "⩇", + "capdot": "⩀", + "caps": "∩︀", + "caret": "⁁", + "caron": "ˇ", + "ccaps": "⩍", + "ccaron": "č", + "ccedi": "ç", + "ccedil": "ç", + "ccirc": "ĉ", + "ccups": "⩌", + "ccupssm": "⩐", + "cdot": "ċ", + "cedi": "¸", + "cedil": "¸", + "cemptyv": "⦲", + "cen": "¢", + "cent": "¢", + "centerdot": "·", + "cfr": "𝔠", + "chcy": "ч", + "check": "✓", + "checkmark": "✓", + "chi": "χ", + "cir": "○", + "cirE": "⧃", + "circ": "ˆ", + "circeq": "≗", + "circlearrowleft": "↺", + "circlearrowright": "↻", + "circledR": "®", + "circledS": "Ⓢ", + "circledast": "⊛", + "circledcirc": "⊚", + "circleddash": "⊝", + "cire": "≗", + "cirfnint": "⨐", + "cirmid": "⫯", + "cirscir": "⧂", + "clubs": "♣", + "clubsuit": "♣", + "colon": ":", + "colone": "≔", + "coloneq": "≔", + "comma": ",", + "commat": "@", + "comp": "∁", + "compfn": "∘", + "complement": "∁", + "complexes": "ℂ", + "cong": "≅", + "congdot": "⩭", + "conint": "∮", + "copf": "𝕔", + "coprod": "∐", + "cop": "©", + "copy": "©", + "copysr": "℗", + "crarr": "↵", + "cross": "✗", + "cscr": "𝒸", + "csub": "⫏", + "csube": "⫑", + "csup": "⫐", + "csupe": "⫒", + "ctdot": "⋯", + "cudarrl": "⤸", + "cudarrr": "⤵", + "cuepr": "⋞", + "cuesc": "⋟", + "cularr": "↶", + "cularrp": "⤽", + "cup": "∪", + "cupbrcap": "⩈", + "cupcap": "⩆", + "cupcup": "⩊", + "cupdot": "⊍", + "cupor": "⩅", + "cups": "∪︀", + "curarr": "↷", + "curarrm": "⤼", + "curlyeqprec": "⋞", + "curlyeqsucc": "⋟", + "curlyvee": "⋎", + "curlywedge": "⋏", + "curre": "¤", + "curren": "¤", + "curvearrowleft": "↶", + "curvearrowright": "↷", + "cuvee": "⋎", + "cuwed": "⋏", + "cwconint": "∲", + "cwint": "∱", + "cylcty": "⌭", + "dArr": "⇓", + "dHar": "⥥", + "dagger": "†", + "daleth": "ℸ", + "darr": "↓", + "dash": "‐", + "dashv": "⊣", + "dbkarow": "⤏", + "dblac": "˝", + "dcaron": "ď", + "dcy": "д", + "dd": "ⅆ", + "ddagger": "‡", + "ddarr": "⇊", + "ddotseq": "⩷", + "de": "°", + "deg": "°", + "delta": "δ", + "demptyv": "⦱", + "dfisht": "⥿", + "dfr": "𝔡", + "dharl": "⇃", + "dharr": "⇂", + "diam": "⋄", + "diamond": "⋄", + "diamondsuit": "♦", + "diams": "♦", + "die": "¨", + "digamma": "ϝ", + "disin": "⋲", + "div": "÷", + "divid": "÷", + "divide": "÷", + "divideontimes": "⋇", + "divonx": "⋇", + "djcy": "ђ", + "dlcorn": "⌞", + "dlcrop": "⌍", + "dollar": "$", + "dopf": "𝕕", + "dot": "˙", + "doteq": "≐", + "doteqdot": "≑", + "dotminus": "∸", + "dotplus": "∔", + "dotsquare": "⊡", + "doublebarwedge": "⌆", + "downarrow": "↓", + "downdownarrows": "⇊", + "downharpoonleft": "⇃", + "downharpoonright": "⇂", + "drbkarow": "⤐", + "drcorn": "⌟", + "drcrop": "⌌", + "dscr": "𝒹", + "dscy": "ѕ", + "dsol": "⧶", + "dstrok": "đ", + "dtdot": "⋱", + "dtri": "▿", + "dtrif": "▾", + "duarr": "⇵", + "duhar": "⥯", + "dwangle": "⦦", + "dzcy": "џ", + "dzigrarr": "⟿", + "eDDot": "⩷", + "eDot": "≑", + "eacut": "é", + "eacute": "é", + "easter": "⩮", + "ecaron": "ě", + "ecir": "ê", + "ecirc": "ê", + "ecolon": "≕", + "ecy": "э", + "edot": "ė", + "ee": "ⅇ", + "efDot": "≒", + "efr": "𝔢", + "eg": "⪚", + "egrav": "è", + "egrave": "è", + "egs": "⪖", + "egsdot": "⪘", + "el": "⪙", + "elinters": "⏧", + "ell": "ℓ", + "els": "⪕", + "elsdot": "⪗", + "emacr": "ē", + "empty": "∅", + "emptyset": "∅", + "emptyv": "∅", + "emsp13": " ", + "emsp14": " ", + "emsp": " ", + "eng": "ŋ", + "ensp": " ", + "eogon": "ę", + "eopf": "𝕖", + "epar": "⋕", + "eparsl": "⧣", + "eplus": "⩱", + "epsi": "ε", + "epsilon": "ε", + "epsiv": "ϵ", + "eqcirc": "≖", + "eqcolon": "≕", + "eqsim": "≂", + "eqslantgtr": "⪖", + "eqslantless": "⪕", + "equals": "=", + "equest": "≟", + "equiv": "≡", + "equivDD": "⩸", + "eqvparsl": "⧥", + "erDot": "≓", + "erarr": "⥱", + "escr": "ℯ", + "esdot": "≐", + "esim": "≂", + "eta": "η", + "et": "ð", + "eth": "ð", + "eum": "ë", + "euml": "ë", + "euro": "€", + "excl": "!", + "exist": "∃", + "expectation": "ℰ", + "exponentiale": "ⅇ", + "fallingdotseq": "≒", + "fcy": "ф", + "female": "♀", + "ffilig": "ffi", + "fflig": "ff", + "ffllig": "ffl", + "ffr": "𝔣", + "filig": "fi", + "fjlig": "fj", + "flat": "♭", + "fllig": "fl", + "fltns": "▱", + "fnof": "ƒ", + "fopf": "𝕗", + "forall": "∀", + "fork": "⋔", + "forkv": "⫙", + "fpartint": "⨍", + "frac1": "¼", + "frac12": "½", + "frac13": "⅓", + "frac14": "¼", + "frac15": "⅕", + "frac16": "⅙", + "frac18": "⅛", + "frac23": "⅔", + "frac25": "⅖", + "frac3": "¾", + "frac34": "¾", + "frac35": "⅗", + "frac38": "⅜", + "frac45": "⅘", + "frac56": "⅚", + "frac58": "⅝", + "frac78": "⅞", + "frasl": "⁄", + "frown": "⌢", + "fscr": "𝒻", + "gE": "≧", + "gEl": "⪌", + "gacute": "ǵ", + "gamma": "γ", + "gammad": "ϝ", + "gap": "⪆", + "gbreve": "ğ", + "gcirc": "ĝ", + "gcy": "г", + "gdot": "ġ", + "ge": "≥", + "gel": "⋛", + "geq": "≥", + "geqq": "≧", + "geqslant": "⩾", + "ges": "⩾", + "gescc": "⪩", + "gesdot": "⪀", + "gesdoto": "⪂", + "gesdotol": "⪄", + "gesl": "⋛︀", + "gesles": "⪔", + "gfr": "𝔤", + "gg": "≫", + "ggg": "⋙", + "gimel": "ℷ", + "gjcy": "ѓ", + "gl": "≷", + "glE": "⪒", + "gla": "⪥", + "glj": "⪤", + "gnE": "≩", + "gnap": "⪊", + "gnapprox": "⪊", + "gne": "⪈", + "gneq": "⪈", + "gneqq": "≩", + "gnsim": "⋧", + "gopf": "𝕘", + "grave": "`", + "gscr": "ℊ", + "gsim": "≳", + "gsime": "⪎", + "gsiml": "⪐", + "g": ">", + "gt": ">", + "gtcc": "⪧", + "gtcir": "⩺", + "gtdot": "⋗", + "gtlPar": "⦕", + "gtquest": "⩼", + "gtrapprox": "⪆", + "gtrarr": "⥸", + "gtrdot": "⋗", + "gtreqless": "⋛", + "gtreqqless": "⪌", + "gtrless": "≷", + "gtrsim": "≳", + "gvertneqq": "≩︀", + "gvnE": "≩︀", + "hArr": "⇔", + "hairsp": " ", + "half": "½", + "hamilt": "ℋ", + "hardcy": "ъ", + "harr": "↔", + "harrcir": "⥈", + "harrw": "↭", + "hbar": "ℏ", + "hcirc": "ĥ", + "hearts": "♥", + "heartsuit": "♥", + "hellip": "…", + "hercon": "⊹", + "hfr": "𝔥", + "hksearow": "⤥", + "hkswarow": "⤦", + "hoarr": "⇿", + "homtht": "∻", + "hookleftarrow": "↩", + "hookrightarrow": "↪", + "hopf": "𝕙", + "horbar": "―", + "hscr": "𝒽", + "hslash": "ℏ", + "hstrok": "ħ", + "hybull": "⁃", + "hyphen": "‐", + "iacut": "í", + "iacute": "í", + "ic": "⁣", + "icir": "î", + "icirc": "î", + "icy": "и", + "iecy": "е", + "iexc": "¡", + "iexcl": "¡", + "iff": "⇔", + "ifr": "𝔦", + "igrav": "ì", + "igrave": "ì", + "ii": "ⅈ", + "iiiint": "⨌", + "iiint": "∭", + "iinfin": "⧜", + "iiota": "℩", + "ijlig": "ij", + "imacr": "ī", + "image": "ℑ", + "imagline": "ℐ", + "imagpart": "ℑ", + "imath": "ı", + "imof": "⊷", + "imped": "Ƶ", + "in": "∈", + "incare": "℅", + "infin": "∞", + "infintie": "⧝", + "inodot": "ı", + "int": "∫", + "intcal": "⊺", + "integers": "ℤ", + "intercal": "⊺", + "intlarhk": "⨗", + "intprod": "⨼", + "iocy": "ё", + "iogon": "į", + "iopf": "𝕚", + "iota": "ι", + "iprod": "⨼", + "iques": "¿", + "iquest": "¿", + "iscr": "𝒾", + "isin": "∈", + "isinE": "⋹", + "isindot": "⋵", + "isins": "⋴", + "isinsv": "⋳", + "isinv": "∈", + "it": "⁢", + "itilde": "ĩ", + "iukcy": "і", + "ium": "ï", + "iuml": "ï", + "jcirc": "ĵ", + "jcy": "й", + "jfr": "𝔧", + "jmath": "ȷ", + "jopf": "𝕛", + "jscr": "𝒿", + "jsercy": "ј", + "jukcy": "є", + "kappa": "κ", + "kappav": "ϰ", + "kcedil": "ķ", + "kcy": "к", + "kfr": "𝔨", + "kgreen": "ĸ", + "khcy": "х", + "kjcy": "ќ", + "kopf": "𝕜", + "kscr": "𝓀", + "lAarr": "⇚", + "lArr": "⇐", + "lAtail": "⤛", + "lBarr": "⤎", + "lE": "≦", + "lEg": "⪋", + "lHar": "⥢", + "lacute": "ĺ", + "laemptyv": "⦴", + "lagran": "ℒ", + "lambda": "λ", + "lang": "⟨", + "langd": "⦑", + "langle": "⟨", + "lap": "⪅", + "laqu": "«", + "laquo": "«", + "larr": "←", + "larrb": "⇤", + "larrbfs": "⤟", + "larrfs": "⤝", + "larrhk": "↩", + "larrlp": "↫", + "larrpl": "⤹", + "larrsim": "⥳", + "larrtl": "↢", + "lat": "⪫", + "latail": "⤙", + "late": "⪭", + "lates": "⪭︀", + "lbarr": "⤌", + "lbbrk": "❲", + "lbrace": "{", + "lbrack": "[", + "lbrke": "⦋", + "lbrksld": "⦏", + "lbrkslu": "⦍", + "lcaron": "ľ", + "lcedil": "ļ", + "lceil": "⌈", + "lcub": "{", + "lcy": "л", + "ldca": "⤶", + "ldquo": "“", + "ldquor": "„", + "ldrdhar": "⥧", + "ldrushar": "⥋", + "ldsh": "↲", + "le": "≤", + "leftarrow": "←", + "leftarrowtail": "↢", + "leftharpoondown": "↽", + "leftharpoonup": "↼", + "leftleftarrows": "⇇", + "leftrightarrow": "↔", + "leftrightarrows": "⇆", + "leftrightharpoons": "⇋", + "leftrightsquigarrow": "↭", + "leftthreetimes": "⋋", + "leg": "⋚", + "leq": "≤", + "leqq": "≦", + "leqslant": "⩽", + "les": "⩽", + "lescc": "⪨", + "lesdot": "⩿", + "lesdoto": "⪁", + "lesdotor": "⪃", + "lesg": "⋚︀", + "lesges": "⪓", + "lessapprox": "⪅", + "lessdot": "⋖", + "lesseqgtr": "⋚", + "lesseqqgtr": "⪋", + "lessgtr": "≶", + "lesssim": "≲", + "lfisht": "⥼", + "lfloor": "⌊", + "lfr": "𝔩", + "lg": "≶", + "lgE": "⪑", + "lhard": "↽", + "lharu": "↼", + "lharul": "⥪", + "lhblk": "▄", + "ljcy": "љ", + "ll": "≪", + "llarr": "⇇", + "llcorner": "⌞", + "llhard": "⥫", + "lltri": "◺", + "lmidot": "ŀ", + "lmoust": "⎰", + "lmoustache": "⎰", + "lnE": "≨", + "lnap": "⪉", + "lnapprox": "⪉", + "lne": "⪇", + "lneq": "⪇", + "lneqq": "≨", + "lnsim": "⋦", + "loang": "⟬", + "loarr": "⇽", + "lobrk": "⟦", + "longleftarrow": "⟵", + "longleftrightarrow": "⟷", + "longmapsto": "⟼", + "longrightarrow": "⟶", + "looparrowleft": "↫", + "looparrowright": "↬", + "lopar": "⦅", + "lopf": "𝕝", + "loplus": "⨭", + "lotimes": "⨴", + "lowast": "∗", + "lowbar": "_", + "loz": "◊", + "lozenge": "◊", + "lozf": "⧫", + "lpar": "(", + "lparlt": "⦓", + "lrarr": "⇆", + "lrcorner": "⌟", + "lrhar": "⇋", + "lrhard": "⥭", + "lrm": "‎", + "lrtri": "⊿", + "lsaquo": "‹", + "lscr": "𝓁", + "lsh": "↰", + "lsim": "≲", + "lsime": "⪍", + "lsimg": "⪏", + "lsqb": "[", + "lsquo": "‘", + "lsquor": "‚", + "lstrok": "ł", + "l": "<", + "lt": "<", + "ltcc": "⪦", + "ltcir": "⩹", + "ltdot": "⋖", + "lthree": "⋋", + "ltimes": "⋉", + "ltlarr": "⥶", + "ltquest": "⩻", + "ltrPar": "⦖", + "ltri": "◃", + "ltrie": "⊴", + "ltrif": "◂", + "lurdshar": "⥊", + "luruhar": "⥦", + "lvertneqq": "≨︀", + "lvnE": "≨︀", + "mDDot": "∺", + "mac": "¯", + "macr": "¯", + "male": "♂", + "malt": "✠", + "maltese": "✠", + "map": "↦", + "mapsto": "↦", + "mapstodown": "↧", + "mapstoleft": "↤", + "mapstoup": "↥", + "marker": "▮", + "mcomma": "⨩", + "mcy": "м", + "mdash": "—", + "measuredangle": "∡", + "mfr": "𝔪", + "mho": "℧", + "micr": "µ", + "micro": "µ", + "mid": "∣", + "midast": "*", + "midcir": "⫰", + "middo": "·", + "middot": "·", + "minus": "−", + "minusb": "⊟", + "minusd": "∸", + "minusdu": "⨪", + "mlcp": "⫛", + "mldr": "…", + "mnplus": "∓", + "models": "⊧", + "mopf": "𝕞", + "mp": "∓", + "mscr": "𝓂", + "mstpos": "∾", + "mu": "μ", + "multimap": "⊸", + "mumap": "⊸", + "nGg": "⋙̸", + "nGt": "≫⃒", + "nGtv": "≫̸", + "nLeftarrow": "⇍", + "nLeftrightarrow": "⇎", + "nLl": "⋘̸", + "nLt": "≪⃒", + "nLtv": "≪̸", + "nRightarrow": "⇏", + "nVDash": "⊯", + "nVdash": "⊮", + "nabla": "∇", + "nacute": "ń", + "nang": "∠⃒", + "nap": "≉", + "napE": "⩰̸", + "napid": "≋̸", + "napos": "ʼn", + "napprox": "≉", + "natur": "♮", + "natural": "♮", + "naturals": "ℕ", + "nbs": " ", + "nbsp": " ", + "nbump": "≎̸", + "nbumpe": "≏̸", + "ncap": "⩃", + "ncaron": "ň", + "ncedil": "ņ", + "ncong": "≇", + "ncongdot": "⩭̸", + "ncup": "⩂", + "ncy": "н", + "ndash": "–", + "ne": "≠", + "neArr": "⇗", + "nearhk": "⤤", + "nearr": "↗", + "nearrow": "↗", + "nedot": "≐̸", + "nequiv": "≢", + "nesear": "⤨", + "nesim": "≂̸", + "nexist": "∄", + "nexists": "∄", + "nfr": "𝔫", + "ngE": "≧̸", + "nge": "≱", + "ngeq": "≱", + "ngeqq": "≧̸", + "ngeqslant": "⩾̸", + "nges": "⩾̸", + "ngsim": "≵", + "ngt": "≯", + "ngtr": "≯", + "nhArr": "⇎", + "nharr": "↮", + "nhpar": "⫲", + "ni": "∋", + "nis": "⋼", + "nisd": "⋺", + "niv": "∋", + "njcy": "њ", + "nlArr": "⇍", + "nlE": "≦̸", + "nlarr": "↚", + "nldr": "‥", + "nle": "≰", + "nleftarrow": "↚", + "nleftrightarrow": "↮", + "nleq": "≰", + "nleqq": "≦̸", + "nleqslant": "⩽̸", + "nles": "⩽̸", + "nless": "≮", + "nlsim": "≴", + "nlt": "≮", + "nltri": "⋪", + "nltrie": "⋬", + "nmid": "∤", + "nopf": "𝕟", + "no": "¬", + "not": "¬", + "notin": "∉", + "notinE": "⋹̸", + "notindot": "⋵̸", + "notinva": "∉", + "notinvb": "⋷", + "notinvc": "⋶", + "notni": "∌", + "notniva": "∌", + "notnivb": "⋾", + "notnivc": "⋽", + "npar": "∦", + "nparallel": "∦", + "nparsl": "⫽⃥", + "npart": "∂̸", + "npolint": "⨔", + "npr": "⊀", + "nprcue": "⋠", + "npre": "⪯̸", + "nprec": "⊀", + "npreceq": "⪯̸", + "nrArr": "⇏", + "nrarr": "↛", + "nrarrc": "⤳̸", + "nrarrw": "↝̸", + "nrightarrow": "↛", + "nrtri": "⋫", + "nrtrie": "⋭", + "nsc": "⊁", + "nsccue": "⋡", + "nsce": "⪰̸", + "nscr": "𝓃", + "nshortmid": "∤", + "nshortparallel": "∦", + "nsim": "≁", + "nsime": "≄", + "nsimeq": "≄", + "nsmid": "∤", + "nspar": "∦", + "nsqsube": "⋢", + "nsqsupe": "⋣", + "nsub": "⊄", + "nsubE": "⫅̸", + "nsube": "⊈", + "nsubset": "⊂⃒", + "nsubseteq": "⊈", + "nsubseteqq": "⫅̸", + "nsucc": "⊁", + "nsucceq": "⪰̸", + "nsup": "⊅", + "nsupE": "⫆̸", + "nsupe": "⊉", + "nsupset": "⊃⃒", + "nsupseteq": "⊉", + "nsupseteqq": "⫆̸", + "ntgl": "≹", + "ntild": "ñ", + "ntilde": "ñ", + "ntlg": "≸", + "ntriangleleft": "⋪", + "ntrianglelefteq": "⋬", + "ntriangleright": "⋫", + "ntrianglerighteq": "⋭", + "nu": "ν", + "num": "#", + "numero": "№", + "numsp": " ", + "nvDash": "⊭", + "nvHarr": "⤄", + "nvap": "≍⃒", + "nvdash": "⊬", + "nvge": "≥⃒", + "nvgt": ">⃒", + "nvinfin": "⧞", + "nvlArr": "⤂", + "nvle": "≤⃒", + "nvlt": "<⃒", + "nvltrie": "⊴⃒", + "nvrArr": "⤃", + "nvrtrie": "⊵⃒", + "nvsim": "∼⃒", + "nwArr": "⇖", + "nwarhk": "⤣", + "nwarr": "↖", + "nwarrow": "↖", + "nwnear": "⤧", + "oS": "Ⓢ", + "oacut": "ó", + "oacute": "ó", + "oast": "⊛", + "ocir": "ô", + "ocirc": "ô", + "ocy": "о", + "odash": "⊝", + "odblac": "ő", + "odiv": "⨸", + "odot": "⊙", + "odsold": "⦼", + "oelig": "œ", + "ofcir": "⦿", + "ofr": "𝔬", + "ogon": "˛", + "ograv": "ò", + "ograve": "ò", + "ogt": "⧁", + "ohbar": "⦵", + "ohm": "Ω", + "oint": "∮", + "olarr": "↺", + "olcir": "⦾", + "olcross": "⦻", + "oline": "‾", + "olt": "⧀", + "omacr": "ō", + "omega": "ω", + "omicron": "ο", + "omid": "⦶", + "ominus": "⊖", + "oopf": "𝕠", + "opar": "⦷", + "operp": "⦹", + "oplus": "⊕", + "or": "∨", + "orarr": "↻", + "ord": "º", + "order": "ℴ", + "orderof": "ℴ", + "ordf": "ª", + "ordm": "º", + "origof": "⊶", + "oror": "⩖", + "orslope": "⩗", + "orv": "⩛", + "oscr": "ℴ", + "oslas": "ø", + "oslash": "ø", + "osol": "⊘", + "otild": "õ", + "otilde": "õ", + "otimes": "⊗", + "otimesas": "⨶", + "oum": "ö", + "ouml": "ö", + "ovbar": "⌽", + "par": "¶", + "para": "¶", + "parallel": "∥", + "parsim": "⫳", + "parsl": "⫽", + "part": "∂", + "pcy": "п", + "percnt": "%", + "period": ".", + "permil": "‰", + "perp": "⊥", + "pertenk": "‱", + "pfr": "𝔭", + "phi": "φ", + "phiv": "ϕ", + "phmmat": "ℳ", + "phone": "☎", + "pi": "π", + "pitchfork": "⋔", + "piv": "ϖ", + "planck": "ℏ", + "planckh": "ℎ", + "plankv": "ℏ", + "plus": "+", + "plusacir": "⨣", + "plusb": "⊞", + "pluscir": "⨢", + "plusdo": "∔", + "plusdu": "⨥", + "pluse": "⩲", + "plusm": "±", + "plusmn": "±", + "plussim": "⨦", + "plustwo": "⨧", + "pm": "±", + "pointint": "⨕", + "popf": "𝕡", + "poun": "£", + "pound": "£", + "pr": "≺", + "prE": "⪳", + "prap": "⪷", + "prcue": "≼", + "pre": "⪯", + "prec": "≺", + "precapprox": "⪷", + "preccurlyeq": "≼", + "preceq": "⪯", + "precnapprox": "⪹", + "precneqq": "⪵", + "precnsim": "⋨", + "precsim": "≾", + "prime": "′", + "primes": "ℙ", + "prnE": "⪵", + "prnap": "⪹", + "prnsim": "⋨", + "prod": "∏", + "profalar": "⌮", + "profline": "⌒", + "profsurf": "⌓", + "prop": "∝", + "propto": "∝", + "prsim": "≾", + "prurel": "⊰", + "pscr": "𝓅", + "psi": "ψ", + "puncsp": " ", + "qfr": "𝔮", + "qint": "⨌", + "qopf": "𝕢", + "qprime": "⁗", + "qscr": "𝓆", + "quaternions": "ℍ", + "quatint": "⨖", + "quest": "?", + "questeq": "≟", + "quo": "\"", + "quot": "\"", + "rAarr": "⇛", + "rArr": "⇒", + "rAtail": "⤜", + "rBarr": "⤏", + "rHar": "⥤", + "race": "∽̱", + "racute": "ŕ", + "radic": "√", + "raemptyv": "⦳", + "rang": "⟩", + "rangd": "⦒", + "range": "⦥", + "rangle": "⟩", + "raqu": "»", + "raquo": "»", + "rarr": "→", + "rarrap": "⥵", + "rarrb": "⇥", + "rarrbfs": "⤠", + "rarrc": "⤳", + "rarrfs": "⤞", + "rarrhk": "↪", + "rarrlp": "↬", + "rarrpl": "⥅", + "rarrsim": "⥴", + "rarrtl": "↣", + "rarrw": "↝", + "ratail": "⤚", + "ratio": "∶", + "rationals": "ℚ", + "rbarr": "⤍", + "rbbrk": "❳", + "rbrace": "}", + "rbrack": "]", + "rbrke": "⦌", + "rbrksld": "⦎", + "rbrkslu": "⦐", + "rcaron": "ř", + "rcedil": "ŗ", + "rceil": "⌉", + "rcub": "}", + "rcy": "р", + "rdca": "⤷", + "rdldhar": "⥩", + "rdquo": "”", + "rdquor": "”", + "rdsh": "↳", + "real": "ℜ", + "realine": "ℛ", + "realpart": "ℜ", + "reals": "ℝ", + "rect": "▭", + "re": "®", + "reg": "®", + "rfisht": "⥽", + "rfloor": "⌋", + "rfr": "𝔯", + "rhard": "⇁", + "rharu": "⇀", + "rharul": "⥬", + "rho": "ρ", + "rhov": "ϱ", + "rightarrow": "→", + "rightarrowtail": "↣", + "rightharpoondown": "⇁", + "rightharpoonup": "⇀", + "rightleftarrows": "⇄", + "rightleftharpoons": "⇌", + "rightrightarrows": "⇉", + "rightsquigarrow": "↝", + "rightthreetimes": "⋌", + "ring": "˚", + "risingdotseq": "≓", + "rlarr": "⇄", + "rlhar": "⇌", + "rlm": "‏", + "rmoust": "⎱", + "rmoustache": "⎱", + "rnmid": "⫮", + "roang": "⟭", + "roarr": "⇾", + "robrk": "⟧", + "ropar": "⦆", + "ropf": "𝕣", + "roplus": "⨮", + "rotimes": "⨵", + "rpar": ")", + "rpargt": "⦔", + "rppolint": "⨒", + "rrarr": "⇉", + "rsaquo": "›", + "rscr": "𝓇", + "rsh": "↱", + "rsqb": "]", + "rsquo": "’", + "rsquor": "’", + "rthree": "⋌", + "rtimes": "⋊", + "rtri": "▹", + "rtrie": "⊵", + "rtrif": "▸", + "rtriltri": "⧎", + "ruluhar": "⥨", + "rx": "℞", + "sacute": "ś", + "sbquo": "‚", + "sc": "≻", + "scE": "⪴", + "scap": "⪸", + "scaron": "š", + "sccue": "≽", + "sce": "⪰", + "scedil": "ş", + "scirc": "ŝ", + "scnE": "⪶", + "scnap": "⪺", + "scnsim": "⋩", + "scpolint": "⨓", + "scsim": "≿", + "scy": "с", + "sdot": "⋅", + "sdotb": "⊡", + "sdote": "⩦", + "seArr": "⇘", + "searhk": "⤥", + "searr": "↘", + "searrow": "↘", + "sec": "§", + "sect": "§", + "semi": ";", + "seswar": "⤩", + "setminus": "∖", + "setmn": "∖", + "sext": "✶", + "sfr": "𝔰", + "sfrown": "⌢", + "sharp": "♯", + "shchcy": "щ", + "shcy": "ш", + "shortmid": "∣", + "shortparallel": "∥", + "sh": "­", + "shy": "­", + "sigma": "σ", + "sigmaf": "ς", + "sigmav": "ς", + "sim": "∼", + "simdot": "⩪", + "sime": "≃", + "simeq": "≃", + "simg": "⪞", + "simgE": "⪠", + "siml": "⪝", + "simlE": "⪟", + "simne": "≆", + "simplus": "⨤", + "simrarr": "⥲", + "slarr": "←", + "smallsetminus": "∖", + "smashp": "⨳", + "smeparsl": "⧤", + "smid": "∣", + "smile": "⌣", + "smt": "⪪", + "smte": "⪬", + "smtes": "⪬︀", + "softcy": "ь", + "sol": "/", + "solb": "⧄", + "solbar": "⌿", + "sopf": "𝕤", + "spades": "♠", + "spadesuit": "♠", + "spar": "∥", + "sqcap": "⊓", + "sqcaps": "⊓︀", + "sqcup": "⊔", + "sqcups": "⊔︀", + "sqsub": "⊏", + "sqsube": "⊑", + "sqsubset": "⊏", + "sqsubseteq": "⊑", + "sqsup": "⊐", + "sqsupe": "⊒", + "sqsupset": "⊐", + "sqsupseteq": "⊒", + "squ": "□", + "square": "□", + "squarf": "▪", + "squf": "▪", + "srarr": "→", + "sscr": "𝓈", + "ssetmn": "∖", + "ssmile": "⌣", + "sstarf": "⋆", + "star": "☆", + "starf": "★", + "straightepsilon": "ϵ", + "straightphi": "ϕ", + "strns": "¯", + "sub": "⊂", + "subE": "⫅", + "subdot": "⪽", + "sube": "⊆", + "subedot": "⫃", + "submult": "⫁", + "subnE": "⫋", + "subne": "⊊", + "subplus": "⪿", + "subrarr": "⥹", + "subset": "⊂", + "subseteq": "⊆", + "subseteqq": "⫅", + "subsetneq": "⊊", + "subsetneqq": "⫋", + "subsim": "⫇", + "subsub": "⫕", + "subsup": "⫓", + "succ": "≻", + "succapprox": "⪸", + "succcurlyeq": "≽", + "succeq": "⪰", + "succnapprox": "⪺", + "succneqq": "⪶", + "succnsim": "⋩", + "succsim": "≿", + "sum": "∑", + "sung": "♪", + "sup": "⊃", + "sup1": "¹", + "sup2": "²", + "sup3": "³", + "supE": "⫆", + "supdot": "⪾", + "supdsub": "⫘", + "supe": "⊇", + "supedot": "⫄", + "suphsol": "⟉", + "suphsub": "⫗", + "suplarr": "⥻", + "supmult": "⫂", + "supnE": "⫌", + "supne": "⊋", + "supplus": "⫀", + "supset": "⊃", + "supseteq": "⊇", + "supseteqq": "⫆", + "supsetneq": "⊋", + "supsetneqq": "⫌", + "supsim": "⫈", + "supsub": "⫔", + "supsup": "⫖", + "swArr": "⇙", + "swarhk": "⤦", + "swarr": "↙", + "swarrow": "↙", + "swnwar": "⤪", + "szli": "ß", + "szlig": "ß", + "target": "⌖", + "tau": "τ", + "tbrk": "⎴", + "tcaron": "ť", + "tcedil": "ţ", + "tcy": "т", + "tdot": "⃛", + "telrec": "⌕", + "tfr": "𝔱", + "there4": "∴", + "therefore": "∴", + "theta": "θ", + "thetasym": "ϑ", + "thetav": "ϑ", + "thickapprox": "≈", + "thicksim": "∼", + "thinsp": " ", + "thkap": "≈", + "thksim": "∼", + "thor": "þ", + "thorn": "þ", + "tilde": "˜", + "time": "×", + "times": "×", + "timesb": "⊠", + "timesbar": "⨱", + "timesd": "⨰", + "tint": "∭", + "toea": "⤨", + "top": "⊤", + "topbot": "⌶", + "topcir": "⫱", + "topf": "𝕥", + "topfork": "⫚", + "tosa": "⤩", + "tprime": "‴", + "trade": "™", + "triangle": "▵", + "triangledown": "▿", + "triangleleft": "◃", + "trianglelefteq": "⊴", + "triangleq": "≜", + "triangleright": "▹", + "trianglerighteq": "⊵", + "tridot": "◬", + "trie": "≜", + "triminus": "⨺", + "triplus": "⨹", + "trisb": "⧍", + "tritime": "⨻", + "trpezium": "⏢", + "tscr": "𝓉", + "tscy": "ц", + "tshcy": "ћ", + "tstrok": "ŧ", + "twixt": "≬", + "twoheadleftarrow": "↞", + "twoheadrightarrow": "↠", + "uArr": "⇑", + "uHar": "⥣", + "uacut": "ú", + "uacute": "ú", + "uarr": "↑", + "ubrcy": "ў", + "ubreve": "ŭ", + "ucir": "û", + "ucirc": "û", + "ucy": "у", + "udarr": "⇅", + "udblac": "ű", + "udhar": "⥮", + "ufisht": "⥾", + "ufr": "𝔲", + "ugrav": "ù", + "ugrave": "ù", + "uharl": "↿", + "uharr": "↾", + "uhblk": "▀", + "ulcorn": "⌜", + "ulcorner": "⌜", + "ulcrop": "⌏", + "ultri": "◸", + "umacr": "ū", + "um": "¨", + "uml": "¨", + "uogon": "ų", + "uopf": "𝕦", + "uparrow": "↑", + "updownarrow": "↕", + "upharpoonleft": "↿", + "upharpoonright": "↾", + "uplus": "⊎", + "upsi": "υ", + "upsih": "ϒ", + "upsilon": "υ", + "upuparrows": "⇈", + "urcorn": "⌝", + "urcorner": "⌝", + "urcrop": "⌎", + "uring": "ů", + "urtri": "◹", + "uscr": "𝓊", + "utdot": "⋰", + "utilde": "ũ", + "utri": "▵", + "utrif": "▴", + "uuarr": "⇈", + "uum": "ü", + "uuml": "ü", + "uwangle": "⦧", + "vArr": "⇕", + "vBar": "⫨", + "vBarv": "⫩", + "vDash": "⊨", + "vangrt": "⦜", + "varepsilon": "ϵ", + "varkappa": "ϰ", + "varnothing": "∅", + "varphi": "ϕ", + "varpi": "ϖ", + "varpropto": "∝", + "varr": "↕", + "varrho": "ϱ", + "varsigma": "ς", + "varsubsetneq": "⊊︀", + "varsubsetneqq": "⫋︀", + "varsupsetneq": "⊋︀", + "varsupsetneqq": "⫌︀", + "vartheta": "ϑ", + "vartriangleleft": "⊲", + "vartriangleright": "⊳", + "vcy": "в", + "vdash": "⊢", + "vee": "∨", + "veebar": "⊻", + "veeeq": "≚", + "vellip": "⋮", + "verbar": "|", + "vert": "|", + "vfr": "𝔳", + "vltri": "⊲", + "vnsub": "⊂⃒", + "vnsup": "⊃⃒", + "vopf": "𝕧", + "vprop": "∝", + "vrtri": "⊳", + "vscr": "𝓋", + "vsubnE": "⫋︀", + "vsubne": "⊊︀", + "vsupnE": "⫌︀", + "vsupne": "⊋︀", + "vzigzag": "⦚", + "wcirc": "ŵ", + "wedbar": "⩟", + "wedge": "∧", + "wedgeq": "≙", + "weierp": "℘", + "wfr": "𝔴", + "wopf": "𝕨", + "wp": "℘", + "wr": "≀", + "wreath": "≀", + "wscr": "𝓌", + "xcap": "⋂", + "xcirc": "◯", + "xcup": "⋃", + "xdtri": "▽", + "xfr": "𝔵", + "xhArr": "⟺", + "xharr": "⟷", + "xi": "ξ", + "xlArr": "⟸", + "xlarr": "⟵", + "xmap": "⟼", + "xnis": "⋻", + "xodot": "⨀", + "xopf": "𝕩", + "xoplus": "⨁", + "xotime": "⨂", + "xrArr": "⟹", + "xrarr": "⟶", + "xscr": "𝓍", + "xsqcup": "⨆", + "xuplus": "⨄", + "xutri": "△", + "xvee": "⋁", + "xwedge": "⋀", + "yacut": "ý", + "yacute": "ý", + "yacy": "я", + "ycirc": "ŷ", + "ycy": "ы", + "ye": "¥", + "yen": "¥", + "yfr": "𝔶", + "yicy": "ї", + "yopf": "𝕪", + "yscr": "𝓎", + "yucy": "ю", + "yum": "ÿ", + "yuml": "ÿ", + "zacute": "ź", + "zcaron": "ž", + "zcy": "з", + "zdot": "ż", + "zeetrf": "ℨ", + "zeta": "ζ", + "zfr": "𝔷", + "zhcy": "ж", + "zigrarr": "⇝", + "zopf": "𝕫", + "zscr": "𝓏", + "zwj": "‍", + "zwnj": "‌" +} diff --git a/tools/eslint/node_modules/character-entities/package.json b/tools/eslint/node_modules/character-entities/package.json new file mode 100644 index 00000000000..1026eda0818 --- /dev/null +++ b/tools/eslint/node_modules/character-entities/package.json @@ -0,0 +1,132 @@ +{ + "_args": [ + [ + { + "raw": "character-entities@^1.0.0", + "scope": null, + "escapedName": "character-entities", + "name": "character-entities", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\parse-entities" + ] + ], + "_from": "character-entities@>=1.0.0 <2.0.0", + "_id": "character-entities@1.2.0", + "_inCache": true, + "_location": "/character-entities", + "_nodeVersion": "4.0.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/character-entities-1.2.0.tgz_1478289534115_0.5894565787166357" + }, + "_npmUser": { + "name": "wooorm", + "email": "tituswormer@gmail.com" + }, + "_npmVersion": "2.14.2", + "_phantomChildren": {}, + "_requested": { + "raw": "character-entities@^1.0.0", + "scope": null, + "escapedName": "character-entities", + "name": "character-entities", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/parse-entities" + ], + "_resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.0.tgz", + "_shasum": "a683e2cf75dbe8b171963531364e58e18a1b155f", + "_shrinkwrap": null, + "_spec": "character-entities@^1.0.0", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\parse-entities", + "author": { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + }, + "bugs": { + "url": "https://github.com/wooorm/character-entities/issues" + }, + "contributors": [ + { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + } + ], + "dependencies": {}, + "description": "HTML character entity information", + "devDependencies": { + "bail": "^1.0.1", + "browserify": "^13.0.1", + "concat-stream": "^1.5.2", + "esmangle": "^1.0.1", + "nyc": "^8.0.0", + "remark-cli": "^2.0.0", + "remark-preset-wooorm": "^1.0.0", + "tape": "^4.0.0", + "xo": "^0.17.0" + }, + "directories": {}, + "dist": { + "shasum": "a683e2cf75dbe8b171963531364e58e18a1b155f", + "tarball": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.0.tgz" + }, + "files": [ + "index.json" + ], + "gitHead": "c091dd2371a10a25095de2967ebb95458389fdb4", + "homepage": "https://github.com/wooorm/character-entities#readme", + "keywords": [ + "html", + "entity", + "entities", + "character", + "reference", + "name", + "replacement" + ], + "license": "MIT", + "main": "index.json", + "maintainers": [ + { + "name": "wooorm", + "email": "tituswormer@gmail.com" + } + ], + "name": "character-entities", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "remarkConfig": { + "output": true, + "presets": "wooorm" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/wooorm/character-entities.git" + }, + "scripts": { + "build": "npm run build-md && npm run build-generate && npm run build-bundle && npm run build-mangle", + "build-bundle": "browserify index.json --bare -s characterEntities > character-entities.js", + "build-generate": "node build", + "build-mangle": "esmangle character-entities.js > character-entities.min.js", + "build-md": "remark . --quiet --frail", + "lint": "xo", + "test": "npm run build && npm run lint && npm run test-coverage", + "test-api": "node test", + "test-coverage": "nyc --reporter lcov tape test.js" + }, + "version": "1.2.0", + "xo": { + "space": true, + "ignores": [ + "character-entities.js" + ] + } +} diff --git a/tools/eslint/node_modules/character-entities/readme.md b/tools/eslint/node_modules/character-entities/readme.md new file mode 100644 index 00000000000..8f79f76b2ff --- /dev/null +++ b/tools/eslint/node_modules/character-entities/readme.md @@ -0,0 +1,53 @@ +# character-entities [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] + + + +HTML character entity information. + +## Installation + +[npm][npm-install]: + +```bash +npm install character-entities +``` + +## Usage + +```js +console.log(characterEntities.AElig); // Æ +console.log(characterEntities.aelig); // æ +console.log(characterEntities.amp); // & +``` + +## API + +### characterEntities + +Mapping between (case-sensitive) character entity names to replacements. + +## Support + +See [html.spec.whatwg.org][html]. + +## License + +[MIT][license] © [Titus Wormer][author] + + + +[travis-badge]: https://img.shields.io/travis/wooorm/character-entities.svg + +[travis]: https://travis-ci.org/wooorm/character-entities + +[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/character-entities.svg + +[codecov]: https://codecov.io/github/wooorm/character-entities + +[npm-install]: https://docs.npmjs.com/cli/install + +[license]: LICENSE + +[author]: http://wooorm.com + +[html]: https://html.spec.whatwg.org/multipage/syntax.html#named-character-references diff --git a/tools/eslint/node_modules/character-reference-invalid/LICENSE b/tools/eslint/node_modules/character-reference-invalid/LICENSE new file mode 100644 index 00000000000..32e7a3d93ca --- /dev/null +++ b/tools/eslint/node_modules/character-reference-invalid/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2015 Titus Wormer + +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. diff --git a/tools/eslint/node_modules/character-reference-invalid/index.json b/tools/eslint/node_modules/character-reference-invalid/index.json new file mode 100644 index 00000000000..9337a854e40 --- /dev/null +++ b/tools/eslint/node_modules/character-reference-invalid/index.json @@ -0,0 +1,30 @@ +{ + "0": "�", + "128": "€", + "130": "‚", + "131": "ƒ", + "132": "„", + "133": "…", + "134": "†", + "135": "‡", + "136": "ˆ", + "137": "‰", + "138": "Š", + "139": "‹", + "140": "Œ", + "142": "Ž", + "145": "‘", + "146": "’", + "147": "“", + "148": "”", + "149": "•", + "150": "–", + "151": "—", + "152": "˜", + "153": "™", + "154": "š", + "155": "›", + "156": "œ", + "158": "ž", + "159": "Ÿ" +} diff --git a/tools/eslint/node_modules/character-reference-invalid/package.json b/tools/eslint/node_modules/character-reference-invalid/package.json new file mode 100644 index 00000000000..6d68582697a --- /dev/null +++ b/tools/eslint/node_modules/character-reference-invalid/package.json @@ -0,0 +1,136 @@ +{ + "_args": [ + [ + { + "raw": "character-reference-invalid@^1.0.0", + "scope": null, + "escapedName": "character-reference-invalid", + "name": "character-reference-invalid", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\parse-entities" + ] + ], + "_from": "character-reference-invalid@>=1.0.0 <2.0.0", + "_id": "character-reference-invalid@1.1.0", + "_inCache": true, + "_location": "/character-reference-invalid", + "_nodeVersion": "4.0.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/character-reference-invalid-1.1.0.tgz_1478290328584_0.23455824935808778" + }, + "_npmUser": { + "name": "wooorm", + "email": "tituswormer@gmail.com" + }, + "_npmVersion": "2.14.2", + "_phantomChildren": {}, + "_requested": { + "raw": "character-reference-invalid@^1.0.0", + "scope": null, + "escapedName": "character-reference-invalid", + "name": "character-reference-invalid", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/parse-entities" + ], + "_resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.0.tgz", + "_shasum": "dec9ad1dfb9f8d06b4fcdaa2adc3c4fd97af1e68", + "_shrinkwrap": null, + "_spec": "character-reference-invalid@^1.0.0", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\parse-entities", + "author": { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + }, + "bugs": { + "url": "https://github.com/wooorm/character-reference-invalid/issues" + }, + "contributors": [ + { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + } + ], + "dependencies": {}, + "description": "HTML invalid numeric character reference information", + "devDependencies": { + "bail": "^1.0.1", + "browserify": "^13.0.1", + "esmangle": "^1.0.1", + "jsdom": "^9.4.1", + "nyc": "^8.0.0", + "remark-cli": "^2.0.0", + "remark-preset-wooorm": "^1.0.0", + "tape": "^4.0.0", + "xo": "^0.17.0" + }, + "directories": {}, + "dist": { + "shasum": "dec9ad1dfb9f8d06b4fcdaa2adc3c4fd97af1e68", + "tarball": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.0.tgz" + }, + "files": [ + "index.json" + ], + "gitHead": "66104251bb83f85958dcb9328a5873003fea27a2", + "homepage": "https://github.com/wooorm/character-reference-invalid#readme", + "keywords": [ + "html", + "entity", + "numeric", + "character", + "reference", + "replacement", + "invalid", + "name" + ], + "license": "MIT", + "main": "index.json", + "maintainers": [ + { + "name": "wooorm", + "email": "tituswormer@gmail.com" + } + ], + "name": "character-reference-invalid", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "remarkConfig": { + "output": true, + "presets": "wooorm" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/wooorm/character-reference-invalid.git" + }, + "scripts": { + "build": "npm run build-md && npm run build-bundle && npm run build-mangle", + "build-bundle": "browserify index.json --bare -s characterReferenceInvalid > character-reference-invalid.js", + "build-generate": "node build", + "build-mangle": "esmangle character-reference-invalid.js > character-reference-invalid.min.js", + "build-md": "remark . --quiet --frail", + "lint": "xo", + "test": "npm run build && npm run lint && npm run test-coverage", + "test-api": "node test", + "test-coverage": "nyc --reporter lcov tape test.js" + }, + "version": "1.1.0", + "xo": { + "space": true, + "rules": { + "guard-for-in": "off" + }, + "ignores": [ + "character-reference-invalid.js" + ] + } +} diff --git a/tools/eslint/node_modules/character-reference-invalid/readme.md b/tools/eslint/node_modules/character-reference-invalid/readme.md new file mode 100644 index 00000000000..ac6e3e1f384 --- /dev/null +++ b/tools/eslint/node_modules/character-reference-invalid/readme.md @@ -0,0 +1,51 @@ +# character-reference-invalid [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] + +HTML invalid numeric character reference information. + +## Installation + +[npm][npm-install]: + +```bash +npm install character-reference-invalid +``` + +## Usage + +```js +console.log(characterReferenceInvalid[0x80]); // € +console.log(characterReferenceInvalid[0x89]); // ‰ +console.log(characterReferenceInvalid[0x99]); // ™ +``` + +## API + +### `characterReferenceInvalid` + +Mapping between invalid numeric character reference to replacements. + +## Support + +See [html.spec.whatwg.org][html]. + +## License + +[MIT][license] © [Titus Wormer][author] + + + +[travis-badge]: https://img.shields.io/travis/wooorm/character-reference-invalid.svg + +[travis]: https://travis-ci.org/wooorm/character-reference-invalid + +[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/character-reference-invalid.svg + +[codecov]: https://codecov.io/github/wooorm/character-reference-invalid + +[npm-install]: https://docs.npmjs.com/cli/install + +[license]: LICENSE + +[author]: http://wooorm.com + +[html]: https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides diff --git a/tools/eslint/node_modules/collapse-white-space/LICENSE b/tools/eslint/node_modules/collapse-white-space/LICENSE new file mode 100644 index 00000000000..32e7a3d93ca --- /dev/null +++ b/tools/eslint/node_modules/collapse-white-space/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2015 Titus Wormer + +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. diff --git a/tools/eslint/node_modules/collapse-white-space/history.md b/tools/eslint/node_modules/collapse-white-space/history.md new file mode 100644 index 00000000000..137378f6332 --- /dev/null +++ b/tools/eslint/node_modules/collapse-white-space/history.md @@ -0,0 +1,16 @@ + + + + +1.0.2 / 2016-07-23 +================== + +* Fix `readme.md` ([`03823ce`](https://github.com/wooorm/collapse-white-space/commit/03823ce)) + +1.0.1 / 2016-07-23 +================== + +* Rewrite module ([`6d48e8d`](https://github.com/wooorm/collapse-white-space/commit/6d48e8d)) + +1.0.0 / 2015-07-12 +================== diff --git a/tools/eslint/node_modules/collapse-white-space/index.js b/tools/eslint/node_modules/collapse-white-space/index.js new file mode 100644 index 00000000000..337c1078631 --- /dev/null +++ b/tools/eslint/node_modules/collapse-white-space/index.js @@ -0,0 +1,27 @@ +/** + * @author Titus Wormer + * @copyright 2015 Titus Wormer + * @license MIT + * @module collapse-white-space + * @fileoverview Replace multiple white-space characters + * with a single space. + */ + +'use strict'; + +/* Expose. */ +module.exports = collapse; + +/** + * Replace multiple white-space characters with a single space. + * + * @example + * collapse(' \t\nbar \nbaz\t'); // ' bar baz ' + * + * @param {string} value - Value with uncollapsed white-space, + * coerced to string. + * @return {string} - Value with collapsed white-space. + */ +function collapse(value) { + return String(value).replace(/\s+/g, ' '); +} diff --git a/tools/eslint/node_modules/collapse-white-space/package.json b/tools/eslint/node_modules/collapse-white-space/package.json new file mode 100644 index 00000000000..e42f70fa618 --- /dev/null +++ b/tools/eslint/node_modules/collapse-white-space/package.json @@ -0,0 +1,136 @@ +{ + "_args": [ + [ + { + "raw": "collapse-white-space@^1.0.0", + "scope": null, + "escapedName": "collapse-white-space", + "name": "collapse-white-space", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\remark-parse" + ] + ], + "_from": "collapse-white-space@>=1.0.0 <2.0.0", + "_id": "collapse-white-space@1.0.2", + "_inCache": true, + "_location": "/collapse-white-space", + "_nodeVersion": "5.0.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/collapse-white-space-1.0.2.tgz_1469310043598_0.74730454524979" + }, + "_npmUser": { + "name": "wooorm", + "email": "tituswormer@gmail.com" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "raw": "collapse-white-space@^1.0.0", + "scope": null, + "escapedName": "collapse-white-space", + "name": "collapse-white-space", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/remark-parse" + ], + "_resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.2.tgz", + "_shasum": "9c463fb9c6d190d2dcae21a356a01bcae9eeef6d", + "_shrinkwrap": null, + "_spec": "collapse-white-space@^1.0.0", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\remark-parse", + "author": { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + }, + "bugs": { + "url": "https://github.com/wooorm/collapse-white-space/issues" + }, + "contributors": [ + { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + } + ], + "dependencies": {}, + "description": "Replace multiple white-space characters with a single space", + "devDependencies": { + "browserify": "^13.0.1", + "esmangle": "^1.0.1", + "nyc": "^7.0.0", + "remark-cli": "^1.0.0", + "remark-comment-config": "^4.0.0", + "remark-github": "^5.0.0", + "remark-lint": "^4.0.0", + "remark-validate-links": "^4.0.0", + "tape": "^4.0.0", + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "9c463fb9c6d190d2dcae21a356a01bcae9eeef6d", + "tarball": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.2.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "cd218a06e569cf9cbd4657436557299d3bb504cf", + "homepage": "https://github.com/wooorm/collapse-white-space#readme", + "keywords": [ + "collapse", + "white", + "space" + ], + "license": "MIT", + "maintainers": [ + { + "name": "wooorm", + "email": "tituswormer@gmail.com" + } + ], + "name": "collapse-white-space", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "remarkConfig": { + "output": true, + "plugins": [ + "comment-config", + "github", + "lint", + "validate-links" + ], + "settings": { + "bullet": "*" + } + }, + "repository": { + "type": "git", + "url": "git+https://github.com/wooorm/collapse-white-space.git" + }, + "scripts": { + "build": "npm run build-md && npm run build-bundle && npm run build-mangle", + "build-bundle": "browserify index.js --bare -s collapseWhiteSpace > collapse-white-space.js", + "build-mangle": "esmangle collapse-white-space.js > collapse-white-space.min.js", + "build-md": "remark . --quiet --frail", + "lint": "xo", + "test": "npm run build && npm run lint && npm run test-coverage", + "test-api": "node test", + "test-coverage": "nyc --reporter lcov tape test.js" + }, + "version": "1.0.2", + "xo": { + "space": true, + "ignores": [ + "collapse-white-space.js", + "collapse-white-space.min.js" + ] + } +} diff --git a/tools/eslint/node_modules/collapse-white-space/readme.md b/tools/eslint/node_modules/collapse-white-space/readme.md new file mode 100644 index 00000000000..d5dc32183df --- /dev/null +++ b/tools/eslint/node_modules/collapse-white-space/readme.md @@ -0,0 +1,67 @@ +# collapse-white-space [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] + + + +Replace multiple white-space characters with a single space. + +## Installation + +[npm][npm-install]: + +```bash +npm install collapse-white-space +``` + +## Usage + +Dependencies. + +```javascript +var collapse = require('collapse-white-space'); +``` + +Collapse white space: + +```javascript +var result = collapse('\tfoo \n\tbar \t\r\nbaz'); +``` + +Yields: + +```text + foo bar baz +``` + +## API + +### `collapse(value)` + +Replace multiple white-space characters with a single space. + +###### Parameters + +* `value` (`string`) — Value with uncollapsed white-space, coerced to string. + +###### Returns + +`string` — Value with collapsed white-space. + +## License + +[MIT][license] © [Titus Wormer][author] + + + +[travis-badge]: https://img.shields.io/travis/wooorm/collapse-white-space.svg + +[travis]: https://travis-ci.org/wooorm/collapse-white-space + +[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/collapse-white-space.svg + +[codecov]: https://codecov.io/github/wooorm/collapse-white-space + +[npm-install]: https://docs.npmjs.com/cli/install + +[license]: LICENSE + +[author]: http://wooorm.com diff --git a/tools/eslint/node_modules/eslint-plugin-markdown/LICENSE b/tools/eslint/node_modules/eslint-plugin-markdown/LICENSE new file mode 100644 index 00000000000..cf5a5995af4 --- /dev/null +++ b/tools/eslint/node_modules/eslint-plugin-markdown/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright JS Foundation and other contributors, https://js.foundation + +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. diff --git a/tools/eslint/node_modules/eslint-plugin-markdown/README.md b/tools/eslint/node_modules/eslint-plugin-markdown/README.md new file mode 100644 index 00000000000..4f212022c81 --- /dev/null +++ b/tools/eslint/node_modules/eslint-plugin-markdown/README.md @@ -0,0 +1,121 @@ +# eslint-plugin-markdown + +![Screenshot](screenshot.png) + +An [ESLint](http://eslint.org/) plugin to lint JavaScript in Markdown. + +Supported extensions are `.markdown`, `.mdown`, `.mkdn`, and `.md`. + +## Usage + +Install the plugin: + +```sh +npm install --save-dev eslint eslint-plugin-markdown +``` + +Add it to your `.eslintrc`: + +```json +{ + "plugins": [ + "markdown" + ] +} +``` + +Run ESLint on `.md` files: + +```sh +eslint --ext md . +``` + +It will lint `js`, `javascript`, `jsx`, or `node` [fenced code blocks](https://help.github.com/articles/github-flavored-markdown/#fenced-code-blocks) in your Markdown documents: + + ```js + // This gets linted + var answer = 6 * 7; + console.log(answer); + ``` + + ```JavaScript + // This also gets linted + + /* eslint quotes: [2, "double"] */ + + function hello() { + console.log("Hello, world!"); + } + hello(); + ``` + + ```jsx + // This gets linted too + var div =
; + ``` + + ```node + // And this + console.log(process.version); + ``` + +Blocks that don't specify either `js`, `javascript`, `jsx`, or `node` syntax are ignored: + + ``` + This is plain text and doesn't get linted. + ``` + + ```python + print("This doesn't get linted either.") + ``` + +## Configuration Comments + +The processor will convert HTML comments immediately preceding a code block into JavaScript block comments and insert them at the beginning of the source code that it passes to ESLint. This permits configuring ESLint via configuration comments while keeping the configuration comments themselves hidden when the markdown is rendered. Comment bodies are passed through unmodified, so the plugin supports any [configuration comments](http://eslint.org/docs/user-guide/configuring) supported by ESLint itself. + +This example enables the `browser` environment, disables the `no-alert` rule, and configures the `quotes` rule to prefer single quotes: + + + + + + ```js + alert('Hello, world!'); + ``` + +Each code block in a file is linted separately, so configuration comments apply only to the code block that immediately follows. + + Assuming `no-alert` is enabled in `.eslintrc`, the first code block will have no error from `no-alert`: + + + + + ```js + alert("Hello, world!"); + ``` + + But the next code block will have an error from `no-alert`: + + + + ```js + alert("Hello, world!"); + ``` + +## Unsatisfiable Rules + +Since code blocks are not files themselves but embedded inside a Markdown document, some rules do not apply to Markdown code blocks, and messages from these rules are automatically suppressed: + +- `eol-last` + +## Contributing + +```sh +$ git clone https://github.com/eslint/eslint-plugin-markdown.git +$ cd eslint-plugin-markdown +$ npm link +$ npm link eslint-plugin-markdown +$ npm test +``` + +This project follows the [ESLint contribution guidelines](http://eslint.org/docs/developer-guide/contributing/). diff --git a/tools/eslint/node_modules/eslint-plugin-markdown/index.js b/tools/eslint/node_modules/eslint-plugin-markdown/index.js new file mode 100644 index 00000000000..1638f11ee3c --- /dev/null +++ b/tools/eslint/node_modules/eslint-plugin-markdown/index.js @@ -0,0 +1,8 @@ +/** + * @fileoverview Exports the processor. + * @author Brandon Mills + */ + +"use strict"; + +module.exports = require("./lib"); diff --git a/tools/eslint/node_modules/eslint-plugin-markdown/lib/index.js b/tools/eslint/node_modules/eslint-plugin-markdown/lib/index.js new file mode 100644 index 00000000000..890425ff8ae --- /dev/null +++ b/tools/eslint/node_modules/eslint-plugin-markdown/lib/index.js @@ -0,0 +1,17 @@ +/** + * @fileoverview Enables the processor for Markdown file extensions. + * @author Brandon Mills + */ + +"use strict"; + +var processor = require("./processor"); + +module.exports = { + "processors": { + ".markdown": processor, + ".mdown": processor, + ".mkdn": processor, + ".md": processor + } +}; diff --git a/tools/eslint/node_modules/eslint-plugin-markdown/lib/processor.js b/tools/eslint/node_modules/eslint-plugin-markdown/lib/processor.js new file mode 100644 index 00000000000..7d0fa62f795 --- /dev/null +++ b/tools/eslint/node_modules/eslint-plugin-markdown/lib/processor.js @@ -0,0 +1,151 @@ +/** + * @fileoverview Processes Markdown files for consumption by ESLint. + * @author Brandon Mills + */ + +"use strict"; + +var assign = require("object-assign"); +var parse5 = require("parse5"); +var remark = require("remark"); + +var SUPPORTED_SYNTAXES = ["js", "javascript", "node", "jsx"]; +var UNSATISFIABLE_RULES = [ + "eol-last" // The Markdown parser strips trailing newlines in code fences +]; + +var blocks = []; + +/** + * Performs a depth-first traversal of the Markdown AST. + * @param {ASTNode} node A Markdown AST node. + * @param {object} callbacks A map of node types to callbacks. + * @param {object} [parent] The node's parent AST node. + * @returns {void} + */ +function traverse(node, callbacks, parent) { + var i; + + if (callbacks[node.type]) { + callbacks[node.type](node, parent); + } + + if (typeof node.children !== "undefined") { + for (i = 0; i < node.children.length; i++) { + traverse(node.children[i], callbacks, node); + } + } +} + +/** + * Converts leading HTML comments to JS block comments. + * @param {string} html The text content of an HTML AST node. + * @returns {string[]} An array of JS block comments. + */ +function getComments(html) { + var ast = parse5.parse(html, { locationInfo: true }); + var nodes = ast.childNodes.filter(function(node) { + return node.__location; // eslint-disable-line no-underscore-dangle + }); + var comments = []; + var index; + + for (index = nodes.length - 1; index >= 0; index--) { + if ( + nodes[index].nodeName === "#comment" + && nodes[index].data.trim().slice(0, "eslint".length) === "eslint" + ) { + comments.unshift("/*" + nodes[index].data + "*/"); + } else { + break; + } + } + + return comments; +} + +/** + * Extracts lintable JavaScript code blocks from Markdown text. + * @param {string} text The text of the file. + * @returns {string[]} Source code strings to lint. + */ +function preprocess(text) { + var ast = remark().parse(text); + + blocks = []; + traverse(ast, { + "code": function(node, parent) { + var comments = []; + var index, previousNode; + + if (node.lang && SUPPORTED_SYNTAXES.indexOf(node.lang.toLowerCase()) >= 0) { + index = parent.children.indexOf(node); + previousNode = parent.children[index - 1]; + if (previousNode && previousNode.type === "html") { + comments = getComments(previousNode.value) || []; + } + + blocks.push(assign({}, node, { comments: comments })); + } + } + }); + + return blocks.map(function(block) { + return block.comments.concat(block.value).join("\n"); + }); +} + +/** + * Creates a map function that adjusts messages in a code block. + * @param {Block} block A code block. + * @returns {function} A function that adjusts messages in a code block. + */ +function adjustBlock(block) { + var leadingCommentLines = block.comments.reduce(function(count, comment) { + return count + comment.split("\n").length; + }, 0); + + /** + * Adjusts ESLint messages to point to the correct location in the Markdown. + * @param {Message} message A message from ESLint. + * @returns {Message} The same message, but adjusted ot the correct location. + */ + return function adjustMessage(message) { + var lineInCode = message.line - leadingCommentLines; + if (lineInCode < 1) { + return null; + } + + return assign({}, message, { + line: lineInCode + block.position.start.line, + column: message.column + block.position.indent[lineInCode - 1] - 1 + }); + }; +} + +/** + * Excludes unsatisfiable rules from the list of messages. + * @param {Message} message A message from the linter. + * @returns {boolean} True if the message should be included in output. + */ +function excludeUnsatisfiableRules(message) { + return message && UNSATISFIABLE_RULES.indexOf(message.ruleId) < 0; +} + +/** + * Transforms generated messages for output. + * @param {Array} messages An array containing one array of messages + * for each code block returned from `preprocess`. + * @returns {Message[]} A flattened array of messages with mapped locations. + */ +function postprocess(messages) { + return [].concat.apply([], messages.map(function(group, i) { + var adjust = adjustBlock(blocks[i]); + return group.map(adjust).filter(excludeUnsatisfiableRules); + })); +} + +module.exports = { + preprocess: preprocess, + postprocess: postprocess +}; diff --git a/tools/eslint/node_modules/eslint-plugin-markdown/package.json b/tools/eslint/node_modules/eslint-plugin-markdown/package.json new file mode 100644 index 00000000000..b90029938ed --- /dev/null +++ b/tools/eslint/node_modules/eslint-plugin-markdown/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + { + "raw": "eslint-plugin-markdown", + "scope": null, + "escapedName": "eslint-plugin-markdown", + "name": "eslint-plugin-markdown", + "rawSpec": "", + "spec": "latest", + "type": "tag" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint" + ] + ], + "_from": "eslint-plugin-markdown@latest", + "_id": "eslint-plugin-markdown@1.0.0-beta.4", + "_inCache": true, + "_location": "/eslint-plugin-markdown", + "_nodeVersion": "7.7.1", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/eslint-plugin-markdown-1.0.0-beta.4.tgz_1488662554242_0.9874107467476279" + }, + "_npmUser": { + "name": "btmills", + "email": "mills.brandont@gmail.com" + }, + "_npmVersion": "4.1.2", + "_phantomChildren": {}, + "_requested": { + "raw": "eslint-plugin-markdown", + "scope": null, + "escapedName": "eslint-plugin-markdown", + "name": "eslint-plugin-markdown", + "rawSpec": "", + "spec": "latest", + "type": "tag" + }, + "_requiredBy": [ + "#USER" + ], + "_resolved": "https://registry.npmjs.org/eslint-plugin-markdown/-/eslint-plugin-markdown-1.0.0-beta.4.tgz", + "_shasum": "82a19971399e4b1b62f7d4ac6424687c2c07ee7a", + "_shrinkwrap": null, + "_spec": "eslint-plugin-markdown", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint", + "author": { + "name": "Brandon Mills", + "url": "https://github.com/btmills" + }, + "bugs": { + "url": "https://github.com/eslint/eslint-plugin-markdown/issues" + }, + "dependencies": { + "object-assign": "^4.0.1", + "parse5": "^2.2.2", + "remark": "^5.0.0" + }, + "description": "An ESLint plugin to lint JavaScript in Markdown code fences.", + "devDependencies": { + "chai": "^3.0.0", + "eslint": "^2.2.0", + "eslint-config-eslint": "^3.0.0", + "mocha": "^2.2.5" + }, + "directories": {}, + "dist": { + "shasum": "82a19971399e4b1b62f7d4ac6424687c2c07ee7a", + "tarball": "https://registry.npmjs.org/eslint-plugin-markdown/-/eslint-plugin-markdown-1.0.0-beta.4.tgz" + }, + "files": [ + "lib/*.js", + "index.js", + "LICENSE", + "README.md" + ], + "gitHead": "c84a63171c85a1ffec9b4fd41b55f29bb2117b21", + "homepage": "https://github.com/eslint/eslint-plugin-markdown#readme", + "keywords": [ + "eslint", + "eslintplugin", + "markdown", + "lint", + "linter" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "btmills", + "email": "mills.brandont@gmail.com" + } + ], + "name": "eslint-plugin-markdown", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/eslint-plugin-markdown.git" + }, + "scripts": { + "test": "eslint --ext .js --ext .md . && mocha tests" + }, + "version": "1.0.0-beta.4" +} diff --git a/tools/eslint/node_modules/extend/.eslintrc b/tools/eslint/node_modules/extend/.eslintrc new file mode 100644 index 00000000000..d49f17353d7 --- /dev/null +++ b/tools/eslint/node_modules/extend/.eslintrc @@ -0,0 +1,192 @@ +{ + "env": { + "browser": false, + "node": true, + "amd": false, + "mocha": false, + "jasmine": false + }, + + "rules": { + "accessor-pairs": [2, { getWithoutSet: false, setWithoutGet: true }], + "array-bracket-spacing": [2, "never", { + "singleValue": false, + "objectsInArrays": false, + "arraysInArrays": false + }], + "block-scoped-var": [0], + "brace-style": [2, "1tbs", { "allowSingleLine": true }], + "camelcase": [2], + "comma-dangle": [2, "never"], + "comma-spacing": [2], + "comma-style": [2, "last"], + "complexity": [2, 15], + "computed-property-spacing": [2, "never"], + "consistent-return": [2], + "consistent-this": [0, "that"], + "constructor-super": [2], + "curly": [2, "all"], + "default-case": [2], + "dot-notation": [2, { "allowKeywords": true }], + "eol-last": [2], + "eqeqeq": [2], + "func-names": [0], + "func-style": [2, "expression"], + "generator-star-spacing": [2, { "before": false, "after": true }], + "global-strict": [0, "never"], + "guard-for-in": [0], + "handle-callback-err": [0], + "key-spacing": [2, { "beforeColon": false, "afterColon": true }], + "linebreak-style": [2, "unix"], + "lines-around-comment": [2, { + "beforeBlockComment": false, + "afterBlockComment": false, + "beforeLineComment": false, + "beforeLineComment": false, + "allowBlockStart": true, + "allowBlockEnd": true + }], + "quotes": [2, "single", "avoid-escape"], + "max-depth": [1, 4], + "max-len": [0, 80, 4], + "max-nested-callbacks": [2, 2], + "max-params": [2, 2], + "max-statements": [2, 21], + "new-parens": [2], + "new-cap": [2], + "newline-after-var": [0], + "no-alert": [2], + "no-array-constructor": [2], + "no-bitwise": [0], + "no-caller": [2], + "no-catch-shadow": [2], + "no-cond-assign": [2], + "no-console": [2], + "no-constant-condition": [2], + "no-continue": [2], + "no-control-regex": [2], + "no-debugger": [2], + "no-delete-var": [2], + "no-div-regex": [0], + "no-dupe-args": [2], + "no-dupe-keys": [2], + "no-duplicate-case": [2], + "no-else-return": [0], + "no-empty": [2], + "no-empty-character-class": [2], + "no-empty-label": [2], + "no-eq-null": [0], + "no-eval": [2], + "no-ex-assign": [2], + "no-extend-native": [2], + "no-extra-bind": [2], + "no-extra-boolean-cast": [2], + "no-extra-parens": [0], + "no-extra-semi": [2], + "no-fallthrough": [2], + "no-floating-decimal": [2], + "no-func-assign": [2], + "no-implied-eval": [2], + "no-inline-comments": [0], + "no-inner-declarations": [2, "functions"], + "no-invalid-regexp": [2], + "no-irregular-whitespace": [2], + "no-iterator": [2], + "no-label-var": [2], + "no-labels": [2], + "no-lone-blocks": [2], + "no-lonely-if": [2], + "no-loop-func": [2], + "no-mixed-requires": [0, false], + "no-mixed-spaces-and-tabs": [2, false], + "no-multi-spaces": [2], + "no-multi-str": [2], + "no-multiple-empty-lines": [2, {"max": 1}], + "no-native-reassign": [2], + "no-negated-in-lhs": [2], + "no-nested-ternary": [0], + "no-new": [2], + "no-new-func": [2], + "no-new-object": [2], + "no-new-require": [0], + "no-new-wrappers": [2], + "no-obj-calls": [2], + "no-octal": [2], + "no-octal-escape": [2], + "no-param-reassign": [2], + "no-path-concat": [0], + "no-plusplus": [0], + "no-process-env": [0], + "no-process-exit": [2], + "no-proto": [2], + "no-redeclare": [2], + "no-regex-spaces": [2], + "no-reserved-keys": [2], + "no-restricted-modules": [0], + "no-return-assign": [2, "always"], + "no-script-url": [2], + "no-self-compare": [0], + "no-sequences": [2], + "no-shadow": [2], + "no-shadow-restricted-names": [2], + "no-space-before-semi": [2], + "no-spaced-func": [2], + "no-sparse-arrays": [2], + "no-sync": [0], + "no-ternary": [0], + "no-this-before-super": [2], + "no-throw-literal": [2], + "no-trailing-spaces": [2, { "skipBlankLines": false }], + "no-undef": [2], + "no-undef-init": [2], + "no-undefined": [0], + "no-underscore-dangle": [2], + "no-unexpected-multiline": [2], + "no-unneeded-ternary": [2], + "no-unreachable": [2], + "no-unused-expressions": [2], + "no-unused-vars": [2, { "vars": "all", "args": "after-used" }], + "no-use-before-define": [2], + "no-void": [0], + "no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }], + "no-with": [2], + "no-wrap-func": [2], + "object-curly-spacing": [2, "always"], + "object-shorthand": [2, "never"], + "one-var": [0], + "operator-assignment": [0, "always"], + "operator-linebreak": [2, "none"], + "padded-blocks": [0], + "prefer-const": [0], + "quote-props": [0], + "radix": [0], + "semi": [2], + "semi-spacing": [2, { "before": false, "after": true }], + "sort-vars": [0], + "space-after-keywords": [2, "always"], + "space-before-function-paren": [2, { "anonymous": "always", "named": "never" }], + "space-before-blocks": [0, "always"], + "space-in-brackets": [0, "never", { + "singleValue": true, + "arraysInArrays": false, + "arraysInObjects": false, + "objectsInArrays": true, + "objectsInObjects": true, + "propertyName": false + }], + "space-in-parens": [2, "never"], + "space-infix-ops": [2], + "space-return-throw-case": [2], + "space-unary-ops": [2, { "words": true, "nonwords": false }], + "spaced-comment": [2, "always"], + "spaced-line-comment": [0, "always"], + "strict": [2, "global"], + "use-isnan": [2], + "valid-jsdoc": [0], + "valid-typeof": [2], + "vars-on-top": [0], + "wrap-iife": [2], + "wrap-regex": [2], + "yoda": [2, "never", { "exceptRange": true, "onlyEquality": false }] + } +} diff --git a/tools/eslint/node_modules/extend/.jscs.json b/tools/eslint/node_modules/extend/.jscs.json new file mode 100644 index 00000000000..59faa8bd9f6 --- /dev/null +++ b/tools/eslint/node_modules/extend/.jscs.json @@ -0,0 +1,103 @@ +{ + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"], + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": "allButReserved", + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": true, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 6 + }, + + "requirePaddingNewLinesAfterUseStrict": true +} diff --git a/tools/eslint/node_modules/extend/.npmignore b/tools/eslint/node_modules/extend/.npmignore new file mode 100644 index 00000000000..30d74d25844 --- /dev/null +++ b/tools/eslint/node_modules/extend/.npmignore @@ -0,0 +1 @@ +test \ No newline at end of file diff --git a/tools/eslint/node_modules/extend/.travis.yml b/tools/eslint/node_modules/extend/.travis.yml new file mode 100644 index 00000000000..ebef64499b3 --- /dev/null +++ b/tools/eslint/node_modules/extend/.travis.yml @@ -0,0 +1,44 @@ +language: node_js +node_js: + - "iojs-v2.3" + - "iojs-v2.2" + - "iojs-v2.1" + - "iojs-v2.0" + - "iojs-v1.8" + - "iojs-v1.7" + - "iojs-v1.6" + - "iojs-v1.5" + - "iojs-v1.4" + - "iojs-v1.3" + - "iojs-v1.2" + - "iojs-v1.1" + - "iojs-v1.0" + - "0.12" + - "0.11" + - "0.10" + - "0.9" + - "0.8" + - "0.6" + - "0.4" +before_install: + - '[ "${TRAVIS_NODE_VERSION}" = "0.6" ] || npm install -g npm@1.4.28 && npm install -g npm' +sudo: false +matrix: + fast_finish: true + allow_failures: + - node_js: "iojs-v2.2" + - node_js: "iojs-v2.1" + - node_js: "iojs-v2.0" + - node_js: "iojs-v1.7" + - node_js: "iojs-v1.6" + - node_js: "iojs-v1.5" + - node_js: "iojs-v1.4" + - node_js: "iojs-v1.3" + - node_js: "iojs-v1.2" + - node_js: "iojs-v1.1" + - node_js: "iojs-v1.0" + - node_js: "0.11" + - node_js: "0.9" + - node_js: "0.8" + - node_js: "0.6" + - node_js: "0.4" diff --git a/tools/eslint/node_modules/extend/CHANGELOG.md b/tools/eslint/node_modules/extend/CHANGELOG.md new file mode 100644 index 00000000000..2874d2ecda1 --- /dev/null +++ b/tools/eslint/node_modules/extend/CHANGELOG.md @@ -0,0 +1,68 @@ +3.0.0 / 2015-07-01 +================== + * [Possible breaking change] Use global "strict" directive (#32) + * [Tests] `int` is an ES3 reserved word + * [Tests] Test up to `io.js` `v2.3` + * [Tests] Add `npm run eslint` + * [Dev Deps] Update `covert`, `jscs` + +2.0.1 / 2015-04-25 +================== + * Use an inline `isArray` check, for ES3 browsers. (#27) + * Some old browsers fail when an identifier is `toString` + * Test latest `node` and `io.js` versions on `travis-ci`; speed up builds + * Add license info to package.json (#25) + * Update `tape`, `jscs` + * Adding a CHANGELOG + +2.0.0 / 2014-10-01 +================== + * Increase code coverage to 100%; run code coverage as part of tests + * Add `npm run lint`; Run linter as part of tests + * Remove nodeType and setInterval checks in isPlainObject + * Updating `tape`, `jscs`, `covert` + * General style and README cleanup + +1.3.0 / 2014-06-20 +================== + * Add component.json for browser support (#18) + * Use SVG for badges in README (#16) + * Updating `tape`, `covert` + * Updating travis-ci to work with multiple node versions + * Fix `deep === false` bug (returning target as {}) (#14) + * Fixing constructor checks in isPlainObject + * Adding additional test coverage + * Adding `npm run coverage` + * Add LICENSE (#13) + * Adding a warning about `false`, per #11 + * General style and whitespace cleanup + +1.2.1 / 2013-09-14 +================== + * Fixing hasOwnProperty bugs that would only have shown up in specific browsers. Fixes #8 + * Updating `tape` + +1.2.0 / 2013-09-02 +================== + * Updating the README: add badges + * Adding a missing variable reference. + * Using `tape` instead of `buster` for tests; add more tests (#7) + * Adding node 0.10 to Travis CI (#6) + * Enabling "npm test" and cleaning up package.json (#5) + * Add Travis CI. + +1.1.3 / 2012-12-06 +================== + * Added unit tests. + * Ensure extend function is named. (Looks nicer in a stack trace.) + * README cleanup. + +1.1.1 / 2012-11-07 +================== + * README cleanup. + * Added installation instructions. + * Added a missing semicolon + +1.0.0 / 2012-04-08 +================== + * Initial commit diff --git a/tools/eslint/node_modules/extend/LICENSE b/tools/eslint/node_modules/extend/LICENSE new file mode 100644 index 00000000000..92d41503d32 --- /dev/null +++ b/tools/eslint/node_modules/extend/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014 Stefan Thomas + +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. diff --git a/tools/eslint/node_modules/extend/README.md b/tools/eslint/node_modules/extend/README.md new file mode 100644 index 00000000000..3a47b21880f --- /dev/null +++ b/tools/eslint/node_modules/extend/README.md @@ -0,0 +1,61 @@ +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] + +# extend() for Node.js [![Version Badge][npm-version-png]][npm-url] + +`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true. + +## Installation + +This package is available on [npm][npm-url] as: `extend` + +``` sh +npm install extend +``` + +## Usage + +**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)** + +*Extend one object with one or more others, returning the modified object.* + +Keep in mind that the target object will be modified, and will be returned from extend(). + +If a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s). +Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over. +Warning: passing `false` as the first argument is not supported. + +### Arguments + +* `deep` *Boolean* (optional) +If set, the merge becomes recursive (i.e. deep copy). +* `target` *Object* +The object to extend. +* `object1` *Object* +The object that will be merged into the first. +* `objectN` *Object* (Optional) +More objects to merge into the first. + +## License + +`node-extend` is licensed under the [MIT License][mit-license-url]. + +## Acknowledgements + +All credit to the jQuery authors for perfecting this amazing utility. + +Ported to Node.js by [Stefan Thomas][github-justmoon] with contributions by [Jonathan Buchanan][github-insin] and [Jordan Harband][github-ljharb]. + +[travis-svg]: https://travis-ci.org/justmoon/node-extend.svg +[travis-url]: https://travis-ci.org/justmoon/node-extend +[npm-url]: https://npmjs.org/package/extend +[mit-license-url]: http://opensource.org/licenses/MIT +[github-justmoon]: https://github.com/justmoon +[github-insin]: https://github.com/insin +[github-ljharb]: https://github.com/ljharb +[npm-version-png]: http://vb.teelaun.ch/justmoon/node-extend.svg +[deps-svg]: https://david-dm.org/justmoon/node-extend.svg +[deps-url]: https://david-dm.org/justmoon/node-extend +[dev-deps-svg]: https://david-dm.org/justmoon/node-extend/dev-status.svg +[dev-deps-url]: https://david-dm.org/justmoon/node-extend#info=devDependencies diff --git a/tools/eslint/node_modules/extend/component.json b/tools/eslint/node_modules/extend/component.json new file mode 100644 index 00000000000..0f76b59305b --- /dev/null +++ b/tools/eslint/node_modules/extend/component.json @@ -0,0 +1,31 @@ +{ + "name": "extend", + "author": "Stefan Thomas (http://www.justmoon.net)", + "version": "3.0.0", + "description": "Port of jQuery.extend for node.js and the browser.", + "scripts": [ + "index.js" + ], + "contributors": [ + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "keywords": [ + "extend", + "clone", + "merge" + ], + "repository" : { + "type": "git", + "url": "https://github.com/justmoon/node-extend.git" + }, + "dependencies": { + }, + "devDependencies": { + "tape" : "~3.0.0", + "covert": "~0.4.0", + "jscs": "~1.6.2" + } +} diff --git a/tools/eslint/node_modules/extend/index.js b/tools/eslint/node_modules/extend/index.js new file mode 100644 index 00000000000..2f957482eef --- /dev/null +++ b/tools/eslint/node_modules/extend/index.js @@ -0,0 +1,85 @@ +'use strict'; + +var hasOwn = Object.prototype.hasOwnProperty; +var toStr = Object.prototype.toString; + +var isArray = function isArray(arr) { + if (typeof Array.isArray === 'function') { + return Array.isArray(arr); + } + + return toStr.call(arr) === '[object Array]'; +}; + +var isPlainObject = function isPlainObject(obj) { + if (!obj || toStr.call(obj) !== '[object Object]') { + return false; + } + + var hasOwnConstructor = hasOwn.call(obj, 'constructor'); + var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf'); + // Not own constructor property must be Object + if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) { + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + var key; + for (key in obj) {/**/} + + return typeof key === 'undefined' || hasOwn.call(obj, key); +}; + +module.exports = function extend() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0], + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if (typeof target === 'boolean') { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } else if ((typeof target !== 'object' && typeof target !== 'function') || target == null) { + target = {}; + } + + for (; i < length; ++i) { + options = arguments[i]; + // Only deal with non-null/undefined values + if (options != null) { + // Extend the base object + for (name in options) { + src = target[name]; + copy = options[name]; + + // Prevent never-ending loop + if (target !== copy) { + // Recurse if we're merging plain objects or arrays + if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) { + if (copyIsArray) { + copyIsArray = false; + clone = src && isArray(src) ? src : []; + } else { + clone = src && isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[name] = extend(deep, clone, copy); + + // Don't bring in undefined values + } else if (typeof copy !== 'undefined') { + target[name] = copy; + } + } + } + } + } + + // Return the modified object + return target; +}; diff --git a/tools/eslint/node_modules/extend/package.json b/tools/eslint/node_modules/extend/package.json new file mode 100644 index 00000000000..ffbaa8dedb2 --- /dev/null +++ b/tools/eslint/node_modules/extend/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + { + "raw": "extend@^3.0.0", + "scope": null, + "escapedName": "extend", + "name": "extend", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\remark-parse" + ] + ], + "_from": "extend@>=3.0.0 <4.0.0", + "_id": "extend@3.0.0", + "_inCache": true, + "_location": "/extend", + "_nodeVersion": "2.3.1", + "_npmUser": { + "name": "ljharb", + "email": "ljharb@gmail.com" + }, + "_npmVersion": "2.11.3", + "_phantomChildren": {}, + "_requested": { + "raw": "extend@^3.0.0", + "scope": null, + "escapedName": "extend", + "name": "extend", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/remark-parse", + "/remark-stringify", + "/unified" + ], + "_resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz", + "_shasum": "5a474353b9f3353ddd8176dfd37b91c83a46f1d4", + "_shrinkwrap": null, + "_spec": "extend@^3.0.0", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\remark-parse", + "author": { + "name": "Stefan Thomas", + "email": "justmoon@members.fsf.org", + "url": "http://www.justmoon.net" + }, + "bugs": { + "url": "https://github.com/justmoon/node-extend/issues" + }, + "contributors": [ + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "dependencies": {}, + "description": "Port of jQuery.extend for node.js and the browser", + "devDependencies": { + "covert": "^1.1.0", + "eslint": "^0.24.0", + "jscs": "^1.13.1", + "tape": "^4.0.0" + }, + "directories": {}, + "dist": { + "shasum": "5a474353b9f3353ddd8176dfd37b91c83a46f1d4", + "tarball": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz" + }, + "gitHead": "148e7270cab2e9413af2cd0cab147070d755ed6d", + "homepage": "https://github.com/justmoon/node-extend#readme", + "keywords": [ + "extend", + "clone", + "merge" + ], + "license": "MIT", + "main": "index", + "maintainers": [ + { + "name": "justmoon", + "email": "justmoon@members.fsf.org" + }, + { + "name": "ljharb", + "email": "ljharb@gmail.com" + } + ], + "name": "extend", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/justmoon/node-extend.git" + }, + "scripts": { + "coverage": "covert test/index.js", + "coverage-quiet": "covert test/index.js --quiet", + "eslint": "eslint *.js */*.js", + "jscs": "jscs *.js */*.js", + "lint": "npm run jscs && npm run eslint", + "test": "npm run lint && node test/index.js && npm run coverage-quiet" + }, + "version": "3.0.0" +} diff --git a/tools/eslint/node_modules/function-bind/.eslintrc b/tools/eslint/node_modules/function-bind/.eslintrc new file mode 100644 index 00000000000..420b25351af --- /dev/null +++ b/tools/eslint/node_modules/function-bind/.eslintrc @@ -0,0 +1,13 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-nested-callbacks": [2, 3], + "max-params": [2, 3], + "max-statements": [2, 20], + "no-new-func": [1], + "strict": [0] + } +} diff --git a/tools/eslint/node_modules/function-bind/.jscs.json b/tools/eslint/node_modules/function-bind/.jscs.json new file mode 100644 index 00000000000..531b829669b --- /dev/null +++ b/tools/eslint/node_modules/function-bind/.jscs.json @@ -0,0 +1,158 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": "allButReserved", + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 8 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + } +} diff --git a/tools/eslint/node_modules/function-bind/.npmignore b/tools/eslint/node_modules/function-bind/.npmignore new file mode 100644 index 00000000000..8363b8e3d62 --- /dev/null +++ b/tools/eslint/node_modules/function-bind/.npmignore @@ -0,0 +1,16 @@ +.DS_Store +.monitor +.*.swp +.nodemonignore +releases +*.log +*.err +fleet.json +public/browserify +bin/*.json +.bin +build +compile +.lock-wscript +coverage +node_modules diff --git a/tools/eslint/node_modules/function-bind/.travis.yml b/tools/eslint/node_modules/function-bind/.travis.yml new file mode 100644 index 00000000000..caabb460943 --- /dev/null +++ b/tools/eslint/node_modules/function-bind/.travis.yml @@ -0,0 +1,77 @@ +language: node_js +node_js: + - "5.6" + - "5.5" + - "5.4" + - "5.3" + - "5.2" + - "5.1" + - "5.0" + - "4.3" + - "4.2" + - "4.1" + - "4.0" + - "iojs-v3.3" + - "iojs-v3.2" + - "iojs-v3.1" + - "iojs-v3.0" + - "iojs-v2.5" + - "iojs-v2.4" + - "iojs-v2.3" + - "iojs-v2.2" + - "iojs-v2.1" + - "iojs-v2.0" + - "iojs-v1.8" + - "iojs-v1.7" + - "iojs-v1.6" + - "iojs-v1.5" + - "iojs-v1.4" + - "iojs-v1.3" + - "iojs-v1.2" + - "iojs-v1.1" + - "iojs-v1.0" + - "0.12" + - "0.11" + - "0.10" + - "0.9" + - "0.8" + - "0.6" + - "0.4" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' +script: + - 'if [ "${TRAVIS_NODE_VERSION}" != "4.3" ]; then npm run tests-only ; else npm test ; fi' +sudo: false +matrix: + fast_finish: true + allow_failures: + - node_js: "5.5" + - node_js: "5.4" + - node_js: "5.3" + - node_js: "5.2" + - node_js: "5.1" + - node_js: "5.0" + - node_js: "4.2" + - node_js: "4.1" + - node_js: "4.0" + - node_js: "iojs-v3.2" + - node_js: "iojs-v3.1" + - node_js: "iojs-v3.0" + - node_js: "iojs-v2.4" + - node_js: "iojs-v2.3" + - node_js: "iojs-v2.2" + - node_js: "iojs-v2.1" + - node_js: "iojs-v2.0" + - node_js: "iojs-v1.7" + - node_js: "iojs-v1.6" + - node_js: "iojs-v1.5" + - node_js: "iojs-v1.4" + - node_js: "iojs-v1.3" + - node_js: "iojs-v1.2" + - node_js: "iojs-v1.1" + - node_js: "iojs-v1.0" + - node_js: "0.11" + - node_js: "0.9" + - node_js: "0.6" + - node_js: "0.4" diff --git a/tools/eslint/node_modules/function-bind/LICENSE b/tools/eslint/node_modules/function-bind/LICENSE new file mode 100644 index 00000000000..5b1b5dc3683 --- /dev/null +++ b/tools/eslint/node_modules/function-bind/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013 Raynos. + +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. diff --git a/tools/eslint/node_modules/function-bind/README.md b/tools/eslint/node_modules/function-bind/README.md new file mode 100644 index 00000000000..81862a02cb9 --- /dev/null +++ b/tools/eslint/node_modules/function-bind/README.md @@ -0,0 +1,48 @@ +# function-bind + + + + + +Implementation of function.prototype.bind + +## Example + +I mainly do this for unit tests I run on phantomjs. +PhantomJS does not have Function.prototype.bind :( + +```js +Function.prototype.bind = require("function-bind") +``` + +## Installation + +`npm install function-bind` + +## Contributors + + - Raynos + +## MIT Licenced + + [travis-svg]: https://travis-ci.org/Raynos/function-bind.svg + [travis-url]: https://travis-ci.org/Raynos/function-bind + [npm-badge-svg]: https://badge.fury.io/js/function-bind.svg + [npm-url]: https://npmjs.org/package/function-bind + [5]: https://coveralls.io/repos/Raynos/function-bind/badge.png + [6]: https://coveralls.io/r/Raynos/function-bind + [7]: https://gemnasium.com/Raynos/function-bind.png + [8]: https://gemnasium.com/Raynos/function-bind + [deps-svg]: https://david-dm.org/Raynos/function-bind.svg + [deps-url]: https://david-dm.org/Raynos/function-bind + [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg + [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies + [11]: https://ci.testling.com/Raynos/function-bind.png + [12]: https://ci.testling.com/Raynos/function-bind diff --git a/tools/eslint/node_modules/function-bind/implementation.js b/tools/eslint/node_modules/function-bind/implementation.js new file mode 100644 index 00000000000..5e912728025 --- /dev/null +++ b/tools/eslint/node_modules/function-bind/implementation.js @@ -0,0 +1,48 @@ +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var slice = Array.prototype.slice; +var toStr = Object.prototype.toString; +var funcType = '[object Function]'; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slice.call(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return this; + } else { + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + } + }; + + var boundLength = Math.max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs.push('$' + i); + } + + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; diff --git a/tools/eslint/node_modules/function-bind/index.js b/tools/eslint/node_modules/function-bind/index.js new file mode 100644 index 00000000000..60ba5784609 --- /dev/null +++ b/tools/eslint/node_modules/function-bind/index.js @@ -0,0 +1,3 @@ +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; diff --git a/tools/eslint/node_modules/function-bind/package.json b/tools/eslint/node_modules/function-bind/package.json new file mode 100644 index 00000000000..647be39d861 --- /dev/null +++ b/tools/eslint/node_modules/function-bind/package.json @@ -0,0 +1,137 @@ +{ + "_args": [ + [ + { + "raw": "function-bind@^1.0.2", + "scope": null, + "escapedName": "function-bind", + "name": "function-bind", + "rawSpec": "^1.0.2", + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\has" + ] + ], + "_from": "function-bind@>=1.0.2 <2.0.0", + "_id": "function-bind@1.1.0", + "_inCache": true, + "_location": "/function-bind", + "_nodeVersion": "5.6.0", + "_npmOperationalInternal": { + "host": "packages-6-west.internal.npmjs.com", + "tmp": "tmp/function-bind-1.1.0.tgz_1455438520627_0.822420896962285" + }, + "_npmUser": { + "name": "ljharb", + "email": "ljharb@gmail.com" + }, + "_npmVersion": "3.6.0", + "_phantomChildren": {}, + "_requested": { + "raw": "function-bind@^1.0.2", + "scope": null, + "escapedName": "function-bind", + "name": "function-bind", + "rawSpec": "^1.0.2", + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/has" + ], + "_resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", + "_shasum": "16176714c801798e4e8f2cf7f7529467bb4a5771", + "_shrinkwrap": null, + "_spec": "function-bind@^1.0.2", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\has", + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + "bugs": { + "url": "https://github.com/Raynos/function-bind/issues", + "email": "raynos2@gmail.com" + }, + "contributors": [ + { + "name": "Raynos" + }, + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "dependencies": {}, + "description": "Implementation of Function.prototype.bind", + "devDependencies": { + "@ljharb/eslint-config": "^2.1.0", + "covert": "^1.1.0", + "eslint": "^2.0.0", + "jscs": "^2.9.0", + "tape": "^4.4.0" + }, + "directories": {}, + "dist": { + "shasum": "16176714c801798e4e8f2cf7f7529467bb4a5771", + "tarball": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz" + }, + "gitHead": "cb5057f2a0018ac48c812ccee86934a5af30efdb", + "homepage": "https://github.com/Raynos/function-bind", + "keywords": [ + "function", + "bind", + "shim", + "es5" + ], + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/Raynos/function-bind/raw/master/LICENSE" + } + ], + "main": "index", + "maintainers": [ + { + "name": "raynos", + "email": "raynos2@gmail.com" + }, + { + "name": "ljharb", + "email": "ljharb@gmail.com" + } + ], + "name": "function-bind", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/Raynos/function-bind.git" + }, + "scripts": { + "coverage": "covert test/*.js", + "coverage-quiet": "covert test/*.js --quiet", + "eslint": "eslint *.js */*.js", + "jscs": "jscs *.js */*.js", + "lint": "npm run jscs && npm run eslint", + "test": "npm run lint && npm run tests-only && npm run coverage-quiet", + "tests-only": "node test" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "ie/8..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "1.1.0" +} diff --git a/tools/eslint/node_modules/function-bind/test/index.js b/tools/eslint/node_modules/function-bind/test/index.js new file mode 100644 index 00000000000..ba1bfad2575 --- /dev/null +++ b/tools/eslint/node_modules/function-bind/test/index.js @@ -0,0 +1,250 @@ +var test = require('tape'); + +var functionBind = require('../implementation'); +var getCurrentContext = function () { return this; }; + +test('functionBind is a function', function (t) { + t.equal(typeof functionBind, 'function'); + t.end(); +}); + +test('non-functions', function (t) { + var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; + t.plan(nonFunctions.length); + for (var i = 0; i < nonFunctions.length; ++i) { + try { functionBind.call(nonFunctions[i]); } catch (ex) { + t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); + } + } + t.end(); +}); + +test('without a context', function (t) { + t.test('binds properly', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }) + }; + namespace.func(1, 2, 3); + st.deepEqual(args, [1, 2, 3]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('binds properly, and still supplies bound arguments', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, undefined, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.deepEqual(args, [1, 2, 3, 4, 5, 6]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('returns properly', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('called as a constructor', function (st) { + var thunkify = function (value) { + return function () { return value; }; + }; + st.test('returns object value', function (sst) { + var expectedReturnValue = [1, 2, 3]; + var Constructor = functionBind.call(thunkify(expectedReturnValue), null); + var result = new Constructor(); + sst.equal(result, expectedReturnValue); + sst.end(); + }); + + st.test('does not return primitive value', function (sst) { + var Constructor = functionBind.call(thunkify(42), null); + var result = new Constructor(); + sst.notEqual(result, 42); + sst.end(); + }); + + st.test('object from bound constructor is instance of original and bound constructor', function (sst) { + var A = function (x) { + this.name = x || 'A'; + }; + var B = functionBind.call(A, null, 'B'); + + var result = new B(); + sst.ok(result instanceof B, 'result is instance of bound constructor'); + sst.ok(result instanceof A, 'result is instance of original constructor'); + sst.end(); + }); + + st.end(); + }); + + t.end(); +}); + +test('with a context', function (t) { + t.test('with no bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext) + }; + namespace.func(1, 2, 3); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); + st.end(); + }); + + t.test('with bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); + st.end(); + }); + + t.test('returns properly', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('passes the correct arguments when called as a constructor', function (st) { + var expected = { name: 'Correct' }; + var namespace = { + Func: functionBind.call(function (arg) { + return arg; + }, { name: 'Incorrect' }) + }; + var returned = new namespace.Func(expected); + st.equal(returned, expected, 'returns the right arg when called as a constructor'); + st.end(); + }); + + t.test('has the new instance\'s context when called as a constructor', function (st) { + var actualContext; + var expectedContext = { foo: 'bar' }; + var namespace = { + Func: functionBind.call(function () { + actualContext = this; + }, expectedContext) + }; + var result = new namespace.Func(); + st.equal(result instanceof namespace.Func, true); + st.notEqual(actualContext, expectedContext); + st.end(); + }); + + t.end(); +}); + +test('bound function length', function (t) { + t.test('sets a correct length without thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); +}); diff --git a/tools/eslint/node_modules/has/.jshintrc b/tools/eslint/node_modules/has/.jshintrc new file mode 100644 index 00000000000..6a61a73d114 --- /dev/null +++ b/tools/eslint/node_modules/has/.jshintrc @@ -0,0 +1,14 @@ +{ + "curly": true, + "eqeqeq": true, + "immed": true, + "latedef": true, + "newcap": true, + "noarg": true, + "sub": true, + "undef": true, + "boss": true, + "eqnull": true, + "node": true, + "browser": true +} \ No newline at end of file diff --git a/tools/eslint/node_modules/has/.npmignore b/tools/eslint/node_modules/has/.npmignore new file mode 100644 index 00000000000..8419859fd3b --- /dev/null +++ b/tools/eslint/node_modules/has/.npmignore @@ -0,0 +1,3 @@ +/node_modules/ +*.log +*~ diff --git a/tools/eslint/node_modules/has/LICENSE-MIT b/tools/eslint/node_modules/has/LICENSE-MIT new file mode 100644 index 00000000000..ae7014d385d --- /dev/null +++ b/tools/eslint/node_modules/has/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2013 Thiago de Arruda + +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. diff --git a/tools/eslint/node_modules/has/README.mkd b/tools/eslint/node_modules/has/README.mkd new file mode 100644 index 00000000000..635e3a4baab --- /dev/null +++ b/tools/eslint/node_modules/has/README.mkd @@ -0,0 +1,18 @@ +# has + +> Object.prototype.hasOwnProperty.call shortcut + +## Installation + +```sh +npm install --save has +``` + +## Usage + +```js +var has = require('has'); + +has({}, 'hasOwnProperty'); // false +has(Object.prototype, 'hasOwnProperty'); // true +``` diff --git a/tools/eslint/node_modules/has/package.json b/tools/eslint/node_modules/has/package.json new file mode 100644 index 00000000000..60c3e6a79c1 --- /dev/null +++ b/tools/eslint/node_modules/has/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + { + "raw": "has@^1.0.1", + "scope": null, + "escapedName": "has", + "name": "has", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\parse-entities" + ] + ], + "_from": "has@>=1.0.1 <2.0.0", + "_id": "has@1.0.1", + "_inCache": true, + "_location": "/has", + "_nodeVersion": "2.2.1", + "_npmUser": { + "name": "tarruda", + "email": "tpadilha84@gmail.com" + }, + "_npmVersion": "2.11.0", + "_phantomChildren": {}, + "_requested": { + "raw": "has@^1.0.1", + "scope": null, + "escapedName": "has", + "name": "has", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/parse-entities", + "/stringify-entities", + "/unified" + ], + "_resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "_shasum": "8461733f538b0837c9361e39a9ab9e9704dc2f28", + "_shrinkwrap": null, + "_spec": "has@^1.0.1", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\parse-entities", + "author": { + "name": "Thiago de Arruda", + "email": "tpadilha84@gmail.com" + }, + "bugs": { + "url": "https://github.com/tarruda/has/issues" + }, + "dependencies": { + "function-bind": "^1.0.2" + }, + "description": "Object.prototype.hasOwnProperty.call shortcut", + "devDependencies": { + "chai": "~1.7.2", + "mocha": "^1.21.4" + }, + "directories": {}, + "dist": { + "shasum": "8461733f538b0837c9361e39a9ab9e9704dc2f28", + "tarball": "https://registry.npmjs.org/has/-/has-1.0.1.tgz" + }, + "engines": { + "node": ">= 0.8.0" + }, + "gitHead": "535c5c8ed1dc255c9e223829e702548dd514d2a5", + "homepage": "https://github.com/tarruda/has", + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT" + } + ], + "main": "./src/index", + "maintainers": [ + { + "name": "tarruda", + "email": "tpadilha84@gmail.com" + } + ], + "name": "has", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/tarruda/has.git" + }, + "scripts": { + "test": "node_modules/mocha/bin/mocha" + }, + "version": "1.0.1" +} diff --git a/tools/eslint/node_modules/has/src/index.js b/tools/eslint/node_modules/has/src/index.js new file mode 100644 index 00000000000..cdf328576e7 --- /dev/null +++ b/tools/eslint/node_modules/has/src/index.js @@ -0,0 +1,3 @@ +var bind = require('function-bind'); + +module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); diff --git a/tools/eslint/node_modules/has/test/.jshintrc b/tools/eslint/node_modules/has/test/.jshintrc new file mode 100644 index 00000000000..e1da2e42aba --- /dev/null +++ b/tools/eslint/node_modules/has/test/.jshintrc @@ -0,0 +1,7 @@ +{ + "globals": { + "expect": false, + "run": false + }, + "expr": true +} \ No newline at end of file diff --git a/tools/eslint/node_modules/has/test/index.js b/tools/eslint/node_modules/has/test/index.js new file mode 100644 index 00000000000..38909b0a3ff --- /dev/null +++ b/tools/eslint/node_modules/has/test/index.js @@ -0,0 +1,10 @@ +global.expect = require('chai').expect; +var has = require('../src'); + + +describe('has', function() { + it('works!', function() { + expect(has({}, 'hasOwnProperty')).to.be.false; + expect(has(Object.prototype, 'hasOwnProperty')).to.be.true; + }); +}); diff --git a/tools/eslint/node_modules/is-alphabetical/LICENSE b/tools/eslint/node_modules/is-alphabetical/LICENSE new file mode 100644 index 00000000000..8d8660d36ef --- /dev/null +++ b/tools/eslint/node_modules/is-alphabetical/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2016 Titus Wormer + +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. diff --git a/tools/eslint/node_modules/is-alphabetical/history.md b/tools/eslint/node_modules/is-alphabetical/history.md new file mode 100644 index 00000000000..ef81df42967 --- /dev/null +++ b/tools/eslint/node_modules/is-alphabetical/history.md @@ -0,0 +1,6 @@ + + + + +1.0.0 / 2016-07-11 +================== diff --git a/tools/eslint/node_modules/is-alphabetical/index.js b/tools/eslint/node_modules/is-alphabetical/index.js new file mode 100644 index 00000000000..090d47010ff --- /dev/null +++ b/tools/eslint/node_modules/is-alphabetical/index.js @@ -0,0 +1,29 @@ +/** + * @author Titus Wormer + * @copyright 2016 Titus Wormer + * @license MIT + * @module is-alphabetical + * @fileoverview Check if a character is alphabetical. + */ + +'use strict'; + +/* eslint-env commonjs */ + +/* Expose. */ +module.exports = alphabetical; + +/** + * Check whether the given character code, or the character + * code at the first character, is alphabetical. + * + * @param {string|number} character + * @return {boolean} - Whether `character` is alphabetical. + */ +function alphabetical(character) { + var code = typeof character === 'string' ? + character.charCodeAt(0) : character; + + return (code >= 97 && code <= 122) || /* a-z */ + (code >= 65 && code <= 90); /* A-Z */ +} diff --git a/tools/eslint/node_modules/is-alphabetical/package.json b/tools/eslint/node_modules/is-alphabetical/package.json new file mode 100644 index 00000000000..6f4ee9db813 --- /dev/null +++ b/tools/eslint/node_modules/is-alphabetical/package.json @@ -0,0 +1,144 @@ +{ + "_args": [ + [ + { + "raw": "is-alphabetical@^1.0.0", + "scope": null, + "escapedName": "is-alphabetical", + "name": "is-alphabetical", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\is-alphanumerical" + ] + ], + "_from": "is-alphabetical@>=1.0.0 <2.0.0", + "_id": "is-alphabetical@1.0.0", + "_inCache": true, + "_location": "/is-alphabetical", + "_nodeVersion": "5.0.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/is-alphabetical-1.0.0.tgz_1468271239488_0.1301835619378835" + }, + "_npmUser": { + "name": "wooorm", + "email": "tituswormer@gmail.com" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "raw": "is-alphabetical@^1.0.0", + "scope": null, + "escapedName": "is-alphabetical", + "name": "is-alphabetical", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/is-alphanumerical" + ], + "_resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.0.tgz", + "_shasum": "e2544c13058255f2144cb757066cd3342a1c8c46", + "_shrinkwrap": null, + "_spec": "is-alphabetical@^1.0.0", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\is-alphanumerical", + "author": { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + }, + "bugs": { + "url": "https://github.com/wooorm/is-alphabetical/issues" + }, + "contributors": [ + { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + } + ], + "dependencies": {}, + "description": "Check if a character is alphabetical", + "devDependencies": { + "browserify": "^13.0.1", + "esmangle": "^1.0.1", + "nyc": "^7.0.0", + "remark-cli": "^1.0.0", + "remark-comment-config": "^4.0.0", + "remark-github": "^5.0.0", + "remark-lint": "^4.0.0", + "remark-validate-links": "^4.0.0", + "tape": "^4.0.0", + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "e2544c13058255f2144cb757066cd3342a1c8c46", + "tarball": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.0.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "b4ca77b7acee5239c6a2eaa067840bbc9e325c15", + "homepage": "https://github.com/wooorm/is-alphabetical#readme", + "keywords": [ + "string", + "character", + "char", + "code", + "alphabetical" + ], + "license": "MIT", + "maintainers": [ + { + "name": "wooorm", + "email": "tituswormer@gmail.com" + } + ], + "name": "is-alphabetical", + "nyc": { + "check-coverage": true, + "lines": 100, + "functions": 100, + "branches": 100 + }, + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "remarkConfig": { + "output": true, + "plugins": [ + "comment-config", + "github", + "lint", + "validate-links" + ], + "settings": { + "bullet": "*" + } + }, + "repository": { + "type": "git", + "url": "git+https://github.com/wooorm/is-alphabetical.git" + }, + "scripts": { + "build": "npm run build-md && npm run build-bundle && npm run build-mangle", + "build-bundle": "browserify index.js --bare -s isAlphabetical > is-alphabetical.js", + "build-mangle": "esmangle < is-alphabetical.js > is-alphabetical.min.js", + "build-md": "remark . --quiet --frail", + "lint": "xo", + "test": "npm run build && npm run lint && npm run test-coverage", + "test-api": "node test", + "test-coverage": "nyc --reporter lcov tape test.js" + }, + "version": "1.0.0", + "xo": { + "space": true, + "ignores": [ + "is-alphabetical.js", + "is-alphabetical.min.js" + ] + } +} diff --git a/tools/eslint/node_modules/is-alphabetical/readme.md b/tools/eslint/node_modules/is-alphabetical/readme.md new file mode 100644 index 00000000000..ea08662dad3 --- /dev/null +++ b/tools/eslint/node_modules/is-alphabetical/readme.md @@ -0,0 +1,58 @@ +# is-alphabetical [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] + + + +Check if a character is alphabetical. + +## Installation + +[npm][npm-install]: + +```bash +npm install is-alphabetical +``` + +## Usage + +Dependencies: + +```javascript +var alphabetical = require('is-alphabetical'); + +alphabetical('a'); // true +alphabetical('B'); // true +alphabetical('0'); // false +alphabetical('💩'); // false +``` + +## API + +### `alphabetical(character)` + +Check whether the given character code (`number`), or the character +code at the first position (`string`), is alphabetical. + +## Related + +* [`is-decimal`](https://github.com/wooorm/is-decimal) +* [`is-hexadecimal`](https://github.com/wooorm/is-hexadecimal) + +## License + +[MIT][license] © [Titus Wormer][author] + + + +[travis-badge]: https://img.shields.io/travis/wooorm/is-alphabetical.svg + +[travis]: https://travis-ci.org/wooorm/is-alphabetical + +[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/is-alphabetical.svg + +[codecov]: https://codecov.io/github/wooorm/is-alphabetical + +[npm-install]: https://docs.npmjs.com/cli/install + +[license]: LICENSE + +[author]: http://wooorm.com diff --git a/tools/eslint/node_modules/is-alphanumerical/LICENSE b/tools/eslint/node_modules/is-alphanumerical/LICENSE new file mode 100644 index 00000000000..8d8660d36ef --- /dev/null +++ b/tools/eslint/node_modules/is-alphanumerical/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2016 Titus Wormer + +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. diff --git a/tools/eslint/node_modules/is-alphanumerical/history.md b/tools/eslint/node_modules/is-alphanumerical/history.md new file mode 100644 index 00000000000..674e111c479 --- /dev/null +++ b/tools/eslint/node_modules/is-alphanumerical/history.md @@ -0,0 +1,6 @@ + + + + +1.0.0 / 2016-07-12 +================== diff --git a/tools/eslint/node_modules/is-alphanumerical/index.js b/tools/eslint/node_modules/is-alphanumerical/index.js new file mode 100644 index 00000000000..58ea455baa4 --- /dev/null +++ b/tools/eslint/node_modules/is-alphanumerical/index.js @@ -0,0 +1,29 @@ +/** + * @author Titus Wormer + * @copyright 2016 Titus Wormer + * @license MIT + * @module is-alphanumerical + * @fileoverview Check if a character is alphanumerical. + */ + +'use strict'; + +/* eslint-env commonjs */ + +/* Dependencies. */ +var alphabetical = require('is-alphabetical'); +var decimal = require('is-decimal'); + +/* Expose. */ +module.exports = alphanumerical; + +/** + * Check whether the given character code, or the character + * code at the first character, is alphanumerical. + * + * @param {string|number} character + * @return {boolean} - Whether `character` is alphanumerical. + */ +function alphanumerical(character) { + return alphabetical(character) || decimal(character); +} diff --git a/tools/eslint/node_modules/is-alphanumerical/package.json b/tools/eslint/node_modules/is-alphanumerical/package.json new file mode 100644 index 00000000000..a1007a2d655 --- /dev/null +++ b/tools/eslint/node_modules/is-alphanumerical/package.json @@ -0,0 +1,150 @@ +{ + "_args": [ + [ + { + "raw": "is-alphanumerical@^1.0.0", + "scope": null, + "escapedName": "is-alphanumerical", + "name": "is-alphanumerical", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\parse-entities" + ] + ], + "_from": "is-alphanumerical@>=1.0.0 <2.0.0", + "_id": "is-alphanumerical@1.0.0", + "_inCache": true, + "_location": "/is-alphanumerical", + "_nodeVersion": "5.0.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/is-alphanumerical-1.0.0.tgz_1468317330202_0.4452017794828862" + }, + "_npmUser": { + "name": "wooorm", + "email": "tituswormer@gmail.com" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "raw": "is-alphanumerical@^1.0.0", + "scope": null, + "escapedName": "is-alphanumerical", + "name": "is-alphanumerical", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/parse-entities", + "/stringify-entities" + ], + "_resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.0.tgz", + "_shasum": "e06492e719c1bf15dec239e4f1af5f67b4d6e7bf", + "_shrinkwrap": null, + "_spec": "is-alphanumerical@^1.0.0", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\parse-entities", + "author": { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + }, + "bugs": { + "url": "https://github.com/wooorm/is-alphanumerical/issues" + }, + "contributors": [ + { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + } + ], + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + }, + "description": "Check if a character is alphanumerical", + "devDependencies": { + "browserify": "^13.0.1", + "esmangle": "^1.0.1", + "nyc": "^7.0.0", + "remark-cli": "^1.0.0", + "remark-comment-config": "^4.0.0", + "remark-github": "^5.0.0", + "remark-lint": "^4.0.0", + "remark-validate-links": "^4.0.0", + "tape": "^4.0.0", + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "e06492e719c1bf15dec239e4f1af5f67b4d6e7bf", + "tarball": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.0.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "94c7f06476ad0e5d4a6ea6ebc970ddbd4759da21", + "homepage": "https://github.com/wooorm/is-alphanumerical#readme", + "keywords": [ + "string", + "character", + "char", + "code", + "alphabetical", + "numerical", + "alphanumerical" + ], + "license": "MIT", + "maintainers": [ + { + "name": "wooorm", + "email": "tituswormer@gmail.com" + } + ], + "name": "is-alphanumerical", + "nyc": { + "check-coverage": true, + "lines": 100, + "functions": 100, + "branches": 100 + }, + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "remarkConfig": { + "output": true, + "plugins": [ + "comment-config", + "github", + "lint", + "validate-links" + ], + "settings": { + "bullet": "*" + } + }, + "repository": { + "type": "git", + "url": "git+https://github.com/wooorm/is-alphanumerical.git" + }, + "scripts": { + "build": "npm run build-md && npm run build-bundle && npm run build-mangle", + "build-bundle": "browserify index.js --bare -s isAlphanumerical > is-alphanumerical.js", + "build-mangle": "esmangle < is-alphanumerical.js > is-alphanumerical.min.js", + "build-md": "remark . --quiet --frail", + "lint": "xo", + "test": "npm run build && npm run lint && npm run test-coverage", + "test-api": "node test", + "test-coverage": "nyc --reporter lcov tape test.js" + }, + "version": "1.0.0", + "xo": { + "space": true, + "ignores": [ + "is-alphanumerical.js", + "is-alphanumerical.min.js" + ] + } +} diff --git a/tools/eslint/node_modules/is-alphanumerical/readme.md b/tools/eslint/node_modules/is-alphanumerical/readme.md new file mode 100644 index 00000000000..26e6289d38b --- /dev/null +++ b/tools/eslint/node_modules/is-alphanumerical/readme.md @@ -0,0 +1,60 @@ +# is-alphanumerical [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] + + + +Check if a character is alphanumerical (`[a-zA-Z0-9]`). + +## Installation + +[npm][npm-install]: + +```bash +npm install is-alphanumerical +``` + +## Usage + +```javascript +var alphanumerical = require('is-alphanumerical'); + +alphanumerical('a'); // true +alphanumerical('Z'); // true +alphanumerical('0'); // true +alphanumerical(' '); // false +alphanumerical('💩'); // false +``` + +## API + +### `alphanumerical(character)` + +Check whether the given character code (`number`), or the character +code at the first position (`string`), is alphanumerical. + +## Related + +* [`is-alphabetical`](https://github.com/wooorm/is-alphabetical) +* [`is-decimal`](https://github.com/wooorm/is-decimal) +* [`is-hexadecimal`](https://github.com/wooorm/is-hexadecimal) +* [`is-whitespace-character`](https://github.com/wooorm/is-whitespace-character) +* [`is-word-character`](https://github.com/wooorm/is-word-character) + +## License + +[MIT][license] © [Titus Wormer][author] + + + +[travis-badge]: https://img.shields.io/travis/wooorm/is-alphanumerical.svg + +[travis]: https://travis-ci.org/wooorm/is-alphanumerical + +[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/is-alphanumerical.svg + +[codecov]: https://codecov.io/github/wooorm/is-alphanumerical + +[npm-install]: https://docs.npmjs.com/cli/install + +[license]: LICENSE + +[author]: http://wooorm.com diff --git a/tools/eslint/node_modules/is-decimal/LICENSE b/tools/eslint/node_modules/is-decimal/LICENSE new file mode 100644 index 00000000000..8d8660d36ef --- /dev/null +++ b/tools/eslint/node_modules/is-decimal/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2016 Titus Wormer + +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. diff --git a/tools/eslint/node_modules/is-decimal/history.md b/tools/eslint/node_modules/is-decimal/history.md new file mode 100644 index 00000000000..ef81df42967 --- /dev/null +++ b/tools/eslint/node_modules/is-decimal/history.md @@ -0,0 +1,6 @@ + + + + +1.0.0 / 2016-07-11 +================== diff --git a/tools/eslint/node_modules/is-decimal/index.js b/tools/eslint/node_modules/is-decimal/index.js new file mode 100644 index 00000000000..15ed3735079 --- /dev/null +++ b/tools/eslint/node_modules/is-decimal/index.js @@ -0,0 +1,28 @@ +/** + * @author Titus Wormer + * @copyright 2016 Titus Wormer + * @license MIT + * @module is-decimal + * @fileoverview Check if a character is decimal. + */ + +'use strict'; + +/* eslint-env commonjs */ + +/* Expose. */ +module.exports = decimal; + +/** + * Check whether the given character code, or the character + * code at the first character, is decimal. + * + * @param {string|number} character + * @return {boolean} - Whether `character` is decimal. + */ +function decimal(character) { + var code = typeof character === 'string' ? + character.charCodeAt(0) : character; + + return code >= 48 && code <= 57; /* 0-9 */ +} diff --git a/tools/eslint/node_modules/is-decimal/package.json b/tools/eslint/node_modules/is-decimal/package.json new file mode 100644 index 00000000000..a1f7d0bb1f6 --- /dev/null +++ b/tools/eslint/node_modules/is-decimal/package.json @@ -0,0 +1,145 @@ +{ + "_args": [ + [ + { + "raw": "is-decimal@^1.0.0", + "scope": null, + "escapedName": "is-decimal", + "name": "is-decimal", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\parse-entities" + ] + ], + "_from": "is-decimal@>=1.0.0 <2.0.0", + "_id": "is-decimal@1.0.0", + "_inCache": true, + "_location": "/is-decimal", + "_nodeVersion": "5.0.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/is-decimal-1.0.0.tgz_1468270298791_0.2623138800263405" + }, + "_npmUser": { + "name": "wooorm", + "email": "tituswormer@gmail.com" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "raw": "is-decimal@^1.0.0", + "scope": null, + "escapedName": "is-decimal", + "name": "is-decimal", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/is-alphanumerical", + "/parse-entities" + ], + "_resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.0.tgz", + "_shasum": "940579b6ea63c628080a69e62bda88c8470b4fe0", + "_shrinkwrap": null, + "_spec": "is-decimal@^1.0.0", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\parse-entities", + "author": { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + }, + "bugs": { + "url": "https://github.com/wooorm/is-decimal/issues" + }, + "contributors": [ + { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + } + ], + "dependencies": {}, + "description": "Check if a character is decimal", + "devDependencies": { + "browserify": "^13.0.1", + "esmangle": "^1.0.1", + "nyc": "^7.0.0", + "remark-cli": "^1.0.0", + "remark-comment-config": "^4.0.0", + "remark-github": "^5.0.0", + "remark-lint": "^4.0.0", + "remark-validate-links": "^4.0.0", + "tape": "^4.0.0", + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "940579b6ea63c628080a69e62bda88c8470b4fe0", + "tarball": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.0.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "6f8e012e4ff8c78ad60625a6d3d8463795318f8b", + "homepage": "https://github.com/wooorm/is-decimal#readme", + "keywords": [ + "string", + "character", + "char", + "code", + "decimal" + ], + "license": "MIT", + "maintainers": [ + { + "name": "wooorm", + "email": "tituswormer@gmail.com" + } + ], + "name": "is-decimal", + "nyc": { + "check-coverage": true, + "lines": 100, + "functions": 100, + "branches": 100 + }, + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "remarkConfig": { + "output": true, + "plugins": [ + "comment-config", + "github", + "lint", + "validate-links" + ], + "settings": { + "bullet": "*" + } + }, + "repository": { + "type": "git", + "url": "git+https://github.com/wooorm/is-decimal.git" + }, + "scripts": { + "build": "npm run build-md && npm run build-bundle && npm run build-mangle", + "build-bundle": "browserify index.js --bare -s isDecimal > is-decimal.js", + "build-mangle": "esmangle < is-decimal.js > is-decimal.min.js", + "build-md": "remark . --quiet --frail", + "lint": "xo", + "test": "npm run build && npm run lint && npm run test-coverage", + "test-api": "node test", + "test-coverage": "nyc --reporter lcov tape test.js" + }, + "version": "1.0.0", + "xo": { + "space": true, + "ignores": [ + "is-decimal.js", + "is-decimal.min.js" + ] + } +} diff --git a/tools/eslint/node_modules/is-decimal/readme.md b/tools/eslint/node_modules/is-decimal/readme.md new file mode 100644 index 00000000000..58d25c26bc5 --- /dev/null +++ b/tools/eslint/node_modules/is-decimal/readme.md @@ -0,0 +1,58 @@ +# is-decimal [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] + + + +Check if a character is decimal. + +## Installation + +[npm][npm-install]: + +```bash +npm install is-decimal +``` + +## Usage + +Dependencies: + +```javascript +var decimal = require('is-decimal'); + +decimal('0'); // true +decimal('9'); // true +decimal('a'); // false +decimal('💩'); // false +``` + +## API + +### `decimal(character)` + +Check whether the given character code (`number`), or the character +code at the first position (`string`), is decimal. + +## Related + +* [`is-alphabetical`](https://github.com/wooorm/is-alphabetical) +* [`is-hexadecimal`](https://github.com/wooorm/is-hexadecimal) + +## License + +[MIT][license] © [Titus Wormer][author] + + + +[travis-badge]: https://img.shields.io/travis/wooorm/is-decimal.svg + +[travis]: https://travis-ci.org/wooorm/is-decimal + +[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/is-decimal.svg + +[codecov]: https://codecov.io/github/wooorm/is-decimal + +[npm-install]: https://docs.npmjs.com/cli/install + +[license]: LICENSE + +[author]: http://wooorm.com diff --git a/tools/eslint/node_modules/is-hexadecimal/LICENSE b/tools/eslint/node_modules/is-hexadecimal/LICENSE new file mode 100644 index 00000000000..8d8660d36ef --- /dev/null +++ b/tools/eslint/node_modules/is-hexadecimal/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2016 Titus Wormer + +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. diff --git a/tools/eslint/node_modules/is-hexadecimal/history.md b/tools/eslint/node_modules/is-hexadecimal/history.md new file mode 100644 index 00000000000..ef81df42967 --- /dev/null +++ b/tools/eslint/node_modules/is-hexadecimal/history.md @@ -0,0 +1,6 @@ + + + + +1.0.0 / 2016-07-11 +================== diff --git a/tools/eslint/node_modules/is-hexadecimal/index.js b/tools/eslint/node_modules/is-hexadecimal/index.js new file mode 100644 index 00000000000..dfb9ddb5780 --- /dev/null +++ b/tools/eslint/node_modules/is-hexadecimal/index.js @@ -0,0 +1,30 @@ +/** + * @author Titus Wormer + * @copyright 2016 Titus Wormer + * @license MIT + * @module is-hexadecimal + * @fileoverview Check if a character is hexadecimal. + */ + +'use strict'; + +/* eslint-env commonjs */ + +/* Expose. */ +module.exports = hexadecimal; + +/** + * Check whether the given character code, or the character + * code at the first character, is hexadecimal. + * + * @param {string|number} character + * @return {boolean} - Whether `character` is hexadecimal. + */ +function hexadecimal(character) { + var code = typeof character === 'string' ? + character.charCodeAt(0) : character; + + return (code >= 97 /* a */ && code <= 102 /* z */) || + (code >= 65 /* A */ && code <= 70 /* Z */) || + (code >= 48 /* A */ && code <= 57 /* Z */); +} diff --git a/tools/eslint/node_modules/is-hexadecimal/package.json b/tools/eslint/node_modules/is-hexadecimal/package.json new file mode 100644 index 00000000000..0196f745f3b --- /dev/null +++ b/tools/eslint/node_modules/is-hexadecimal/package.json @@ -0,0 +1,145 @@ +{ + "_args": [ + [ + { + "raw": "is-hexadecimal@^1.0.0", + "scope": null, + "escapedName": "is-hexadecimal", + "name": "is-hexadecimal", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\parse-entities" + ] + ], + "_from": "is-hexadecimal@>=1.0.0 <2.0.0", + "_id": "is-hexadecimal@1.0.0", + "_inCache": true, + "_location": "/is-hexadecimal", + "_nodeVersion": "5.0.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/is-hexadecimal-1.0.0.tgz_1468270886225_0.06683366000652313" + }, + "_npmUser": { + "name": "wooorm", + "email": "tituswormer@gmail.com" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "raw": "is-hexadecimal@^1.0.0", + "scope": null, + "escapedName": "is-hexadecimal", + "name": "is-hexadecimal", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/parse-entities", + "/stringify-entities" + ], + "_resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.0.tgz", + "_shasum": "5c459771d2af9a2e3952781fd54fcb1bcfe4113c", + "_shrinkwrap": null, + "_spec": "is-hexadecimal@^1.0.0", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\parse-entities", + "author": { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + }, + "bugs": { + "url": "https://github.com/wooorm/is-hexadecimal/issues" + }, + "contributors": [ + { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + } + ], + "dependencies": {}, + "description": "Check if a character is hexadecimal", + "devDependencies": { + "browserify": "^13.0.1", + "esmangle": "^1.0.1", + "nyc": "^7.0.0", + "remark-cli": "^1.0.0", + "remark-comment-config": "^4.0.0", + "remark-github": "^5.0.0", + "remark-lint": "^4.0.0", + "remark-validate-links": "^4.0.0", + "tape": "^4.0.0", + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "5c459771d2af9a2e3952781fd54fcb1bcfe4113c", + "tarball": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.0.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "52794c3658f9912104564b0851921f03a69925a3", + "homepage": "https://github.com/wooorm/is-hexadecimal#readme", + "keywords": [ + "string", + "character", + "char", + "code", + "hexadecimal" + ], + "license": "MIT", + "maintainers": [ + { + "name": "wooorm", + "email": "tituswormer@gmail.com" + } + ], + "name": "is-hexadecimal", + "nyc": { + "check-coverage": true, + "lines": 100, + "functions": 100, + "branches": 100 + }, + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "remarkConfig": { + "output": true, + "plugins": [ + "comment-config", + "github", + "lint", + "validate-links" + ], + "settings": { + "bullet": "*" + } + }, + "repository": { + "type": "git", + "url": "git+https://github.com/wooorm/is-hexadecimal.git" + }, + "scripts": { + "build": "npm run build-md && npm run build-bundle && npm run build-mangle", + "build-bundle": "browserify index.js --bare -s isHexadecimal > is-hexadecimal.js", + "build-mangle": "esmangle < is-hexadecimal.js > is-hexadecimal.min.js", + "build-md": "remark . --quiet --frail", + "lint": "xo", + "test": "npm run build && npm run lint && npm run test-coverage", + "test-api": "node test", + "test-coverage": "nyc --reporter lcov tape test.js" + }, + "version": "1.0.0", + "xo": { + "space": true, + "ignores": [ + "is-hexadecimal.js", + "is-hexadecimal.min.js" + ] + } +} diff --git a/tools/eslint/node_modules/is-hexadecimal/readme.md b/tools/eslint/node_modules/is-hexadecimal/readme.md new file mode 100644 index 00000000000..19640e36682 --- /dev/null +++ b/tools/eslint/node_modules/is-hexadecimal/readme.md @@ -0,0 +1,58 @@ +# is-hexadecimal [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] + + + +Check if a character is hexadecimal. + +## Installation + +[npm][npm-install]: + +```bash +npm install is-hexadecimal +``` + +## Usage + +Dependencies: + +```javascript +var hexadecimal = require('is-hexadecimal'); + +hexadecimal('a'); // true +hexadecimal('0'); // true +hexadecimal('G'); // false +hexadecimal('💩'); // false +``` + +## API + +### `hexadecimal(character)` + +Check whether the given character code (`number`), or the character +code at the first position (`string`), is hexadecimal. + +## Related + +* [`is-alphabetical`](https://github.com/wooorm/is-alphabetical) +* [`is-decimal`](https://github.com/wooorm/is-decimal) + +## License + +[MIT][license] © [Titus Wormer][author] + + + +[travis-badge]: https://img.shields.io/travis/wooorm/is-hexadecimal.svg + +[travis]: https://travis-ci.org/wooorm/is-hexadecimal + +[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/is-hexadecimal.svg + +[codecov]: https://codecov.io/github/wooorm/is-hexadecimal + +[npm-install]: https://docs.npmjs.com/cli/install + +[license]: LICENSE + +[author]: http://wooorm.com diff --git a/tools/eslint/node_modules/longest-streak/LICENSE b/tools/eslint/node_modules/longest-streak/LICENSE new file mode 100644 index 00000000000..611b67581bb --- /dev/null +++ b/tools/eslint/node_modules/longest-streak/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2015 Titus Wormer + +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. diff --git a/tools/eslint/node_modules/longest-streak/history.md b/tools/eslint/node_modules/longest-streak/history.md new file mode 100644 index 00000000000..654a34d89a3 --- /dev/null +++ b/tools/eslint/node_modules/longest-streak/history.md @@ -0,0 +1,9 @@ +--- +mdast: + setext: true +--- + + + +1.0.0 / 2015-07-12 +================== diff --git a/tools/eslint/node_modules/longest-streak/index.js b/tools/eslint/node_modules/longest-streak/index.js new file mode 100644 index 00000000000..719d5168603 --- /dev/null +++ b/tools/eslint/node_modules/longest-streak/index.js @@ -0,0 +1,51 @@ +'use strict'; + +/** + * Get the count of the longest repeating streak of + * `character` in `value`. + * + * @example + * longestStreak('` foo `` bar `', '`') // 2 + * + * @param {string} value - Content, coerced to string. + * @param {string} character - Single character to look + * for. + * @return {number} - Number of characters at the place + * where `character` occurs in its longest streak in + * `value`. + * @throws {Error} - when `character` is not a single + * character. + */ +function longestStreak(value, character) { + var count = 0; + var maximum = 0; + var index = -1; + var length; + + value = String(value); + length = value.length; + + if (typeof character !== 'string' || character.length !== 1) { + throw new Error('Expected character'); + } + + while (++index < length) { + if (value.charAt(index) === character) { + count++; + + if (count > maximum) { + maximum = count; + } + } else { + count = 0; + } + } + + return maximum; +} + +/* + * Expose. + */ + +module.exports = longestStreak; diff --git a/tools/eslint/node_modules/longest-streak/package.json b/tools/eslint/node_modules/longest-streak/package.json new file mode 100644 index 00000000000..3db11ba8510 --- /dev/null +++ b/tools/eslint/node_modules/longest-streak/package.json @@ -0,0 +1,115 @@ +{ + "_args": [ + [ + { + "raw": "longest-streak@^1.0.0", + "scope": null, + "escapedName": "longest-streak", + "name": "longest-streak", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\remark-stringify" + ] + ], + "_from": "longest-streak@>=1.0.0 <2.0.0", + "_id": "longest-streak@1.0.0", + "_inCache": true, + "_location": "/longest-streak", + "_nodeVersion": "2.3.3", + "_npmUser": { + "name": "wooorm", + "email": "tituswormer@gmail.com" + }, + "_npmVersion": "2.11.3", + "_phantomChildren": {}, + "_requested": { + "raw": "longest-streak@^1.0.0", + "scope": null, + "escapedName": "longest-streak", + "name": "longest-streak", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/remark-stringify" + ], + "_resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-1.0.0.tgz", + "_shasum": "d06597c4d4c31b52ccb1f5d8f8fe7148eafd6965", + "_shrinkwrap": null, + "_spec": "longest-streak@^1.0.0", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\remark-stringify", + "author": { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com" + }, + "bugs": { + "url": "https://github.com/wooorm/longest-streak/issues" + }, + "dependencies": {}, + "description": "Count the longest repeating streak of a character", + "devDependencies": { + "browserify": "^10.0.0", + "eslint": "^0.24.0", + "esmangle": "^1.0.0", + "istanbul": "^0.3.0", + "jscs": "^1.0.0", + "jscs-jsdoc": "^1.0.0", + "mdast": "^0.26.0", + "mdast-github": "^0.3.1", + "mdast-lint": "^0.4.1", + "mdast-yaml-config": "^0.2.0", + "mocha": "^2.0.0" + }, + "directories": {}, + "dist": { + "shasum": "d06597c4d4c31b52ccb1f5d8f8fe7148eafd6965", + "tarball": "https://registry.npmjs.org/longest-streak/-/longest-streak-1.0.0.tgz" + }, + "files": [ + "index.js", + "LICENSE" + ], + "gitHead": "77606ef995c1825d353f1a12ef7ded403df67c52", + "homepage": "https://github.com/wooorm/longest-streak#readme", + "keywords": [ + "count", + "length", + "longest", + "repeating", + "streak", + "character" + ], + "license": "MIT", + "maintainers": [ + { + "name": "wooorm", + "email": "tituswormer@gmail.com" + } + ], + "name": "longest-streak", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/wooorm/longest-streak.git" + }, + "scripts": { + "build": "npm run build-md && npm run build-bundle", + "build-bundle": "browserify index.js --bare -s longestStreak > longest-streak.js", + "build-md": "mdast . LICENSE --output --quiet", + "lint": "npm run lint-api && npm run lint-style", + "lint-api": "eslint .", + "lint-style": "jscs --reporter inline .", + "make": "npm run lint && npm run test-coverage", + "postbuild-bundle": "esmangle longest-streak.js > longest-streak.min.js", + "test": "npm run test-api", + "test-api": "mocha --check-leaks test.js", + "test-coverage": "istanbul cover _mocha -- --check-leaks test.js", + "test-coveralls": "istanbul cover _mocha --report lcovonly -- --check-leaks test.js", + "test-travis": "npm run test-coveralls" + }, + "version": "1.0.0" +} diff --git a/tools/eslint/node_modules/longest-streak/readme.md b/tools/eslint/node_modules/longest-streak/readme.md new file mode 100644 index 00000000000..780c53cf7b1 --- /dev/null +++ b/tools/eslint/node_modules/longest-streak/readme.md @@ -0,0 +1,52 @@ +# longest-streak [![Build Status](https://img.shields.io/travis/wooorm/longest-streak.svg?style=flat)](https://travis-ci.org/wooorm/longest-streak) [![Coverage Status](https://img.shields.io/coveralls/wooorm/longest-streak.svg?style=flat)](https://coveralls.io/r/wooorm/longest-streak?branch=master) + +Count the longest repeating streak of a character. + +## Installation + +[npm](https://docs.npmjs.com/cli/install): + +```bash +npm install longest-streak +``` + +**longest-streak** is also available for [bower](http://bower.io/#install-packages), +[component](https://github.com/componentjs/component), [duo](http://duojs.org/#getting-started), +and for AMD, CommonJS, and globals ([uncompressed](longest-streak.js) and +[compressed](longest-streak.min.js)). + +## Usage + +Dependencies. + +```javascript +var longestStreak = require('longest-streak'); +``` + +Process: + +```javascript +longestStreak('` foo `` bar `', '`') // 2 +``` + +## API + +### longestStreak(value, character) + +Get the count of the longest repeating streak of `character` in `value`. + +Parameters: + +* `value` (`string`) — Content, coerced to string. +* `character` (`string`) — Single character to look for. + +Returns: `number` — Number of characters at the place where `character` +occurs in its longest streak in `value`. + +Throws: + +* `Error` — when `character` is not a single character string. + +## License + +[MIT](LICENSE) @ [Titus Wormer](http://wooorm.com) diff --git a/tools/eslint/node_modules/markdown-table/History.md b/tools/eslint/node_modules/markdown-table/History.md new file mode 100644 index 00000000000..31f82cf9201 --- /dev/null +++ b/tools/eslint/node_modules/markdown-table/History.md @@ -0,0 +1,63 @@ + +0.4.0 / 2015-04-08 +================== + +* Refactor to simplify branch ([23f8bea](https://github.com/wooorm/markdown-table/commit/23f8bea)) +* Update `.travis.yml` ([e68017e](https://github.com/wooorm/markdown-table/commit/e68017e)) +* Refactor style ([d6d7f37](https://github.com/wooorm/markdown-table/commit/d6d7f37)) +* Remove left-alignment colon for neutral columns ([6061c21](https://github.com/wooorm/markdown-table/commit/6061c21)) +* Refactor style ([7022ed1](https://github.com/wooorm/markdown-table/commit/7022ed1)) +* Update chalk ([7beb551](https://github.com/wooorm/markdown-table/commit/7beb551)) +* Update eslint ([14d61ab](https://github.com/wooorm/markdown-table/commit/14d61ab)) + +0.3.2 / 2015-01-22 +================== + + * Update test reference to include line numbers in `Readme.md` + * Update copyright notice in `LICENSE` to include 2015 + * Add link to whole license in `Readme.md` + * Add Duo as an instalation method in `Readme.md` + * Add links to installation methods in `Readme.md` + * Refactor fences code blocks in `Readme.md` + * Update usage example in `Readme.md` for changes + * Update npm script targets + * Update jscs-jsdoc + * Update eslint + +0.3.1 / 2014-12-26 +================== + + * Merge branch 'bug/dont-modify-align' + * Fix mutating `options.align` + +0.3.0 / 2014-12-19 +================== + + * Add support for multi-character values in alignment + * Remove alignment when left-aligning + * Refactor to adhere to strict jsdoc style + * Add jscs-jsdoc configuration to `.jscs.json` + * Add jscs-jsdoc as a dev-dependency + * Refactor npm scripts for changes in npm + +0.2.0 / 2014-11-29 +================== + + * Add option to specify a single alignment + * Refactor npm script targets in `package.json` + * Add link to personal website in `Readme.md` + * Add shorter description to `Readme.md`, `package.json`, `component.json`, `bower.json` + * Fix incorrect executive rights on `test.js` + * Update eslint + * Fix link to test in `Readme.md` + +0.1.0 / 2014-10-30 +================== + + * Add flat badges to `Readme.md` + * Add `.eslintrc` + * Refactor to disallow space after object keys + * Move `spec/markdown-table.spec.js` to `test.js` + * Update `.gitignore`, `.npmignore`, bower ignore + * Remove incorrect data reference in `component.json` + * Update eslint, mocha diff --git a/tools/eslint/node_modules/markdown-table/LICENSE b/tools/eslint/node_modules/markdown-table/LICENSE new file mode 100644 index 00000000000..ce731a9cb02 --- /dev/null +++ b/tools/eslint/node_modules/markdown-table/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014-2015 Titus Wormer + +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. diff --git a/tools/eslint/node_modules/markdown-table/Readme.md b/tools/eslint/node_modules/markdown-table/Readme.md new file mode 100644 index 00000000000..9931cc11d2f --- /dev/null +++ b/tools/eslint/node_modules/markdown-table/Readme.md @@ -0,0 +1,132 @@ +# markdown-table [![Build Status](https://img.shields.io/travis/wooorm/markdown-table.svg?style=flat)](https://travis-ci.org/wooorm/markdown-table) [![Coverage Status](https://img.shields.io/coveralls/wooorm/markdown-table.svg?style=flat)](https://coveralls.io/r/wooorm/markdown-table?branch=master) + +Generate fancy [Markdown](https://help.github.com/articles/github-flavored-markdown/#tables)/ASCII tables. + +## Installation + +[npm](https://docs.npmjs.com/cli/install): + +```bash +$ npm install markdown-table +``` + +[Component.js](https://github.com/componentjs/component): + +```bash +$ component install wooorm/markdown-table +``` + +[Bower](http://bower.io/#install-packages): + +```bash +$ bower install markdown-table +``` + +[Duo](http://duojs.org/#getting-started): + +```javascript +var table = require('wooorm/markdown-table'); +``` + +## Usage + +```javascript +var table = require('markdown-table'); + +/** + * Normal usage (defaults to left-alignment): + */ + +table([ + ['Branch', 'Commit'], + ['master', '0123456789abcdef'], + ['staging', 'fedcba9876543210'] +]); +/* + * | Branch | Commit | + * | ------- | ---------------- | + * | master | 0123456789abcdef | + * | staging | fedcba9876543210 | + */ + +/** + * With alignment: + */ + +table([ + ['Beep', 'No.', 'Boop'], + ['beep', '1024', 'xyz'], + ['boop', '3388450', 'tuv'], + ['foo', '10106', 'qrstuv'], + ['bar', '45', 'lmno'] +], { + 'align': ['l', 'c', 'r'] +}); +/* + * | Beep | No. | Boop | + * | :--- | :-----: | -----: | + * | beep | 1024 | xyz | + * | boop | 3388450 | tuv | + * | foo | 10106 | qrstuv | + * | bar | 45 | lmno | + */ + +/** + * Alignment on dots: + */ + +table([ + ['No.'], + ['0.1.2'], + ['11.22.33'], + ['5.6.'], + ['1.22222'], +], { + 'align': '.' +}); +/* + * | No. | + * | :---------: | + * | 0.1.2 | + * | 11.22.33 | + * | 5.6. | + * | 1.22222 | + */ +``` + +## API + +### markdownTable(table, options?) + +Turns a given matrix of strings (an array of arrays of strings) into a table. + +The following options are available: + +- `options.align` — String or array of strings, the strings being either `"l"` (left), `"r"` (right), `c` (center), or `.` (dot). Other values are treated as `""`, which doesn’t place the colon but does left align. _Only the lowercased first character is used, so `Right` is fine_; +- `options.delimiter` — Value to insert between cells. Carefull, non-pipe values will break GitHub Flavored Markdown; +- `options.start` — Value to insert at the beginning of every row. +- `options.end` — Value to insert at the end of every row. +- `options.rule` — Whether to display a rule between the header and the body of the table. Carefull, will break GitHub Flavored Markdown when `false`; +- `options.stringLength` — The method to detect the length of a cell (see below). + +### options.stringLength(cell) + +ANSI-sequences mess up tables on terminals. To fix this, you have to pass in a `stringLength` option to detect the “visible” length of a cell. + +```javascript +var chalk = require('chalk'); + +function stringLength(cell) { + return chalk.stripColor(cell).length; +} +``` + +See the [tests for an example](test.js#L368-L375). + +## Inspiration + +The original idea and basic implementation was inspired by James Halliday's [text-table](https://github.com/substack/text-table) library. + +## License + +[MIT](LICENSE) © [Titus Wormer](http://wooorm.com) diff --git a/tools/eslint/node_modules/markdown-table/index.js b/tools/eslint/node_modules/markdown-table/index.js new file mode 100644 index 00000000000..8b64246a2d4 --- /dev/null +++ b/tools/eslint/node_modules/markdown-table/index.js @@ -0,0 +1,284 @@ +'use strict'; + +/* + * Useful expressions. + */ + +var EXPRESSION_DOT = /\./; +var EXPRESSION_LAST_DOT = /\.[^.]*$/; + +/* + * Allowed alignment values. + */ + +var LEFT = 'l'; +var RIGHT = 'r'; +var CENTER = 'c'; +var DOT = '.'; +var NULL = ''; + +var ALLIGNMENT = [LEFT, RIGHT, CENTER, DOT, NULL]; + +/* + * Characters. + */ + +var COLON = ':'; +var DASH = '-'; +var PIPE = '|'; +var SPACE = ' '; +var NEW_LINE = '\n'; + +/** + * Get the length of `value`. + * + * @param {string} value + * @return {number} + */ +function lengthNoop(value) { + return String(value).length; +} + +/** + * Get a string consisting of `length` `character`s. + * + * @param {number} length + * @param {string} [character=' '] + * @return {string} + */ +function pad(length, character) { + return Array(length + 1).join(character || SPACE); +} + +/** + * Get the position of the last dot in `value`. + * + * @param {string} value + * @return {number} + */ +function dotindex(value) { + var match = EXPRESSION_LAST_DOT.exec(value); + + return match ? match.index + 1 : value.length; +} + +/** + * Create a table from a matrix of strings. + * + * @param {Array.>} table + * @param {Object?} options + * @param {boolean?} [options.rule=true] + * @param {string?} [options.delimiter=" | "] + * @param {string?} [options.start="| "] + * @param {string?} [options.end=" |"] + * @param {Array.?} options.align + * @param {function(string)?} options.stringLength + * @return {string} Pretty table + */ +function markdownTable(table, options) { + var settings = options || {}; + var delimiter = settings.delimiter; + var start = settings.start; + var end = settings.end; + var alignment = settings.align; + var calculateStringLength = settings.stringLength || lengthNoop; + var cellCount = 0; + var rowIndex = -1; + var rowLength = table.length; + var sizes = []; + var align; + var rule; + var rows; + var row; + var cells; + var index; + var position; + var size; + var value; + var spacing; + var before; + var after; + + alignment = alignment ? alignment.concat() : []; + + if (delimiter === null || delimiter === undefined) { + delimiter = SPACE + PIPE + SPACE; + } + + if (start === null || start === undefined) { + start = PIPE + SPACE; + } + + if (end === null || end === undefined) { + end = SPACE + PIPE; + } + + while (++rowIndex < rowLength) { + row = table[rowIndex]; + + index = -1; + + if (row.length > cellCount) { + cellCount = row.length; + } + + while (++index < cellCount) { + position = row[index] ? dotindex(row[index]) : null; + + if (!sizes[index]) { + sizes[index] = 3; + } + + if (position > sizes[index]) { + sizes[index] = position; + } + } + } + + if (typeof alignment === 'string') { + alignment = pad(cellCount, alignment).split(''); + } + + /* + * Make sure only valid alignments are used. + */ + + index = -1; + + while (++index < cellCount) { + align = alignment[index]; + + if (typeof align === 'string') { + align = align.charAt(0).toLowerCase(); + } + + if (ALLIGNMENT.indexOf(align) === -1) { + align = NULL; + } + + alignment[index] = align; + } + + rowIndex = -1; + rows = []; + + while (++rowIndex < rowLength) { + row = table[rowIndex]; + + index = -1; + cells = []; + + while (++index < cellCount) { + value = row[index]; + + if (value === null || value === undefined) { + value = ''; + } else { + value = String(value); + } + + if (alignment[index] !== DOT) { + cells[index] = value; + } else { + position = dotindex(value); + + size = sizes[index] + + (EXPRESSION_DOT.test(value) ? 0 : 1) - + (calculateStringLength(value) - position); + + cells[index] = value + pad(size - 1); + } + } + + rows[rowIndex] = cells; + } + + sizes = []; + rowIndex = -1; + + while (++rowIndex < rowLength) { + cells = rows[rowIndex]; + + index = -1; + + while (++index < cellCount) { + value = cells[index]; + + if (!sizes[index]) { + sizes[index] = 3; + } + + size = calculateStringLength(value); + + if (size > sizes[index]) { + sizes[index] = size; + } + } + } + + rowIndex = -1; + + while (++rowIndex < rowLength) { + cells = rows[rowIndex]; + + index = -1; + + while (++index < cellCount) { + value = cells[index]; + + position = sizes[index] - (calculateStringLength(value) || 0); + spacing = pad(position); + + if (alignment[index] === RIGHT || alignment[index] === DOT) { + value = spacing + value; + } else if (alignment[index] !== CENTER) { + value = value + spacing; + } else { + position = position / 2; + + if (position % 1 === 0) { + before = position; + after = position; + } else { + before = position + 0.5; + after = position - 0.5; + } + + value = pad(before) + value + pad(after); + } + + cells[index] = value; + } + + rows[rowIndex] = cells.join(delimiter); + } + + if (settings.rule !== false) { + index = -1; + rule = []; + + while (++index < cellCount) { + align = alignment[index]; + + /* + * When `align` is left, don't add colons. + */ + + value = align === RIGHT || align === NULL ? DASH : COLON; + value += pad(sizes[index] - 2, DASH); + value += align !== LEFT && align !== NULL ? COLON : DASH; + + rule[index] = value; + } + + rows.splice(1, 0, rule.join(delimiter)); + } + + return start + rows.join(end + NEW_LINE + start) + end; +} + +/* + * Expose `markdownTable`. + */ + +module.exports = markdownTable; diff --git a/tools/eslint/node_modules/markdown-table/package.json b/tools/eslint/node_modules/markdown-table/package.json new file mode 100644 index 00000000000..5572e8ead08 --- /dev/null +++ b/tools/eslint/node_modules/markdown-table/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + { + "raw": "markdown-table@^0.4.0", + "scope": null, + "escapedName": "markdown-table", + "name": "markdown-table", + "rawSpec": "^0.4.0", + "spec": ">=0.4.0 <0.5.0", + "type": "range" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\remark-stringify" + ] + ], + "_from": "markdown-table@>=0.4.0 <0.5.0", + "_id": "markdown-table@0.4.0", + "_inCache": true, + "_location": "/markdown-table", + "_nodeVersion": "1.6.3", + "_npmUser": { + "name": "wooorm", + "email": "tituswormer@gmail.com" + }, + "_npmVersion": "2.7.4", + "_phantomChildren": {}, + "_requested": { + "raw": "markdown-table@^0.4.0", + "scope": null, + "escapedName": "markdown-table", + "name": "markdown-table", + "rawSpec": "^0.4.0", + "spec": ">=0.4.0 <0.5.0", + "type": "range" + }, + "_requiredBy": [ + "/remark-stringify" + ], + "_resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-0.4.0.tgz", + "_shasum": "890c2c1b3bfe83fb00e4129b8e4cfe645270f9d1", + "_shrinkwrap": null, + "_spec": "markdown-table@^0.4.0", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\remark-stringify", + "author": { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com" + }, + "bugs": { + "url": "https://github.com/wooorm/markdown-table/issues" + }, + "dependencies": {}, + "description": "Markdown/ASCII tables", + "devDependencies": { + "chalk": "^1.0.0", + "eslint": "^0.18.0", + "istanbul": "^0.3.0", + "jscs": "^1.0.0", + "jscs-jsdoc": "^0.4.0", + "mocha": "^2.0.0" + }, + "directories": {}, + "dist": { + "shasum": "890c2c1b3bfe83fb00e4129b8e4cfe645270f9d1", + "tarball": "https://registry.npmjs.org/markdown-table/-/markdown-table-0.4.0.tgz" + }, + "gitHead": "500964b100c0261c8f731bbb9c3617a624b5b255", + "homepage": "https://github.com/wooorm/markdown-table", + "keywords": [ + "text", + "markdown", + "table", + "align", + "ascii", + "rows", + "tabular" + ], + "license": "MIT", + "maintainers": [ + { + "name": "wooorm", + "email": "tituswormer@gmail.com" + } + ], + "name": "markdown-table", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/wooorm/markdown-table.git" + }, + "scripts": { + "lint": "npm run lint-api && npm run lint-test && npm run lint-style", + "lint-api": "eslint index.js", + "lint-style": "jscs --reporter inline index.js test.js", + "lint-test": "eslint --env mocha test.js", + "make": "npm run lint && npm run test-coverage", + "test": "npm run test-api", + "test-api": "_mocha --check-leaks test.js", + "test-coverage": "istanbul cover _mocha -- -- test.js", + "test-coveralls": "istanbul cover _mocha --report lcovonly -- --check-leaks test.js", + "test-travis": "npm run test-coveralls" + }, + "version": "0.4.0" +} diff --git a/tools/eslint/node_modules/parse-entities/LICENSE b/tools/eslint/node_modules/parse-entities/LICENSE new file mode 100644 index 00000000000..611b67581bb --- /dev/null +++ b/tools/eslint/node_modules/parse-entities/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2015 Titus Wormer + +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. diff --git a/tools/eslint/node_modules/parse-entities/history.md b/tools/eslint/node_modules/parse-entities/history.md new file mode 100644 index 00000000000..135fe1e0969 --- /dev/null +++ b/tools/eslint/node_modules/parse-entities/history.md @@ -0,0 +1,23 @@ + + + + +1.1.0 / 2016-07-31 +================== + +* Add new `nonTerminated` setting ([`eed693c`](https://github.com/wooorm/parse-entities/commit/eed693c)) + +1.0.2 / 2015-12-29 +================== + +* Fix legacy entity support ([7bf652a](https://github.com/wooorm/parse-entities/commit/7bf652a)) + +1.0.1 / 2015-12-27 +================== + +* Update mdast to remark ([8b158ad](https://github.com/wooorm/parse-entities/commit/8b158ad)) +* Fix escaping in `readme.md` ([c743fa2](https://github.com/wooorm/parse-entities/commit/c743fa2)) +* Fix missing dependencies in `component.json` ([cbdd3da](https://github.com/wooorm/parse-entities/commit/cbdd3da)) + +1.0.0 / 2015-12-23 +================== diff --git a/tools/eslint/node_modules/parse-entities/index.js b/tools/eslint/node_modules/parse-entities/index.js new file mode 100644 index 00000000000..81068534334 --- /dev/null +++ b/tools/eslint/node_modules/parse-entities/index.js @@ -0,0 +1,519 @@ +/** + * @author Titus Wormer + * @copyright 2015 Titus Wormer + * @license MIT + * @module parse-entities + * @fileoverview Parse HTML character references: fast, spec-compliant, + * positional information. + */ + +'use strict'; + +/* Dependencies. */ +var has = require('has'); +var characterEntities = require('character-entities'); +var legacy = require('character-entities-legacy'); +var invalid = require('character-reference-invalid'); +var decimal = require('is-decimal'); +var hexadecimal = require('is-hexadecimal'); +var alphanumerical = require('is-alphanumerical'); + +/* Expose. */ +module.exports = wrapper; + +/* Methods. */ +var fromCharCode = String.fromCharCode; +var noop = Function.prototype; + +/* Characters. */ +var REPLACEMENT = '\uFFFD'; +var FORM_FEED = '\f'; +var AMPERSAND = '&'; +var OCTOTHORP = '#'; +var SEMICOLON = ';'; +var NEWLINE = '\n'; +var X_LOWER = 'x'; +var X_UPPER = 'X'; +var SPACE = ' '; +var LESS_THAN = '<'; +var EQUAL = '='; +var EMPTY = ''; +var TAB = '\t'; + +/* Default settings. */ +var defaults = { + warning: null, + reference: null, + text: null, + warningContext: null, + referenceContext: null, + textContext: null, + position: {}, + additional: null, + attribute: false, + nonTerminated: true +}; + +/* Reference types. */ +var NAMED = 'named'; +var HEXADECIMAL = 'hexadecimal'; +var DECIMAL = 'decimal'; + +/* Map of bases. */ +var BASE = {}; + +BASE[HEXADECIMAL] = 16; +BASE[DECIMAL] = 10; + +/* Map of types to tests. Each type of character reference + * accepts different characters. This test is used to + * detect whether a reference has ended (as the semicolon + * is not strictly needed). */ +var TESTS = {}; + +TESTS[NAMED] = alphanumerical; +TESTS[DECIMAL] = decimal; +TESTS[HEXADECIMAL] = hexadecimal; + +/* Warning messages. */ +var NAMED_NOT_TERMINATED = 1; +var NUMERIC_NOT_TERMINATED = 2; +var NAMED_EMPTY = 3; +var NUMERIC_EMPTY = 4; +var NAMED_UNKNOWN = 5; +var NUMERIC_DISALLOWED = 6; +var NUMERIC_PROHIBITED = 7; + +var NUMERIC_REFERENCE = 'Numeric character references'; +var NAMED_REFERENCE = 'Named character references'; +var TERMINATED = ' must be terminated by a semicolon'; +var VOID = ' cannot be empty'; + +var MESSAGES = {}; + +MESSAGES[NAMED_NOT_TERMINATED] = NAMED_REFERENCE + TERMINATED; +MESSAGES[NUMERIC_NOT_TERMINATED] = NUMERIC_REFERENCE + TERMINATED; +MESSAGES[NAMED_EMPTY] = NAMED_REFERENCE + VOID; +MESSAGES[NUMERIC_EMPTY] = NUMERIC_REFERENCE + VOID; +MESSAGES[NAMED_UNKNOWN] = NAMED_REFERENCE + ' must be known'; +MESSAGES[NUMERIC_DISALLOWED] = NUMERIC_REFERENCE + ' cannot be disallowed'; +MESSAGES[NUMERIC_PROHIBITED] = NUMERIC_REFERENCE + ' cannot be outside the ' + + 'permissible Unicode range'; + +/** + * Wrap to ensure clean parameters are given to `parse`. + * + * @param {string} value - Value with entities. + * @param {Object?} [options] - Configuration. + */ +function wrapper(value, options) { + var settings = {}; + var key; + + if (!options) { + options = {}; + } + + for (key in defaults) { + settings[key] = options[key] == null ? defaults[key] : options[key]; + } + + if (settings.position.indent || settings.position.start) { + settings.indent = settings.position.indent || []; + settings.position = settings.position.start; + } + + return parse(value, settings); +} + +/** + * Parse entities. + * + * @param {string} value - Value to tokenise. + * @param {Object?} [settings] - Configuration. + */ +function parse(value, settings) { + var additional = settings.additional; + var nonTerminated = settings.nonTerminated; + var handleText = settings.text; + var handleReference = settings.reference; + var handleWarning = settings.warning; + var textContext = settings.textContext; + var referenceContext = settings.referenceContext; + var warningContext = settings.warningContext; + var pos = settings.position; + var indent = settings.indent || []; + var length = value.length; + var index = 0; + var lines = -1; + var column = pos.column || 1; + var line = pos.line || 1; + var queue = EMPTY; + var result = []; + var entityCharacters; + var terminated; + var characters; + var character; + var reference; + var following; + var warning; + var reason; + var output; + var entity; + var begin; + var start; + var type; + var test; + var prev; + var next; + var diff; + var end; + + /* Cache the current point. */ + prev = now(); + + /* Wrap `handleWarning`. */ + warning = handleWarning ? parseError : noop; + + /* Ensure the algorithm walks over the first character + * and the end (inclusive). */ + index--; + length++; + + while (++index < length) { + /* If the previous character was a newline. */ + if (character === NEWLINE) { + column = indent[lines] || 1; + } + + character = at(index); + + /* Handle anything other than an ampersand, + * including newlines and EOF. */ + if (character !== AMPERSAND) { + if (character === NEWLINE) { + line++; + lines++; + column = 0; + } + + if (character) { + queue += character; + column++; + } else { + flush(); + } + } else { + following = at(index + 1); + + /* The behaviour depends on the identity of the next + * character. */ + if ( + following === TAB || + following === NEWLINE || + following === FORM_FEED || + following === SPACE || + following === LESS_THAN || + following === AMPERSAND || + following === EMPTY || + (additional && following === additional) + ) { + /* Not a character reference. No characters + * are consumed, and nothing is returned. + * This is not an error, either. */ + queue += character; + column++; + + continue; + } + + start = begin = end = index + 1; + + /* Numerical entity. */ + if (following !== OCTOTHORP) { + type = NAMED; + } else { + end = ++begin; + + /* The behaviour further depends on the + * character after the U+0023 NUMBER SIGN. */ + following = at(end); + + if (following === X_LOWER || following === X_UPPER) { + /* ASCII hex digits. */ + type = HEXADECIMAL; + end = ++begin; + } else { + /* ASCII digits. */ + type = DECIMAL; + } + } + + entityCharacters = entity = characters = EMPTY; + test = TESTS[type]; + end--; + + while (++end < length) { + following = at(end); + + if (!test(following)) { + break; + } + + characters += following; + + /* Check if we can match a legacy named + * reference. If so, we cache that as the + * last viable named reference. This + * ensures we do not need to walk backwards + * later. */ + if (type === NAMED && has(legacy, characters)) { + entityCharacters = characters; + entity = legacy[characters]; + } + } + + terminated = at(end) === SEMICOLON; + + if (terminated) { + end++; + + if (type === NAMED && has(characterEntities, characters)) { + entityCharacters = characters; + entity = characterEntities[characters]; + } + } + + diff = 1 + end - start; + + if (!terminated && !nonTerminated) { + /* Empty. */ + } else if (!characters) { + /* An empty (possible) entity is valid, unless + * its numeric (thus an ampersand followed by + * an octothorp). */ + if (type !== NAMED) { + warning(NUMERIC_EMPTY, diff); + } + } else if (type === NAMED) { + /* An ampersand followed by anything + * unknown, and not terminated, is invalid. */ + if (terminated && !entity) { + warning(NAMED_UNKNOWN, 1); + } else { + /* If theres something after an entity + * name which is not known, cap the + * reference. */ + if (entityCharacters !== characters) { + end = begin + entityCharacters.length; + diff = 1 + end - begin; + terminated = false; + } + + /* If the reference is not terminated, + * warn. */ + if (!terminated) { + reason = entityCharacters ? + NAMED_NOT_TERMINATED : + NAMED_EMPTY; + + if (!settings.attribute) { + warning(reason, diff); + } else { + following = at(end); + + if (following === EQUAL) { + warning(reason, diff); + entity = null; + } else if (alphanumerical(following)) { + entity = null; + } else { + warning(reason, diff); + } + } + } + } + + reference = entity; + } else { + if (!terminated) { + /* All non-terminated numeric entities are + * not rendered, and trigger a warning. */ + warning(NUMERIC_NOT_TERMINATED, diff); + } + + /* When terminated and number, parse as + * either hexadecimal or decimal. */ + reference = parseInt(characters, BASE[type]); + + /* Trigger a warning when the parsed number + * is prohibited, and replace with + * replacement character. */ + if (isProhibited(reference)) { + warning(NUMERIC_PROHIBITED, diff); + + reference = REPLACEMENT; + } else if (reference in invalid) { + /* Trigger a warning when the parsed number + * is disallowed, and replace by an + * alternative. */ + warning(NUMERIC_DISALLOWED, diff); + + reference = invalid[reference]; + } else { + /* Parse the number. */ + output = EMPTY; + + /* Trigger a warning when the parsed + * number should not be used. */ + if (isWarning(reference)) { + warning(NUMERIC_DISALLOWED, diff); + } + + /* Stringify the number. */ + if (reference > 0xFFFF) { + reference -= 0x10000; + output += fromCharCode((reference >>> (10 & 0x3FF)) | 0xD800); + reference = 0xDC00 | (reference & 0x3FF); + } + + reference = output + fromCharCode(reference); + } + } + + /* If we could not find a reference, queue the + * checked characters (as normal characters), + * and move the pointer to their end. This is + * possible because we can be certain neither + * newlines nor ampersands are included. */ + if (!reference) { + characters = value.slice(start - 1, end); + queue += characters; + column += characters.length; + index = end - 1; + } else { + /* Found it! First eat the queued + * characters as normal text, then eat + * an entity. */ + flush(); + + prev = now(); + index = end - 1; + column += end - start + 1; + result.push(reference); + next = now(); + next.offset++; + + if (handleReference) { + handleReference.call(referenceContext, reference, { + start: prev, + end: next + }, value.slice(start - 1, end)); + } + + prev = next; + } + } + } + + /* Return the reduced nodes, and any possible warnings. */ + return result.join(EMPTY); + + /** + * Get current position. + * + * @return {Object} - Positional information of a + * single point. + */ + function now() { + return { + line: line, + column: column, + offset: index + (pos.offset || 0) + }; + } + + /** + * “Throw” a parse-error: a warning. + * + * @param {number} code - Identifier of reason for + * failing. + * @param {number} offset - Offset in characters from + * the current position point at which the + * parse-error ocurred, cannot point past newlines. + */ + function parseError(code, offset) { + var position = now(); + + position.column += offset; + position.offset += offset; + + handleWarning.call(warningContext, MESSAGES[code], position, code); + } + + /** + * Get character at position. + * + * @param {number} position - Indice of character in `value`. + * @return {string} - Character at `position` in + * `value`. + */ + function at(position) { + return value.charAt(position); + } + + /** + * Flush `queue` (normal text). Macro invoked before + * each entity and at the end of `value`. + * + * Does nothing when `queue` is empty. + */ + function flush() { + if (queue) { + result.push(queue); + + if (handleText) { + handleText.call(textContext, queue, { + start: prev, + end: now() + }); + } + + queue = EMPTY; + } + } +} + +/** + * Check whether `character` is outside the permissible + * unicode range. + * + * @param {number} code - Value. + * @return {boolean} - Whether `character` is an + * outside the permissible unicode range. + */ +function isProhibited(code) { + return (code >= 0xD800 && code <= 0xDFFF) || (code > 0x10FFFF); +} + +/** + * Check whether `character` is disallowed. + * + * @param {number} code - Value. + * @return {boolean} - Whether `character` is disallowed. + */ +function isWarning(code) { + if ( + (code >= 0x0001 && code <= 0x0008) || + code === 0x000B || + (code >= 0x000D && code <= 0x001F) || + (code >= 0x007F && code <= 0x009F) || + (code >= 0xFDD0 && code <= 0xFDEF) || + (code & 0xFFFF) === 0xFFFF || + (code & 0xFFFF) === 0xFFFE + ) { + return true; + } + + return false; +} diff --git a/tools/eslint/node_modules/parse-entities/package.json b/tools/eslint/node_modules/parse-entities/package.json new file mode 100644 index 00000000000..300f098f86d --- /dev/null +++ b/tools/eslint/node_modules/parse-entities/package.json @@ -0,0 +1,167 @@ +{ + "_args": [ + [ + { + "raw": "parse-entities@^1.0.2", + "scope": null, + "escapedName": "parse-entities", + "name": "parse-entities", + "rawSpec": "^1.0.2", + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, + "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\remark-parse" + ] + ], + "_from": "parse-entities@>=1.0.2 <2.0.0", + "_id": "parse-entities@1.1.0", + "_inCache": true, + "_location": "/parse-entities", + "_nodeVersion": "5.0.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/parse-entities-1.1.0.tgz_1469964484071_0.15948437829501927" + }, + "_npmUser": { + "name": "wooorm", + "email": "tituswormer@gmail.com" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "raw": "parse-entities@^1.0.2", + "scope": null, + "escapedName": "parse-entities", + "name": "parse-entities", + "rawSpec": "^1.0.2", + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/remark-parse", + "/remark-stringify" + ], + "_resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.1.0.tgz", + "_shasum": "4bc58f35fdc8e65dded35a12f2e40223ca24a3f7", + "_shrinkwrap": null, + "_spec": "parse-entities@^1.0.2", + "_where": "j:\\temp\\_git\\node-fork\\tools\\eslint\\node_modules\\remark-parse", + "author": { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + }, + "bugs": { + "url": "https://github.com/wooorm/parse-entities/issues" + }, + "contributors": [ + { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + } + ], + "dependencies": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "has": "^1.0.1", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + }, + "description": "Parse HTML character references: fast, spec-compliant, positional information", + "devDependencies": { + "browserify": "^13.0.0", + "esmangle": "^1.0.0", + "nyc": "^7.1.0", + "remark-cli": "^1.0.0", + "remark-comment-config": "^4.0.0", + "remark-github": "^5.0.0", + "remark-lint": "^4.0.0", + "remark-validate-links": "^4.0.0", + "tape": "^4.2.0", + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "4bc58f35fdc8e65dded35a12f2e40223ca24a3f7", + "tarball": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.1.0.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "5ff1136a4921a216e7baaefa23febb40d68b4712", + "homepage": "https://github.com/wooorm/parse-entities#readme", + "keywords": [ + "parse", + "html", + "character", + "reference", + "entity", + "entities" + ], + "license": "MIT", + "maintainers": [ + { + "name": "wooorm", + "email": "tituswormer@gmail.com" + } + ], + "name": "parse-entities", + "nyc": { + "check-coverage": true, + "lines": 100, + "functions": 100, + "branches": 100 + }, + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "remarkConfig": { + "output": true, + "plugins": { + "lint": { + "heading-increment": false, + "list-item-spacing": false, + "no-duplicate-headings": false + }, + "github": null, + "comment-config": null, + "validate-links": null + }, + "settings": { + "bullet": "*" + } + }, + "repository": { + "type": "git", + "url": "git+https://github.com/wooorm/parse-entities.git" + }, + "scripts": { + "build": "npm run build-md && npm run build-bundle && npm run build-mangle", + "build-bundle": "browserify index.js --bare -s parseEntities > parse-entities.js", + "build-mangle": "esmangle parse-entities.js > parse-entities.min.js", + "build-md": "remark . --quiet --frail", + "lint": "xo", + "test": "npm run build && npm run lint && npm run test-coverage", + "test-api": "node test.js", + "test-coverage": "nyc --reporter lcov tape test.js" + }, + "version": "1.1.0", + "xo": { + "space": true, + "rules": { + "guard-for-in": "off", + "no-negated-condition": "off", + "max-depth": "off", + "max-lines": "off", + "complexity": "off", + "no-eq-null": "off", + "eqeqeq": "off" + }, + "ignores": [ + "parse-entities.js", + "parse-entities.min.js" + ] + } +} diff --git a/tools/eslint/node_modules/parse-entities/readme.md b/tools/eslint/node_modules/parse-entities/readme.md new file mode 100644 index 00000000000..f966d75a493 --- /dev/null +++ b/tools/eslint/node_modules/parse-entities/readme.md @@ -0,0 +1,157 @@ +# parse-entities [![Build Status][build-badge]][build-status] [![Coverage Status][coverage-badge]][coverage-status] + +Parse HTML character references: fast, spec-compliant, positional +information. + +## Installation + +[npm][]: + +```bash +npm install parse-entities +``` + +## Usage + +```js +var decode = require('parse-entities'); + +decode('alpha & bravo'); +// alpha & bravo + +decode('charlie ©cat; delta'); +// charlie ©cat; delta + +decode('echo © foxtrot ≠ golf 𝌆 hotel'); +// echo © foxtrot ≠ golf 𝌆 hotel +``` + +## API + +## `parseEntities(value[, options])` + +###### `options` + +* `additional` (`string`, optional, default: `''`) + — Additional character to accept when following an ampersand (without + error); +* `attribute` (`boolean`, optional, default: `false`) + — Whether to parse `value` as an attribute value; +* `nonTerminated` (`boolean`, default: `true`) + — Whether to allow non-terminated entities, such as `©cat` to + `©cat`. This behaviour is spec-compliant but can lead to unexpected + results; +* `warning` ([`Function`][warning], optional) + — Error handler; +* `text` ([`Function`][text], optional) + — Text handler; +* `reference` ([`Function`][reference], + optional) — Reference handler; +* `warningContext` (`'*'`, optional) + — Context used when invoking `warning`; +* `textContext` (`'*'`, optional) + — Context used when invoking `text`; +* `referenceContext` (`'*'`, optional) + — Context used when invoking `reference`; +* `position` (`Location` or `Position`, optional) + — Starting `position` of `value`, useful when dealing with values + nested in some sort of syntax tree. The default is: + + ```json + { + "start": { + "line": 1, + "column": 1, + "offset": 0 + }, + "indent": [] + } + ``` + +###### Returns + +`string` — Decoded `value`. + +### `function warning(reason, position, code)` + +Error handler. + +###### Context + +`this` refers to `warningContext` when given to `parseEntities`. + +###### Parameters + +* `reason` (`string`) + — Reason (human-readable) for triggering a parse error; +* `position` (`Position`) + — Place at which the parse error occurred; +* `code` (`number`) + — Identifier of reason for triggering a parse error. + +The following codes are used: + +| Code | Example | Note | +| ---- | ------------------ | --------------------------------------------- | +| `1` | `foo & bar` | Missing semicolon (named) | +| `2` | `foo { bar` | Missing semicolon (numeric) | +| `3` | `Foo &bar baz` | Ampersand did not start a reference | +| `4` | `Foo &#` | Empty reference | +| `5` | `Foo &bar; baz` | Unknown entity | +| `6` | `Foo € baz` | [Disallowed reference][invalid] | +| `7` | `Foo � baz` | Prohibited: outside permissible unicode range | + +###### `function text(value, location)` + +Text handler. + +###### Context + +`this` refers to `textContext` when given to `parseEntities`. + +###### Parameters + +* `value` (`string`) — String of content; +* `location` (`Location`) — Location at which `value` starts and ends. + +### `function reference(value, location, source)` + +Character reference handler. + +###### Context + +`this` refers to `referenceContext` when given to `parseEntities`. + +###### Parameters + +* `value` (`string`) — Encoded character reference; +* `location` (`Location`) — Location at which `value` starts and ends; +* `source` (`Location`) — Source of character reference. + +## License + +[MIT][license] © [Titus Wormer][author] + + + +[build-badge]: https://img.shields.io/travis/wooorm/parse-entities.svg + +[build-status]: https://travis-ci.org/wooorm/parse-entities + +[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/parse-entities.svg + +[coverage-status]: https://codecov.io/github/wooorm/parse-entities + +[npm]: https://docs.npmjs.com/cli/install + +[license]: LICENSE + +[author]: http://wooorm.com + +[warning]: #function-warningreason-position-code + +[text]: #function-textvalue-location + +[reference]: #function-referencevalue-location-source + +[invalid]: https://github.com/wooorm/character-reference-invalid diff --git a/tools/eslint/node_modules/parse5/LICENSE b/tools/eslint/node_modules/parse5/LICENSE new file mode 100644 index 00000000000..120d532f4af --- /dev/null +++ b/tools/eslint/node_modules/parse5/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013-2016 Ivan Nikulin (ifaaan@gmail.com, https://github.com/inikulin) + +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. diff --git a/tools/eslint/node_modules/parse5/README.md b/tools/eslint/node_modules/parse5/README.md new file mode 100644 index 00000000000..7b36f893369 --- /dev/null +++ b/tools/eslint/node_modules/parse5/README.md @@ -0,0 +1,40 @@ +

+ + parse5 + +

+ +

+WHATWG HTML5 specification-compliant, fast and ready for production HTML parsing/serialization toolset for Node.js +

+ +

+ Build Status + NPM Version + Downloads + Downloads total +

+ +

+parse5 provides nearly everything you may need when dealing with HTML. It's the fastest spec-compliant HTML parser +for Node to date. It parses HTML the way the latest version of your browser does. It has proven itself reliable in such projects +as jsdom, Angular2, Polymer and many more. +

+ +---- + +

+ Documentation +

+ +

+ Version history +

+ +

+ Online playground +

+ +

+ Issue tracker +

diff --git a/tools/eslint/node_modules/parse5/lib/common/doctype.js b/tools/eslint/node_modules/parse5/lib/common/doctype.js new file mode 100644 index 00000000000..2c6927a873a --- /dev/null +++ b/tools/eslint/node_modules/parse5/lib/common/doctype.js @@ -0,0 +1,137 @@ +'use strict'; + +//Const +var VALID_DOCTYPE_NAME = 'html', + QUIRKS_MODE_SYSTEM_ID = 'http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd', + QUIRKS_MODE_PUBLIC_ID_PREFIXES = [ + '+//silmaril//dtd html pro v0r11 19970101//en', + '-//advasoft ltd//dtd html 3.0 aswedit + extensions//en', + '-//as//dtd html 3.0 aswedit + extensions//en', + '-//ietf//dtd html 2.0 level 1//en', + '-//ietf//dtd html 2.0 level 2//en', + '-//ietf//dtd html 2.0 strict level 1//en', + '-//ietf//dtd html 2.0 strict level 2//en', + '-//ietf//dtd html 2.0 strict//en', + '-//ietf//dtd html 2.0//en', + '-//ietf//dtd html 2.1e//en', + '-//ietf//dtd html 3.0//en', + '-//ietf//dtd html 3.0//en//', + '-//ietf//dtd html 3.2 final//en', + '-//ietf//dtd html 3.2//en', + '-//ietf//dtd html 3//en', + '-//ietf//dtd html level 0//en', + '-//ietf//dtd html level 0//en//2.0', + '-//ietf//dtd html level 1//en', + '-//ietf//dtd html level 1//en//2.0', + '-//ietf//dtd html level 2//en', + '-//ietf//dtd html level 2//en//2.0', + '-//ietf//dtd html level 3//en', + '-//ietf//dtd html level 3//en//3.0', + '-//ietf//dtd html strict level 0//en', + '-//ietf//dtd html strict level 0//en//2.0', + '-//ietf//dtd html strict level 1//en', + '-//ietf//dtd html strict level 1//en//2.0', + '-//ietf//dtd html strict level 2//en', + '-//ietf//dtd html strict level 2//en//2.0', + '-//ietf//dtd html strict level 3//en', + '-//ietf//dtd html strict level 3//en//3.0', + '-//ietf//dtd html strict//en', + '-//ietf//dtd html strict//en//2.0', + '-//ietf//dtd html strict//en//3.0', + '-//ietf//dtd html//en', + '-//ietf//dtd html//en//2.0', + '-//ietf//dtd html//en//3.0', + '-//metrius//dtd metrius presentational//en', + '-//microsoft//dtd internet explorer 2.0 html strict//en', + '-//microsoft//dtd internet explorer 2.0 html//en', + '-//microsoft//dtd internet explorer 2.0 tables//en', + '-//microsoft//dtd internet explorer 3.0 html strict//en', + '-//microsoft//dtd internet explorer 3.0 html//en', + '-//microsoft//dtd internet explorer 3.0 tables//en', + '-//netscape comm. corp.//dtd html//en', + '-//netscape comm. corp.//dtd strict html//en', + '-//o\'reilly and associates//dtd html 2.0//en', + '-//o\'reilly and associates//dtd html extended 1.0//en', + '-//spyglass//dtd html 2.0 extended//en', + '-//sq//dtd html 2.0 hotmetal + extensions//en', + '-//sun microsystems corp.//dtd hotjava html//en', + '-//sun microsystems corp.//dtd hotjava strict html//en', + '-//w3c//dtd html 3 1995-03-24//en', + '-//w3c//dtd html 3.2 draft//en', + '-//w3c//dtd html 3.2 final//en', + '-//w3c//dtd html 3.2//en', + '-//w3c//dtd html 3.2s draft//en', + '-//w3c//dtd html 4.0 frameset//en', + '-//w3c//dtd html 4.0 transitional//en', + '-//w3c//dtd html experimental 19960712//en', + '-//w3c//dtd html experimental 970421//en', + '-//w3c//dtd w3 html//en', + '-//w3o//dtd w3 html 3.0//en', + '-//w3o//dtd w3 html 3.0//en//', + '-//webtechs//dtd mozilla html 2.0//en', + '-//webtechs//dtd mozilla html//en' + ], + QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = [ + '-//w3c//dtd html 4.01 frameset//', + '-//w3c//dtd html 4.01 transitional//' + ], + QUIRKS_MODE_PUBLIC_IDS = [ + '-//w3o//dtd w3 html strict 3.0//en//', + '-/w3c/dtd html 4.0 transitional/en', + 'html' + ]; + + +//Utils +function enquoteDoctypeId(id) { + var quote = id.indexOf('"') !== -1 ? '\'' : '"'; + + return quote + id + quote; +} + + +//API +exports.isQuirks = function (name, publicId, systemId) { + if (name !== VALID_DOCTYPE_NAME) + return true; + + if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) + return true; + + if (publicId !== null) { + publicId = publicId.toLowerCase(); + + if (QUIRKS_MODE_PUBLIC_IDS.indexOf(publicId) > -1) + return true; + + var prefixes = QUIRKS_MODE_PUBLIC_ID_PREFIXES; + + if (systemId === null) + prefixes = prefixes.concat(QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES); + + for (var i = 0; i < prefixes.length; i++) { + if (publicId.indexOf(prefixes[i]) === 0) + return true; + } + } + + return false; +}; + +exports.serializeContent = function (name, publicId, systemId) { + var str = '!DOCTYPE '; + + if (name) + str += name; + + if (publicId !== null) + str += ' PUBLIC ' + enquoteDoctypeId(publicId); + + else if (systemId !== null) + str += ' SYSTEM'; + + if (systemId !== null) + str += ' ' + enquoteDoctypeId(systemId); + + return str; +}; diff --git a/tools/eslint/node_modules/parse5/lib/common/foreign_content.js b/tools/eslint/node_modules/parse5/lib/common/foreign_content.js new file mode 100644 index 00000000000..4dedbbffce6 --- /dev/null +++ b/tools/eslint/node_modules/parse5/lib/common/foreign_content.js @@ -0,0 +1,260 @@ +'use strict'; + +var Tokenizer = require('../tokenizer'), + HTML = require('./html'); + +//Aliases +var $ = HTML.TAG_NAMES, + NS = HTML.NAMESPACES, + ATTRS = HTML.ATTRS; + + +//MIME types +var MIME_TYPES = { + TEXT_HTML: 'text/html', + APPLICATION_XML: 'application/xhtml+xml' +}; + +//Attributes +var DEFINITION_URL_ATTR = 'definitionurl', + ADJUSTED_DEFINITION_URL_ATTR = 'definitionURL', + SVG_ATTRS_ADJUSTMENT_MAP = { + 'attributename': 'attributeName', + 'attributetype': 'attributeType', + 'basefrequency': 'baseFrequency', + 'baseprofile': 'baseProfile', + 'calcmode': 'calcMode', + 'clippathunits': 'clipPathUnits', + 'diffuseconstant': 'diffuseConstant', + 'edgemode': 'edgeMode', + 'filterunits': 'filterUnits', + 'glyphref': 'glyphRef', + 'gradienttransform': 'gradientTransform', + 'gradientunits': 'gradientUnits', + 'kernelmatrix': 'kernelMatrix', + 'kernelunitlength': 'kernelUnitLength', + 'keypoints': 'keyPoints', + 'keysplines': 'keySplines', + 'keytimes': 'keyTimes', + 'lengthadjust': 'lengthAdjust', + 'limitingconeangle': 'limitingConeAngle', + 'markerheight': 'markerHeight', + 'markerunits': 'markerUnits', + 'markerwidth': 'markerWidth', + 'maskcontentunits': 'maskContentUnits', + 'maskunits': 'maskUnits', + 'numoctaves': 'numOctaves', + 'pathlength': 'pathLength', + 'patterncontentunits': 'patternContentUnits', + 'patterntransform': 'patternTransform', + 'patternunits': 'patternUnits', + 'pointsatx': 'pointsAtX', + 'pointsaty': 'pointsAtY', + 'pointsatz': 'pointsAtZ', + 'preservealpha': 'preserveAlpha', + 'preserveaspectratio': 'preserveAspectRatio', + 'primitiveunits': 'primitiveUnits', + 'refx': 'refX', + 'refy': 'refY', + 'repeatcount': 'repeatCount', + 'repeatdur': 'repeatDur', + 'requiredextensions': 'requiredExtensions', + 'requiredfeatures': 'requiredFeatures', + 'specularconstant': 'specularConstant', + 'specularexponent': 'specularExponent', + 'spreadmethod': 'spreadMethod', + 'startoffset': 'startOffset', + 'stddeviation': 'stdDeviation', + 'stitchtiles': 'stitchTiles', + 'surfacescale': 'surfaceScale', + 'systemlanguage': 'systemLanguage', + 'tablevalues': 'tableValues', + 'targetx': 'targetX', + 'targety': 'targetY', + 'textlength': 'textLength', + 'viewbox': 'viewBox', + 'viewtarget': 'viewTarget', + 'xchannelselector': 'xChannelSelector', + 'ychannelselector': 'yChannelSelector', + 'zoomandpan': 'zoomAndPan' + }, + XML_ATTRS_ADJUSTMENT_MAP = { + 'xlink:actuate': {prefix: 'xlink', name: 'actuate', namespace: NS.XLINK}, + 'xlink:arcrole': {prefix: 'xlink', name: 'arcrole', namespace: NS.XLINK}, + 'xlink:href': {prefix: 'xlink', name: 'href', namespace: NS.XLINK}, + 'xlink:role': {prefix: 'xlink', name: 'role', namespace: NS.XLINK}, + 'xlink:show': {prefix: 'xlink', name: 'show', namespace: NS.XLINK}, + 'xlink:title': {prefix: 'xlink', name: 'title', namespace: NS.XLINK}, + 'xlink:type': {prefix: 'xlink', name: 'type', namespace: NS.XLINK}, + 'xml:base': {prefix: 'xml', name: 'base', namespace: NS.XML}, + 'xml:lang': {prefix: 'xml', name: 'lang', namespace: NS.XML}, + 'xml:space': {prefix: 'xml', name: 'space', namespace: NS.XML}, + 'xmlns': {prefix: '', name: 'xmlns', namespace: NS.XMLNS}, + 'xmlns:xlink': {prefix: 'xmlns', name: 'xlink', namespace: NS.XMLNS} + + }; + +//SVG tag names adjustment map +var SVG_TAG_NAMES_ADJUSTMENT_MAP = exports.SVG_TAG_NAMES_ADJUSTMENT_MAP = { + 'altglyph': 'altGlyph', + 'altglyphdef': 'altGlyphDef', + 'altglyphitem': 'altGlyphItem', + 'animatecolor': 'animateColor', + 'animatemotion': 'animateMotion', + 'animatetransform': 'animateTransform', + 'clippath': 'clipPath', + 'feblend': 'feBlend', + 'fecolormatrix': 'feColorMatrix', + 'fecomponenttransfer': 'feComponentTransfer', + 'fecomposite': 'feComposite', + 'feconvolvematrix': 'feConvolveMatrix', + 'fediffuselighting': 'feDiffuseLighting', + 'fedisplacementmap': 'feDisplacementMap', + 'fedistantlight': 'feDistantLight', + 'feflood': 'feFlood', + 'fefunca': 'feFuncA', + 'fefuncb': 'feFuncB', + 'fefuncg': 'feFuncG', + 'fefuncr': 'feFuncR', + 'fegaussianblur': 'feGaussianBlur', + 'feimage': 'feImage', + 'femerge': 'feMerge', + 'femergenode': 'feMergeNode', + 'femorphology': 'feMorphology', + 'feoffset': 'feOffset', + 'fepointlight': 'fePointLight', + 'fespecularlighting': 'feSpecularLighting', + 'fespotlight': 'feSpotLight', + 'fetile': 'feTile', + 'feturbulence': 'feTurbulence', + 'foreignobject': 'foreignObject', + 'glyphref': 'glyphRef', + 'lineargradient': 'linearGradient', + 'radialgradient': 'radialGradient', + 'textpath': 'textPath' +}; + +//Tags that causes exit from foreign content +var EXITS_FOREIGN_CONTENT = {}; + +EXITS_FOREIGN_CONTENT[$.B] = true; +EXITS_FOREIGN_CONTENT[$.BIG] = true; +EXITS_FOREIGN_CONTENT[$.BLOCKQUOTE] = true; +EXITS_FOREIGN_CONTENT[$.BODY] = true; +EXITS_FOREIGN_CONTENT[$.BR] = true; +EXITS_FOREIGN_CONTENT[$.CENTER] = true; +EXITS_FOREIGN_CONTENT[$.CODE] = true; +EXITS_FOREIGN_CONTENT[$.DD] = true; +EXITS_FOREIGN_CONTENT[$.DIV] = true; +EXITS_FOREIGN_CONTENT[$.DL] = true; +EXITS_FOREIGN_CONTENT[$.DT] = true; +EXITS_FOREIGN_CONTENT[$.EM] = true; +EXITS_FOREIGN_CONTENT[$.EMBED] = true; +EXITS_FOREIGN_CONTENT[$.H1] = true; +EXITS_FOREIGN_CONTENT[$.H2] = true; +EXITS_FOREIGN_CONTENT[$.H3] = true; +EXITS_FOREIGN_CONTENT[$.H4] = true; +EXITS_FOREIGN_CONTENT[$.H5] = true; +EXITS_FOREIGN_CONTENT[$.H6] = true; +EXITS_FOREIGN_CONTENT[$.HEAD] = true; +EXITS_FOREIGN_CONTENT[$.HR] = true; +EXITS_FOREIGN_CONTENT[$.I] = true; +EXITS_FOREIGN_CONTENT[$.IMG] = true; +EXITS_FOREIGN_CONTENT[$.LI] = true; +EXITS_FOREIGN_CONTENT[$.LISTING] = true; +EXITS_FOREIGN_CONTENT[$.MENU] = true; +EXITS_FOREIGN_CONTENT[$.META] = true; +EXITS_FOREIGN_CONTENT[$.NOBR] = true; +EXITS_FOREIGN_CONTENT[$.OL] = true; +EXITS_FOREIGN_CONTENT[$.P] = true; +EXITS_FOREIGN_CONTENT[$.PRE] = true; +EXITS_FOREIGN_CONTENT[$.RUBY] = true; +EXITS_FOREIGN_CONTENT[$.S] = true; +EXITS_FOREIGN_CONTENT[$.SMALL] = true; +EXITS_FOREIGN_CONTENT[$.SPAN] = true; +EXITS_FOREIGN_CONTENT[$.STRONG] = true; +EXITS_FOREIGN_CONTENT[$.STRIKE] = true; +EXITS_FOREIGN_CONTENT[$.SUB] = true; +EXITS_FOREIGN_CONTENT[$.SUP] = true; +EXITS_FOREIGN_CONTENT[$.TABLE] = true; +EXITS_FOREIGN_CONTENT[$.TT] = true; +EXITS_FOREIGN_CONTENT[$.U] = true; +EXITS_FOREIGN_CONTENT[$.UL] = true; +EXITS_FOREIGN_CONTENT[$.VAR] = true; + +//Check exit from foreign content +exports.causesExit = function (startTagToken) { + var tn = startTagToken.tagName; + var isFontWithAttrs = tn === $.FONT && (Tokenizer.getTokenAttr(startTagToken, ATTRS.COLOR) !== null || + Tokenizer.getTokenAttr(startTagToken, ATTRS.SIZE) !== null || + Tokenizer.getTokenAttr(startTagToken, ATTRS.FACE) !== null); + + return isFontWithAttrs ? true : EXITS_FOREIGN_CONTENT[tn]; +}; + +//Token adjustments +exports.adjustTokenMathMLAttrs = function (token) { + for (var i = 0; i < token.attrs.length; i++) { + if (token.attrs[i].name === DEFINITION_URL_ATTR) { + token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR; + break; + } + } +}; + +exports.adjustTokenSVGAttrs = function (token) { + for (var i = 0; i < token.attrs.length; i++) { + var adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP[token.attrs[i].name]; + + if (adjustedAttrName) + token.attrs[i].name = adjustedAttrName; + } +}; + +exports.adjustTokenXMLAttrs = function (token) { + for (var i = 0; i < token.attrs.length; i++) { + var adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP[token.attrs[i].name]; + + if (adjustedAttrEntry) { + token.attrs[i].prefix = adjustedAttrEntry.prefix; + token.attrs[i].name = adjustedAttrEntry.name; + token.attrs[i].namespace = adjustedAttrEntry.namespace; + } + } +}; + +exports.adjustTokenSVGTagName = function (token) { + var adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP[token.tagName]; + + if (adjustedTagName) + token.tagName = adjustedTagName; +}; + +//Integration points +function isMathMLTextIntegrationPoint(tn, ns) { + return ns === NS.MATHML && (tn === $.MI || tn === $.MO || tn === $.MN || tn === $.MS || tn === $.MTEXT); +} + +function isHtmlIntegrationPoint(tn, ns, attrs) { + if (ns === NS.MATHML && tn === $.ANNOTATION_XML) { + for (var i = 0; i < attrs.length; i++) { + if (attrs[i].name === ATTRS.ENCODING) { + var value = attrs[i].value.toLowerCase(); + + return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML; + } + } + } + + return ns === NS.SVG && (tn === $.FOREIGN_OBJECT || tn === $.DESC || tn === $.TITLE); +} + +exports.isIntegrationPoint = function (tn, ns, attrs, foreignNS) { + if ((!foreignNS || foreignNS === NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs)) + return true; + + if ((!foreignNS || foreignNS === NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns)) + return true; + + return false; +}; diff --git a/tools/eslint/node_modules/parse5/lib/common/html.js b/tools/eslint/node_modules/parse5/lib/common/html.js new file mode 100644 index 00000000000..d826eaa36da --- /dev/null +++ b/tools/eslint/node_modules/parse5/lib/common/html.js @@ -0,0 +1,266 @@ +'use strict'; + +var NS = exports.NAMESPACES = { + HTML: 'http://www.w3.org/1999/xhtml', + MATHML: 'http://www.w3.org/1998/Math/MathML', + SVG: 'http://www.w3.org/2000/svg', + XLINK: 'http://www.w3.org/1999/xlink', + XML: 'http://www.w3.org/XML/1998/namespace', + XMLNS: 'http://www.w3.org/2000/xmlns/' +}; + +exports.ATTRS = { + TYPE: 'type', + ACTION: 'action', + ENCODING: 'encoding', + PROMPT: 'prompt', + NAME: 'name', + COLOR: 'color', + FACE: 'face', + SIZE: 'size' +}; + +var $ = exports.TAG_NAMES = { + A: 'a', + ADDRESS: 'address', + ANNOTATION_XML: 'annotation-xml', + APPLET: 'applet', + AREA: 'area', + ARTICLE: 'article', + ASIDE: 'aside', + + B: 'b', + BASE: 'base', + BASEFONT: 'basefont', + BGSOUND: 'bgsound', + BIG: 'big', + BLOCKQUOTE: 'blockquote', + BODY: 'body', + BR: 'br', + BUTTON: 'button', + + CAPTION: 'caption', + CENTER: 'center', + CODE: 'code', + COL: 'col', + COLGROUP: 'colgroup', + + DD: 'dd', + DESC: 'desc', + DETAILS: 'details', + DIALOG: 'dialog', + DIR: 'dir', + DIV: 'div', + DL: 'dl', + DT: 'dt', + + EM: 'em', + EMBED: 'embed', + + FIELDSET: 'fieldset', + FIGCAPTION: 'figcaption', + FIGURE: 'figure', + FONT: 'font', + FOOTER: 'footer', + FOREIGN_OBJECT: 'foreignObject', + FORM: 'form', + FRAME: 'frame', + FRAMESET: 'frameset', + + H1: 'h1', + H2: 'h2', + H3: 'h3', + H4: 'h4', + H5: 'h5', + H6: 'h6', + HEAD: 'head', + HEADER: 'header', + HGROUP: 'hgroup', + HR: 'hr', + HTML: 'html', + + I: 'i', + IMG: 'img', + IMAGE: 'image', + INPUT: 'input', + IFRAME: 'iframe', + + KEYGEN: 'keygen', + + LABEL: 'label', + LI: 'li', + LINK: 'link', + LISTING: 'listing', + + MAIN: 'main', + MALIGNMARK: 'malignmark', + MARQUEE: 'marquee', + MATH: 'math', + MENU: 'menu', + MENUITEM: 'menuitem', + META: 'meta', + MGLYPH: 'mglyph', + MI: 'mi', + MO: 'mo', + MN: 'mn', + MS: 'ms', + MTEXT: 'mtext', + + NAV: 'nav', + NOBR: 'nobr', + NOFRAMES: 'noframes', + NOEMBED: 'noembed', + NOSCRIPT: 'noscript', + + OBJECT: 'object', + OL: 'ol', + OPTGROUP: 'optgroup', + OPTION: 'option', + + P: 'p', + PARAM: 'param', + PLAINTEXT: 'plaintext', + PRE: 'pre', + + RB: 'rb', + RP: 'rp', + RT: 'rt', + RTC: 'rtc', + RUBY: 'ruby', + + S: 's', + SCRIPT: 'script', + SECTION: 'section', + SELECT: 'select', + SOURCE: 'source', + SMALL: 'small', + SPAN: 'span', + STRIKE: 'strike', + STRONG: 'strong', + STYLE: 'style', + SUB: 'sub', + SUMMARY: 'summary', + SUP: 'sup', + + TABLE: 'table', + TBODY: 'tbody', + TEMPLATE: 'template', + TEXTAREA: 'textarea', + TFOOT: 'tfoot', + TD: 'td', + TH: 'th', + THEAD: 'thead', + TITLE: 'title', + TR: 'tr', + TRACK: 'track', + TT: 'tt', + + U: 'u', + UL: 'ul', + + SVG: 'svg', + + VAR: 'var', + + WBR: 'wbr', + + XMP: 'xmp' +}; + +var SPECIAL_ELEMENTS = exports.SPECIAL_ELEMENTS = {}; + +SPECIAL_ELEMENTS[NS.HTML] = {}; +SPECIAL_ELEMENTS[NS.HTML][$.ADDRESS] = true; +SPECIAL_ELEMENTS[NS.HTML][$.APPLET] = true; +SPECIAL_ELEMENTS[NS.HTML][$.AREA] = true; +SPECIAL_ELEMENTS[NS.HTML][$.ARTICLE] = true; +SPECIAL_ELEMENTS[NS.HTML][$.ASIDE] = true; +SPECIAL_ELEMENTS[NS.HTML][$.BASE] = true; +SPECIAL_ELEMENTS[NS.HTML][$.BASEFONT] = true; +SPECIAL_ELEMENTS[NS.HTML][$.BGSOUND] = true; +SPECIAL_ELEMENTS[NS.HTML][$.BLOCKQUOTE] = true; +SPECIAL_ELEMENTS[NS.HTML][$.BODY] = true; +SPECIAL_ELEMENTS[NS.HTML][$.BR] = true; +SPECIAL_ELEMENTS[NS.HTML][$.BUTTON] = true; +SPECIAL_ELEMENTS[NS.HTML][$.CAPTION] = true; +SPECIAL_ELEMENTS[NS.HTML][$.CENTER] = true; +SPECIAL_ELEMENTS[NS.HTML][$.COL] = true; +SPECIAL_ELEMENTS[NS.HTML][$.COLGROUP] = true; +SPECIAL_ELEMENTS[NS.HTML][$.DD] = true; +SPECIAL_ELEMENTS[NS.HTML][$.DETAILS] = true; +SPECIAL_ELEMENTS[NS.HTML][$.DIR] = true; +SPECIAL_ELEMENTS[NS.HTML][$.DIV] = true; +SPECIAL_ELEMENTS[NS.HTML][$.DL] = true; +SPECIAL_ELEMENTS[NS.HTML][$.DT] = true; +SPECIAL_ELEMENTS[NS.HTML][$.EMBED] = true; +SPECIAL_ELEMENTS[NS.HTML][$.FIELDSET] = true; +SPECIAL_ELEMENTS[NS.HTML][$.FIGCAPTION] = true; +SPECIAL_ELEMENTS[NS.HTML][$.FIGURE] = true; +SPECIAL_ELEMENTS[NS.HTML][$.FOOTER] = true; +SPECIAL_ELEMENTS[NS.HTML][$.FORM] = true; +SPECIAL_ELEMENTS[NS.HTML][$.FRAME] = true; +SPECIAL_ELEMENTS[NS.HTML][$.FRAMESET] = true; +SPECIAL_ELEMENTS[NS.HTML][$.H1] = true; +SPECIAL_ELEMENTS[NS.HTML][$.H2] = true; +SPECIAL_ELEMENTS[NS.HTML][$.H3] = true; +SPECIAL_ELEMENTS[NS.HTML][$.H4] = true; +SPECIAL_ELEMENTS[NS.HTML][$.H5] = true; +SPECIAL_ELEMENTS[NS.HTML][$.H6] = true; +SPECIAL_ELEMENTS[NS.HTML][$.HEAD] = true; +SPECIAL_ELEMENTS[NS.HTML][$.HEADER] = true; +SPECIAL_ELEMENTS[NS.HTML][$.HGROUP] = true; +SPECIAL_ELEMENTS[NS.HTML][$.HR] = true; +SPECIAL_ELEMENTS[NS.HTML][$.HTML] = true; +SPECIAL_ELEMENTS[NS.HTML][$.IFRAME] = true; +SPECIAL_ELEMENTS[NS.HTML][$.IMG] = true; +SPECIAL_ELEMENTS[NS.HTML][$.INPUT] = true; +SPECIAL_ELEMENTS[NS.HTML][$.LI] = true; +SPECIAL_ELEMENTS[NS.HTML][$.LINK] = true; +SPECIAL_ELEMENTS[NS.HTML][$.LISTING] = true; +SPECIAL_ELEMENTS[NS.HTML][$.MAIN] = true; +SPECIAL_ELEMENTS[NS.HTML][$.MARQUEE] = true; +SPECIAL_ELEMENTS[NS.HTML][$.MENU] = true; +SPECIAL_ELEMENTS[NS.HTML][$.META] = true; +SPECIAL_ELEMENTS[NS.HTML][$.NAV] = true; +SPECIAL_ELEMENTS[NS.HTML][$.NOEMBED] = true; +SPECIAL_ELEMENTS[NS.HTML][$.NOFRAMES] = true; +SPECIAL_ELEMENTS[NS.HTML][$.NOSCRIPT] = true; +SPECIAL_ELEMENTS[NS.HTML][$.OBJECT] = true; +SPECIAL_ELEMENTS[NS.HTML][$.OL] = true; +SPECIAL_ELEMENTS[NS.HTML][$.P] = true; +SPECIAL_ELEMENTS[NS.HTML][$.PARAM] = true; +SPECIAL_ELEMENTS[NS.HTML][$.PLAINTEXT] = true; +SPECIAL_ELEMENTS[NS.HTML][$.PRE] = true; +SPECIAL_ELEMENTS[NS.HTML][$.SCRIPT] = true; +SPECIAL_ELEMENTS[NS.HTML][$.SECTION] = true; +SPECIAL_ELEMENTS[NS.HTML][$.SELECT] = true; +SPECIAL_ELEMENTS[NS.HTML][$.SOURCE] = true; +SPECIAL_ELEMENTS[NS.HTML][$.STYLE] = true; +SPECIAL_ELEMENTS[NS.HTML][$.SUMMARY] = true; +SPECIAL_ELEMENTS[NS.HTML][$.TABLE] = true; +SPECIAL_ELEMENTS[NS.HTML][$.TBODY] = true; +SPECIAL_ELEMENTS[NS.HTML][$.TD] = true; +SPECIAL_ELEMENTS[NS.HTML][$.TEMPLATE] = true; +SPECIAL_ELEMENTS[NS.HTML][$.TEXTAREA] = true; +SPECIAL_ELEMENTS[NS.HTML][$.TFOOT] = true; +SPECIAL_ELEMENTS[NS.HTML][$.TH] = true; +SPECIAL_ELEMENTS[NS.HTML][$.THEAD] = true; +SPECIAL_ELEMENTS[NS.HTML][$.TITLE] = true; +SPECIAL_ELEMENTS[NS.HTML][$.TR] = true; +SPECIAL_ELEMENTS[NS.HTML][$.TRACK] = true; +SPECIAL_ELEMENTS[NS.HTML][$.UL] = true; +SPECIAL_ELEMENTS[NS.HTML][$.WBR] = true; +SPECIAL_ELEMENTS[NS.HTML][$.XMP] = true; + +SPECIAL_ELEMENTS[NS.MATHML] = {}; +SPECIAL_ELEMENTS[NS.MATHML][$.MI] = true; +SPECIAL_ELEMENTS[NS.MATHML][$.MO] = true; +SPECIAL_ELEMENTS[NS.MATHML][$.MN] = true; +SPECIAL_ELEMENTS[NS.MATHML][$.MS] = true; +SPECIAL_ELEMENTS[NS.MATHML][$.MTEXT] = true; +SPECIAL_ELEMENTS[NS.MATHML][$.ANNOTATION_XML] = true; + +SPECIAL_ELEMENTS[NS.SVG] = {}; +SPECIAL_ELEMENTS[NS.SVG][$.TITLE] = true; +SPECIAL_ELEMENTS[NS.SVG][$.FOREIGN_OBJECT] = true; +SPECIAL_ELEMENTS[NS.SVG][$.DESC] = true; diff --git a/tools/eslint/node_modules/parse5/lib/common/merge_options.js b/tools/eslint/node_modules/parse5/lib/common/merge_options.js new file mode 100644 index 00000000000..c35934a96a7 --- /dev/null +++ b/tools/eslint/node_modules/parse5/lib/common/merge_options.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = function mergeOptions(defaults, options) { + options = options || {}; + + return [defaults, options].reduce(function (merged, optObj) { + Object.keys(optObj).forEach(function (key) { + merged[key] = optObj[key]; + }); + + return merged; + }, {}); +}; diff --git a/tools/eslint/node_modules/parse5/lib/common/unicode.js b/tools/eslint/node_modules/parse5/lib/common/unicode.js new file mode 100644 index 00000000000..8777e97ab79 --- /dev/null +++ b/tools/eslint/node_modules/parse5/lib/common/unicode.js @@ -0,0 +1,47 @@ +'use strict'; + +exports.REPLACEMENT_CHARACTER = '\uFFFD'; + +exports.CODE_POINTS = { + EOF: -1, + NULL: 0x00, + TABULATION: 0x09, + CARRIAGE_RETURN: 0x0D, + LINE_FEED: 0x0A, + FORM_FEED: 0x0C, + SPACE: 0x20, + EXCLAMATION_MARK: 0x21, + QUOTATION_MARK: 0x22, + NUMBER_SIGN: 0x23, + AMPERSAND: 0x26, + APOSTROPHE: 0x27, + HYPHEN_MINUS: 0x2D, + SOLIDUS: 0x2F, + DIGIT_0: 0x30, + DIGIT_9: 0x39, + SEMICOLON: 0x3B, + LESS_THAN_SIGN: 0x3C, + EQUALS_SIGN: 0x3D, + GREATER_THAN_SIGN: 0x3E, + QUESTION_MARK: 0x3F, + LATIN_CAPITAL_A: 0x41, + LATIN_CAPITAL_F: 0x46, + LATIN_CAPITAL_X: 0x58, + LATIN_CAPITAL_Z: 0x5A, + GRAVE_ACCENT: 0x60, + LATIN_SMALL_A: 0x61, + LATIN_SMALL_F: 0x66, + LATIN_SMALL_X: 0x78, + LATIN_SMALL_Z: 0x7A, + REPLACEMENT_CHARACTER: 0xFFFD +}; + +exports.CODE_POINT_SEQUENCES = { + DASH_DASH_STRING: [0x2D, 0x2D], //-- + DOCTYPE_STRING: [0x44, 0x4F, 0x43, 0x54, 0x59, 0x50, 0x45], //DOCTYPE + CDATA_START_STRING: [0x5B, 0x43, 0x44, 0x41, 0x54, 0x41, 0x5B], //[CDATA[ + CDATA_END_STRING: [0x5D, 0x5D, 0x3E], //]]> + SCRIPT_STRING: [0x73, 0x63, 0x72, 0x69, 0x70, 0x74], //script + PUBLIC_STRING: [0x50, 0x55, 0x42, 0x4C, 0x49, 0x43], //PUBLIC + SYSTEM_STRING: [0x53, 0x59, 0x53, 0x54, 0x45, 0x4D] //SYSTEM +}; diff --git a/tools/eslint/node_modules/parse5/lib/index.js b/tools/eslint/node_modules/parse5/lib/index.js new file mode 100644 index 00000000000..28663c2193e --- /dev/null +++ b/tools/eslint/node_modules/parse5/lib/index.js @@ -0,0 +1,108 @@ +'use strict'; + +var Parser = require('./parser'), + Serializer = require('./serializer'); + +/** @namespace parse5 */ + +/** + * Parses an HTML string. + * @function parse + * @memberof parse5 + * @instance + * @param {string} html - Input HTML string. + * @param {ParserOptions} [options] - Parsing options. + * @returns {ASTNode} document + * @example + * var parse5 = require('parse5'); + * + * var document = parse5.parse('Hi there!'); + */ +exports.parse = function parse(html, options) { + var parser = new Parser(options); + + return parser.parse(html); +}; + +/** + * Parses an HTML fragment. + * @function parseFragment + * @memberof parse5 + * @instance + * @param {ASTNode} [fragmentContext] - Parsing context element. If specified, given fragment + * will be parsed as if it was set to the context element's `innerHTML` property. + * @param {string} html - Input HTML fragment string. + * @param {ParserOptions} [options] - Parsing options. + * @returns {ASTNode} documentFragment + * @example + * var parse5 = require('parse5'); + * + * var documentFragment = parse5.parseFragment('
'); + * + * // Parses the html fragment in the context of the parsed element. + * var trFragment = parser.parseFragment(documentFragment.childNodes[0], ''); + */ +exports.parseFragment = function parseFragment(fragmentContext, html, options) { + if (typeof fragmentContext === 'string') { + options = html; + html = fragmentContext; + fragmentContext = null; + } + + var parser = new Parser(options); + + return parser.parseFragment(html, fragmentContext); +}; + +/** + * Serializes an AST node to an HTML string. + * @function serialize + * @memberof parse5 + * @instance + * @param {ASTNode} node - Node to serialize. + * @param {SerializerOptions} [options] - Serialization options. + * @returns {String} html + * @example + * var parse5 = require('parse5'); + * + * var document = parse5.parse('Hi there!'); + * + * // Serializes a document. + * var html = parse5.serialize(document); + * + * // Serializes the element content. + * var bodyInnerHtml = parse5.serialize(document.childNodes[0].childNodes[1]); + */ +exports.serialize = function (node, options) { + var serializer = new Serializer(node, options); + + return serializer.serialize(); +}; + +/** + * Provides built-in tree adapters that can be used for parsing and serialization. + * @var treeAdapters + * @memberof parse5 + * @instance + * @property {TreeAdapter} default - Default tree format for parse5. + * @property {TreeAdapter} htmlparser2 - Quite popular [htmlparser2](https://github.com/fb55/htmlparser2) tree format + * (e.g. used by [cheerio](https://github.com/MatthewMueller/cheerio) and [jsdom](https://github.com/tmpvar/jsdom)). + * @example + * var parse5 = require('parse5'); + * + * // Uses the default tree adapter for parsing. + * var document = parse5.parse('
', { treeAdapter: parse5.treeAdapters.default }); + * + * // Uses the htmlparser2 tree adapter with the SerializerStream. + * var serializer = new parse5.SerializerStream(node, { treeAdapter: parse5.treeAdapters.htmlparser2 }); + */ +exports.treeAdapters = { + default: require('./tree_adapters/default'), + htmlparser2: require('./tree_adapters/htmlparser2') +}; + + +// Streaming +exports.ParserStream = require('./parser/stream'); +exports.SerializerStream = require('./serializer/stream'); +exports.SAXParser = require('./sax'); diff --git a/tools/eslint/node_modules/parse5/lib/location_info/parser_mixin.js b/tools/eslint/node_modules/parse5/lib/location_info/parser_mixin.js new file mode 100644 index 00000000000..7c467d641be --- /dev/null +++ b/tools/eslint/node_modules/parse5/lib/location_info/parser_mixin.js @@ -0,0 +1,216 @@ +'use strict'; + +var OpenElementStack = require('../parser/open_element_stack'), + Tokenizer = require('../tokenizer'), + HTML = require('../common/html'); + + +//Aliases +var $ = HTML.TAG_NAMES; + + +function setEndLocation(element, closingToken, treeAdapter) { + var loc = element.__location; + + if (!loc) + return; + + /** + * @typedef {Object} ElementLocationInfo + * @extends StartTagLocationInfo + * + * @property {StartTagLocationInfo} startTag - Element's start tag location info. + * @property {LocationInfo} endTag - Element's end tag location info. + */ + if (!loc.startTag) { + loc.startTag = { + line: loc.line, + col: loc.col, + startOffset: loc.startOffset, + endOffset: loc.endOffset + }; + if (loc.attrs) + loc.startTag.attrs = loc.attrs; + } + + if (closingToken.location) { + var ctLocation = closingToken.location, + tn = treeAdapter.getTagName(element), + // NOTE: For cases like

- First 'p' closes without a closing tag and + // for cases like - 'p' closes without a closing tag + isClosingEndTag = closingToken.type === Tokenizer.END_TAG_TOKEN && + tn === closingToken.tagName; + + if (isClosingEndTag) { + loc.endTag = { + line: ctLocation.line, + col: ctLocation.col, + startOffset: ctLocation.startOffset, + endOffset: ctLocation.endOffset + }; + } + + if (isClosingEndTag) + loc.endOffset = ctLocation.endOffset; + else + loc.endOffset = ctLocation.startOffset; + } +} + + +exports.assign = function (parser) { + //NOTE: obtain Parser proto this way to avoid module circular references + var parserProto = Object.getPrototypeOf(parser), + treeAdapter = parser.treeAdapter, + attachableElementLocation = null, + lastFosterParentingLocation = null, + currentToken = null; + + + //NOTE: patch _bootstrap method + parser._bootstrap = function (document, fragmentContext) { + parserProto._bootstrap.call(this, document, fragmentContext); + + attachableElementLocation = null; + lastFosterParentingLocation = null; + currentToken = null; + + //OpenElementStack + parser.openElements.pop = function () { + setEndLocation(this.current, currentToken, treeAdapter); + OpenElementStack.prototype.pop.call(this); + }; + + parser.openElements.popAllUpToHtmlElement = function () { + for (var i = this.stackTop; i > 0; i--) + setEndLocation(this.items[i], currentToken, treeAdapter); + + OpenElementStack.prototype.popAllUpToHtmlElement.call(this); + }; + + parser.openElements.remove = function (element) { + setEndLocation(element, currentToken, treeAdapter); + OpenElementStack.prototype.remove.call(this, element); + }; + }; + + + //Token processing + parser._processTokenInForeignContent = function (token) { + currentToken = token; + parserProto._processTokenInForeignContent.call(this, token); + }; + + parser._processToken = function (token) { + currentToken = token; + parserProto._processToken.call(this, token); + + //NOTE: and are never popped from the stack, so we need to updated + //their end location explicitly. + if (token.type === Tokenizer.END_TAG_TOKEN && + (token.tagName === $.HTML || + token.tagName === $.BODY && this.openElements.hasInScope($.BODY))) { + for (var i = this.openElements.stackTop; i >= 0; i--) { + var element = this.openElements.items[i]; + + if (this.treeAdapter.getTagName(element) === token.tagName) { + setEndLocation(element, token, treeAdapter); + break; + } + } + } + }; + + + //Doctype + parser._setDocumentType = function (token) { + parserProto._setDocumentType.call(this, token); + + var documentChildren = this.treeAdapter.getChildNodes(this.document), + cnLength = documentChildren.length; + + for (var i = 0; i < cnLength; i++) { + var node = documentChildren[i]; + + if (this.treeAdapter.isDocumentTypeNode(node)) { + node.__location = token.location; + break; + } + } + }; + + + //Elements + parser._attachElementToTree = function (element) { + //NOTE: _attachElementToTree is called from _appendElement, _insertElement and _insertTemplate methods. + //So we will use token location stored in this methods for the element. + element.__location = attachableElementLocation || null; + attachableElementLocation = null; + parserProto._attachElementToTree.call(this, element); + }; + + parser._appendElement = function (token, namespaceURI) { + attachableElementLocation = token.location; + parserProto._appendElement.call(this, token, namespaceURI); + }; + + parser._insertElement = function (token, namespaceURI) { + attachableElementLocation = token.location; + parserProto._insertElement.call(this, token, namespaceURI); + }; + + parser._insertTemplate = function (token) { + attachableElementLocation = token.location; + parserProto._insertTemplate.call(this, token); + + var tmplContent = this.treeAdapter.getTemplateContent(this.openElements.current); + + tmplContent.__location = null; + }; + + parser._insertFakeRootElement = function () { + parserProto._insertFakeRootElement.call(this); + this.openElements.current.__location = null; + }; + + + //Comments + parser._appendCommentNode = function (token, parent) { + parserProto._appendCommentNode.call(this, token, parent); + + var children = this.treeAdapter.getChildNodes(parent), + commentNode = children[children.length - 1]; + + commentNode.__location = token.location; + }; + + + //Text + parser._findFosterParentingLocation = function () { + //NOTE: store last foster parenting location, so we will be able to find inserted text + //in case of foster parenting + lastFosterParentingLocation = parserProto._findFosterParentingLocation.call(this); + return lastFosterParentingLocation; + }; + + parser._insertCharacters = function (token) { + parserProto._insertCharacters.call(this, token); + + var hasFosterParent = this._shouldFosterParentOnInsertion(), + parent = hasFosterParent && lastFosterParentingLocation.parent || + this.openElements.currentTmplContent || + this.openElements.current, + siblings = this.treeAdapter.getChildNodes(parent), + textNodeIdx = hasFosterParent && lastFosterParentingLocation.beforeElement ? + siblings.indexOf(lastFosterParentingLocation.beforeElement) - 1 : + siblings.length - 1, + textNode = siblings[textNodeIdx]; + + //NOTE: if we have location assigned by another token, then just update end position + if (textNode.__location) + textNode.__location.endOffset = token.location.endOffset; + + else + textNode.__location = token.location; + }; +}; diff --git a/tools/eslint/node_modules/parse5/lib/location_info/tokenizer_mixin.js b/tools/eslint/node_modules/parse5/lib/location_info/tokenizer_mixin.js new file mode 100644 index 00000000000..bbdebd7cfc5 --- /dev/null +++ b/tools/eslint/node_modules/parse5/lib/location_info/tokenizer_mixin.js @@ -0,0 +1,169 @@ +'use strict'; + +var UNICODE = require('../common/unicode'); + +//Aliases +var $ = UNICODE.CODE_POINTS; + + +exports.assign = function (tokenizer) { + //NOTE: obtain Tokenizer proto this way to avoid module circular references + var tokenizerProto = Object.getPrototypeOf(tokenizer), + tokenStartOffset = -1, + tokenCol = -1, + tokenLine = 1, + isEol = false, + lineStartPosStack = [0], + lineStartPos = 0, + col = -1, + line = 1; + + function attachLocationInfo(token) { + /** + * @typedef {Object} LocationInfo + * + * @property {Number} line - One-based line index + * @property {Number} col - One-based column index + * @property {Number} startOffset - Zero-based first character index + * @property {Number} endOffset - Zero-based last character index + */ + token.location = { + line: tokenLine, + col: tokenCol, + startOffset: tokenStartOffset, + endOffset: -1 + }; + } + + //NOTE: patch consumption method to track line/col information + tokenizer._consume = function () { + var cp = tokenizerProto._consume.call(this); + + //NOTE: LF should be in the last column of the line + if (isEol) { + isEol = false; + line++; + lineStartPosStack.push(this.preprocessor.sourcePos); + lineStartPos = this.preprocessor.sourcePos; + } + + if (cp === $.LINE_FEED) + isEol = true; + + col = this.preprocessor.sourcePos - lineStartPos + 1; + + return cp; + }; + + tokenizer._unconsume = function () { + tokenizerProto._unconsume.call(this); + isEol = false; + + while (lineStartPos > this.preprocessor.sourcePos && lineStartPosStack.length > 1) { + lineStartPos = lineStartPosStack.pop(); + line--; + } + + col = this.preprocessor.sourcePos - lineStartPos + 1; + }; + + //NOTE: patch token creation methods and attach location objects + tokenizer._createStartTagToken = function () { + tokenizerProto._createStartTagToken.call(this); + attachLocationInfo(this.currentToken); + }; + + tokenizer._createEndTagToken = function () { + tokenizerProto._createEndTagToken.call(this); + attachLocationInfo(this.currentToken); + }; + + tokenizer._createCommentToken = function () { + tokenizerProto._createCommentToken.call(this); + attachLocationInfo(this.currentToken); + }; + + tokenizer._createDoctypeToken = function (initialName) { + tokenizerProto._createDoctypeToken.call(this, initialName); + attachLocationInfo(this.currentToken); + }; + + tokenizer._createCharacterToken = function (type, ch) { + tokenizerProto._createCharacterToken.call(this, type, ch); + attachLocationInfo(this.currentCharacterToken); + }; + + tokenizer._createAttr = function (attrNameFirstCh) { + tokenizerProto._createAttr.call(this, attrNameFirstCh); + this.currentAttrLocation = { + line: line, + col: col, + startOffset: this.preprocessor.sourcePos, + endOffset: -1 + }; + }; + + tokenizer._leaveAttrName = function (toState) { + tokenizerProto._leaveAttrName.call(this, toState); + this._attachCurrentAttrLocationInfo(); + }; + + tokenizer._leaveAttrValue = function (toState) { + tokenizerProto._leaveAttrValue.call(this, toState); + this._attachCurrentAttrLocationInfo(); + }; + + tokenizer._attachCurrentAttrLocationInfo = function () { + this.currentAttrLocation.endOffset = this.preprocessor.sourcePos; + + if (!this.currentToken.location.attrs) + this.currentToken.location.attrs = {}; + + /** + * @typedef {Object} StartTagLocationInfo + * @extends LocationInfo + * + * @property {Dictionary} attrs - Start tag attributes' location info. + */ + this.currentToken.location.attrs[this.currentAttr.name] = this.currentAttrLocation; + }; + + //NOTE: patch token emission methods to determine end location + tokenizer._emitCurrentToken = function () { + //NOTE: if we have pending character token make it's end location equal to the + //current token's start location. + if (this.currentCharacterToken) + this.currentCharacterToken.location.endOffset = this.currentToken.location.startOffset; + + this.currentToken.location.endOffset = this.preprocessor.sourcePos + 1; + tokenizerProto._emitCurrentToken.call(this); + }; + + tokenizer._emitCurrentCharacterToken = function () { + //NOTE: if we have character token and it's location wasn't set in the _emitCurrentToken(), + //then set it's location at the current preprocessor position. + //We don't need to increment preprocessor position, since character token + //emission is always forced by the start of the next character token here. + //So, we already have advanced position. + if (this.currentCharacterToken && this.currentCharacterToken.location.endOffset === -1) + this.currentCharacterToken.location.endOffset = this.preprocessor.sourcePos; + + tokenizerProto._emitCurrentCharacterToken.call(this); + }; + + //NOTE: patch initial states for each mode to obtain token start position + Object.keys(tokenizerProto.MODE) + + .map(function (modeName) { + return tokenizerProto.MODE[modeName]; + }) + + .forEach(function (state) { + tokenizer[state] = function (cp) { + tokenStartOffset = this.preprocessor.sourcePos; + tokenLine = line; + tokenCol = col; + tokenizerProto[state].call(this, cp); + }; + }); +}; diff --git a/tools/eslint/node_modules/parse5/lib/parser/formatting_element_list.js b/tools/eslint/node_modules/parse5/lib/parser/formatting_element_list.js new file mode 100644 index 00000000000..e1711910e39 --- /dev/null +++ b/tools/eslint/node_modules/parse5/lib/parser/formatting_element_list.js @@ -0,0 +1,167 @@ +'use strict'; + +//Const +var NOAH_ARK_CAPACITY = 3; + +//List of formatting elements +var FormattingElementList = module.exports = function (treeAdapter) { + this.length = 0; + this.entries = []; + this.treeAdapter = treeAdapter; + this.bookmark = null; +}; + +//Entry types +FormattingElementList.MARKER_ENTRY = 'MARKER_ENTRY'; +FormattingElementList.ELEMENT_ENTRY = 'ELEMENT_ENTRY'; + +//Noah Ark's condition +//OPTIMIZATION: at first we try to find possible candidates for exclusion using +//lightweight heuristics without thorough attributes check. +FormattingElementList.prototype._getNoahArkConditionCandidates = function (newElement) { + var candidates = []; + + if (this.length >= NOAH_ARK_CAPACITY) { + var neAttrsLength = this.treeAdapter.getAttrList(newElement).length, + neTagName = this.treeAdapter.getTagName(newElement), + neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement); + + for (var i = this.length - 1; i >= 0; i--) { + var entry = this.entries[i]; + + if (entry.type === FormattingElementList.MARKER_ENTRY) + break; + + var element = entry.element, + elementAttrs = this.treeAdapter.getAttrList(element), + isCandidate = this.treeAdapter.getTagName(element) === neTagName && + this.treeAdapter.getNamespaceURI(element) === neNamespaceURI && + elementAttrs.length === neAttrsLength; + + if (isCandidate) + candidates.push({idx: i, attrs: elementAttrs}); + } + } + + return candidates.length < NOAH_ARK_CAPACITY ? [] : candidates; +}; + +FormattingElementList.prototype._ensureNoahArkCondition = function (newElement) { + var candidates = this._getNoahArkConditionCandidates(newElement), + cLength = candidates.length; + + if (cLength) { + var neAttrs = this.treeAdapter.getAttrList(newElement), + neAttrsLength = neAttrs.length, + neAttrsMap = {}; + + //NOTE: build attrs map for the new element so we can perform fast lookups + for (var i = 0; i < neAttrsLength; i++) { + var neAttr = neAttrs[i]; + + neAttrsMap[neAttr.name] = neAttr.value; + } + + for (i = 0; i < neAttrsLength; i++) { + for (var j = 0; j < cLength; j++) { + var cAttr = candidates[j].attrs[i]; + + if (neAttrsMap[cAttr.name] !== cAttr.value) { + candidates.splice(j, 1); + cLength--; + } + + if (candidates.length < NOAH_ARK_CAPACITY) + return; + } + } + + //NOTE: remove bottommost candidates until Noah's Ark condition will not be met + for (i = cLength - 1; i >= NOAH_ARK_CAPACITY - 1; i--) { + this.entries.splice(candidates[i].idx, 1); + this.length--; + } + } +}; + +//Mutations +FormattingElementList.prototype.insertMarker = function () { + this.entries.push({type: FormattingElementList.MARKER_ENTRY}); + this.length++; +}; + +FormattingElementList.prototype.pushElement = function (element, token) { + this._ensureNoahArkCondition(element); + + this.entries.push({ + type: FormattingElementList.ELEMENT_ENTRY, + element: element, + token: token + }); + + this.length++; +}; + +FormattingElementList.prototype.insertElementAfterBookmark = function (element, token) { + var bookmarkIdx = this.length - 1; + + for (; bookmarkIdx >= 0; bookmarkIdx--) { + if (this.entries[bookmarkIdx] === this.bookmark) + break; + } + + this.entries.splice(bookmarkIdx + 1, 0, { + type: FormattingElementList.ELEMENT_ENTRY, + element: element, + token: token + }); + + this.length++; +}; + +FormattingElementList.prototype.removeEntry = function (entry) { + for (var i = this.length - 1; i >= 0; i--) { + if (this.entries[i] === entry) { + this.entries.splice(i, 1); + this.length--; + break; + } + } +}; + +FormattingElementList.prototype.clearToLastMarker = function () { + while (this.length) { + var entry = this.entries.pop(); + + this.length--; + + if (entry.type === FormattingElementList.MARKER_ENTRY) + break; + } +}; + +//Search +FormattingElementList.prototype.getElementEntryInScopeWithTagName = function (tagName) { + for (var i = this.length - 1; i >= 0; i--) { + var entry = this.entries[i]; + + if (entry.type === FormattingElementList.MARKER_ENTRY) + return null; + + if (this.treeAdapter.getTagName(entry.element) === tagName) + return entry; + } + + return null; +}; + +FormattingElementList.prototype.getElementEntry = function (element) { + for (var i = this.length - 1; i >= 0; i--) { + var entry = this.entries[i]; + + if (entry.type === FormattingElementList.ELEMENT_ENTRY && entry.element === element) + return entry; + } + + return null; +}; diff --git a/tools/eslint/node_modules/parse5/lib/parser/index.js b/tools/eslint/node_modules/parse5/lib/parser/index.js new file mode 100644 index 00000000000..bdf192050d4 --- /dev/null +++ b/tools/eslint/node_modules/parse5/lib/parser/index.js @@ -0,0 +1,2817 @@ +'use strict'; + +var Tokenizer = require('../tokenizer'), + OpenElementStack = require('./open_element_stack'), + FormattingElementList = require('./formatting_element_list'), + locationInfoMixin = require('../location_info/parser_mixin'), + defaultTreeAdapter = require('../tree_adapters/default'), + doctype = require('../common/doctype'), + foreignContent = require('../common/foreign_content'), + mergeOptions = require('../common/merge_options'), + UNICODE = require('../common/unicode'), + HTML = require('../common/html'); + +//Aliases +var $ = HTML.TAG_NAMES, + NS = HTML.NAMESPACES, + ATTRS = HTML.ATTRS; + +/** + * @typedef {Object} ParserOptions + * + * @property {Boolean} [locationInfo=false] - Enables source code location information for the nodes. + * When enabled, each node (except root node) has the `__location` property. In case the node is not an empty element, + * `__location` will be {@link ElementLocationInfo} object, otherwise it's {@link LocationInfo}. + * If the element was implicitly created by the parser it's `__location` property will be `null`. + * + * @property {TreeAdapter} [treeAdapter=parse5.treeAdapters.default] - Specifies the resulting tree format. + */ +var DEFAULT_OPTIONS = { + locationInfo: false, + treeAdapter: defaultTreeAdapter +}; + +//Misc constants +var HIDDEN_INPUT_TYPE = 'hidden'; + +//Adoption agency loops iteration count +var AA_OUTER_LOOP_ITER = 8, + AA_INNER_LOOP_ITER = 3; + +//Insertion modes +var INITIAL_MODE = 'INITIAL_MODE', + BEFORE_HTML_MODE = 'BEFORE_HTML_MODE', + BEFORE_HEAD_MODE = 'BEFORE_HEAD_MODE', + IN_HEAD_MODE = 'IN_HEAD_MODE', + AFTER_HEAD_MODE = 'AFTER_HEAD_MODE', + IN_BODY_MODE = 'IN_BODY_MODE', + TEXT_MODE = 'TEXT_MODE', + IN_TABLE_MODE = 'IN_TABLE_MODE', + IN_TABLE_TEXT_MODE = 'IN_TABLE_TEXT_MODE', + IN_CAPTION_MODE = 'IN_CAPTION_MODE', + IN_COLUMN_GROUP_MODE = 'IN_COLUMN_GROUP_MODE', + IN_TABLE_BODY_MODE = 'IN_TABLE_BODY_MODE', + IN_ROW_MODE = 'IN_ROW_MODE', + IN_CELL_MODE = 'IN_CELL_MODE', + IN_SELECT_MODE = 'IN_SELECT_MODE', + IN_SELECT_IN_TABLE_MODE = 'IN_SELECT_IN_TABLE_MODE', + IN_TEMPLATE_MODE = 'IN_TEMPLATE_MODE', + AFTER_BODY_MODE = 'AFTER_BODY_MODE', + IN_FRAMESET_MODE = 'IN_FRAMESET_MODE', + AFTER_FRAMESET_MODE = 'AFTER_FRAMESET_MODE', + AFTER_AFTER_BODY_MODE = 'AFTER_AFTER_BODY_MODE', + AFTER_AFTER_FRAMESET_MODE = 'AFTER_AFTER_FRAMESET_MODE'; + +//Insertion mode reset map +var INSERTION_MODE_RESET_MAP = {}; + +INSERTION_MODE_RESET_MAP[$.TR] = IN_ROW_MODE; +INSERTION_MODE_RESET_MAP[$.TBODY] = +INSERTION_MODE_RESET_MAP[$.THEAD] = +INSERTION_MODE_RESET_MAP[$.TFOOT] = IN_TABLE_BODY_MODE; +INSERTION_MODE_RESET_MAP[$.CAPTION] = IN_CAPTION_MODE; +INSERTION_MODE_RESET_MAP[$.COLGROUP] = IN_COLUMN_GROUP_MODE; +INSERTION_MODE_RESET_MAP[$.TABLE] = IN_TABLE_MODE; +INSERTION_MODE_RESET_MAP[$.BODY] = IN_BODY_MODE; +INSERTION_MODE_RESET_MAP[$.FRAMESET] = IN_FRAMESET_MODE; + +//Template insertion mode switch map +var TEMPLATE_INSERTION_MODE_SWITCH_MAP = {}; + +TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.CAPTION] = +TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.COLGROUP] = +TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.TBODY] = +TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.TFOOT] = +TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.THEAD] = IN_TABLE_MODE; +TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.COL] = IN_COLUMN_GROUP_MODE; +TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.TR] = IN_TABLE_BODY_MODE; +TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.TD] = +TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.TH] = IN_ROW_MODE; + +//Token handlers map for insertion modes +var _ = {}; + +_[INITIAL_MODE] = {}; +_[INITIAL_MODE][Tokenizer.CHARACTER_TOKEN] = +_[INITIAL_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = tokenInInitialMode; +_[INITIAL_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = ignoreToken; +_[INITIAL_MODE][Tokenizer.COMMENT_TOKEN] = appendComment; +_[INITIAL_MODE][Tokenizer.DOCTYPE_TOKEN] = doctypeInInitialMode; +_[INITIAL_MODE][Tokenizer.START_TAG_TOKEN] = +_[INITIAL_MODE][Tokenizer.END_TAG_TOKEN] = +_[INITIAL_MODE][Tokenizer.EOF_TOKEN] = tokenInInitialMode; + +_[BEFORE_HTML_MODE] = {}; +_[BEFORE_HTML_MODE][Tokenizer.CHARACTER_TOKEN] = +_[BEFORE_HTML_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = tokenBeforeHtml; +_[BEFORE_HTML_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = ignoreToken; +_[BEFORE_HTML_MODE][Tokenizer.COMMENT_TOKEN] = appendComment; +_[BEFORE_HTML_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[BEFORE_HTML_MODE][Tokenizer.START_TAG_TOKEN] = startTagBeforeHtml; +_[BEFORE_HTML_MODE][Tokenizer.END_TAG_TOKEN] = endTagBeforeHtml; +_[BEFORE_HTML_MODE][Tokenizer.EOF_TOKEN] = tokenBeforeHtml; + +_[BEFORE_HEAD_MODE] = {}; +_[BEFORE_HEAD_MODE][Tokenizer.CHARACTER_TOKEN] = +_[BEFORE_HEAD_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = tokenBeforeHead; +_[BEFORE_HEAD_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = ignoreToken; +_[BEFORE_HEAD_MODE][Tokenizer.COMMENT_TOKEN] = appendComment; +_[BEFORE_HEAD_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[BEFORE_HEAD_MODE][Tokenizer.START_TAG_TOKEN] = startTagBeforeHead; +_[BEFORE_HEAD_MODE][Tokenizer.END_TAG_TOKEN] = endTagBeforeHead; +_[BEFORE_HEAD_MODE][Tokenizer.EOF_TOKEN] = tokenBeforeHead; + +_[IN_HEAD_MODE] = {}; +_[IN_HEAD_MODE][Tokenizer.CHARACTER_TOKEN] = +_[IN_HEAD_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = tokenInHead; +_[IN_HEAD_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = insertCharacters; +_[IN_HEAD_MODE][Tokenizer.COMMENT_TOKEN] = appendComment; +_[IN_HEAD_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[IN_HEAD_MODE][Tokenizer.START_TAG_TOKEN] = startTagInHead; +_[IN_HEAD_MODE][Tokenizer.END_TAG_TOKEN] = endTagInHead; +_[IN_HEAD_MODE][Tokenizer.EOF_TOKEN] = tokenInHead; + +_[AFTER_HEAD_MODE] = {}; +_[AFTER_HEAD_MODE][Tokenizer.CHARACTER_TOKEN] = +_[AFTER_HEAD_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = tokenAfterHead; +_[AFTER_HEAD_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = insertCharacters; +_[AFTER_HEAD_MODE][Tokenizer.COMMENT_TOKEN] = appendComment; +_[AFTER_HEAD_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[AFTER_HEAD_MODE][Tokenizer.START_TAG_TOKEN] = startTagAfterHead; +_[AFTER_HEAD_MODE][Tokenizer.END_TAG_TOKEN] = endTagAfterHead; +_[AFTER_HEAD_MODE][Tokenizer.EOF_TOKEN] = tokenAfterHead; + +_[IN_BODY_MODE] = {}; +_[IN_BODY_MODE][Tokenizer.CHARACTER_TOKEN] = characterInBody; +_[IN_BODY_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken; +_[IN_BODY_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = whitespaceCharacterInBody; +_[IN_BODY_MODE][Tokenizer.COMMENT_TOKEN] = appendComment; +_[IN_BODY_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[IN_BODY_MODE][Tokenizer.START_TAG_TOKEN] = startTagInBody; +_[IN_BODY_MODE][Tokenizer.END_TAG_TOKEN] = endTagInBody; +_[IN_BODY_MODE][Tokenizer.EOF_TOKEN] = eofInBody; + +_[TEXT_MODE] = {}; +_[TEXT_MODE][Tokenizer.CHARACTER_TOKEN] = +_[TEXT_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = +_[TEXT_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = insertCharacters; +_[TEXT_MODE][Tokenizer.COMMENT_TOKEN] = +_[TEXT_MODE][Tokenizer.DOCTYPE_TOKEN] = +_[TEXT_MODE][Tokenizer.START_TAG_TOKEN] = ignoreToken; +_[TEXT_MODE][Tokenizer.END_TAG_TOKEN] = endTagInText; +_[TEXT_MODE][Tokenizer.EOF_TOKEN] = eofInText; + +_[IN_TABLE_MODE] = {}; +_[IN_TABLE_MODE][Tokenizer.CHARACTER_TOKEN] = +_[IN_TABLE_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = +_[IN_TABLE_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = characterInTable; +_[IN_TABLE_MODE][Tokenizer.COMMENT_TOKEN] = appendComment; +_[IN_TABLE_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[IN_TABLE_MODE][Tokenizer.START_TAG_TOKEN] = startTagInTable; +_[IN_TABLE_MODE][Tokenizer.END_TAG_TOKEN] = endTagInTable; +_[IN_TABLE_MODE][Tokenizer.EOF_TOKEN] = eofInBody; + +_[IN_TABLE_TEXT_MODE] = {}; +_[IN_TABLE_TEXT_MODE][Tokenizer.CHARACTER_TOKEN] = characterInTableText; +_[IN_TABLE_TEXT_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken; +_[IN_TABLE_TEXT_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = whitespaceCharacterInTableText; +_[IN_TABLE_TEXT_MODE][Tokenizer.COMMENT_TOKEN] = +_[IN_TABLE_TEXT_MODE][Tokenizer.DOCTYPE_TOKEN] = +_[IN_TABLE_TEXT_MODE][Tokenizer.START_TAG_TOKEN] = +_[IN_TABLE_TEXT_MODE][Tokenizer.END_TAG_TOKEN] = +_[IN_TABLE_TEXT_MODE][Tokenizer.EOF_TOKEN] = tokenInTableText; + +_[IN_CAPTION_MODE] = {}; +_[IN_CAPTION_MODE][Tokenizer.CHARACTER_TOKEN] = characterInBody; +_[IN_CAPTION_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken; +_[IN_CAPTION_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = whitespaceCharacterInBody; +_[IN_CAPTION_MODE][Tokenizer.COMMENT_TOKEN] = appendComment; +_[IN_CAPTION_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[IN_CAPTION_MODE][Tokenizer.START_TAG_TOKEN] = startTagInCaption; +_[IN_CAPTION_MODE][Tokenizer.END_TAG_TOKEN] = endTagInCaption; +_[IN_CAPTION_MODE][Tokenizer.EOF_TOKEN] = eofInBody; + +_[IN_COLUMN_GROUP_MODE] = {}; +_[IN_COLUMN_GROUP_MODE][Tokenizer.CHARACTER_TOKEN] = +_[IN_COLUMN_GROUP_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = tokenInColumnGroup; +_[IN_COLUMN_GROUP_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = insertCharacters; +_[IN_COLUMN_GROUP_MODE][Tokenizer.COMMENT_TOKEN] = appendComment; +_[IN_COLUMN_GROUP_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[IN_COLUMN_GROUP_MODE][Tokenizer.START_TAG_TOKEN] = startTagInColumnGroup; +_[IN_COLUMN_GROUP_MODE][Tokenizer.END_TAG_TOKEN] = endTagInColumnGroup; +_[IN_COLUMN_GROUP_MODE][Tokenizer.EOF_TOKEN] = eofInBody; + +_[IN_TABLE_BODY_MODE] = {}; +_[IN_TABLE_BODY_MODE][Tokenizer.CHARACTER_TOKEN] = +_[IN_TABLE_BODY_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = +_[IN_TABLE_BODY_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = characterInTable; +_[IN_TABLE_BODY_MODE][Tokenizer.COMMENT_TOKEN] = appendComment; +_[IN_TABLE_BODY_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[IN_TABLE_BODY_MODE][Tokenizer.START_TAG_TOKEN] = startTagInTableBody; +_[IN_TABLE_BODY_MODE][Tokenizer.END_TAG_TOKEN] = endTagInTableBody; +_[IN_TABLE_BODY_MODE][Tokenizer.EOF_TOKEN] = eofInBody; + +_[IN_ROW_MODE] = {}; +_[IN_ROW_MODE][Tokenizer.CHARACTER_TOKEN] = +_[IN_ROW_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = +_[IN_ROW_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = characterInTable; +_[IN_ROW_MODE][Tokenizer.COMMENT_TOKEN] = appendComment; +_[IN_ROW_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[IN_ROW_MODE][Tokenizer.START_TAG_TOKEN] = startTagInRow; +_[IN_ROW_MODE][Tokenizer.END_TAG_TOKEN] = endTagInRow; +_[IN_ROW_MODE][Tokenizer.EOF_TOKEN] = eofInBody; + +_[IN_CELL_MODE] = {}; +_[IN_CELL_MODE][Tokenizer.CHARACTER_TOKEN] = characterInBody; +_[IN_CELL_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken; +_[IN_CELL_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = whitespaceCharacterInBody; +_[IN_CELL_MODE][Tokenizer.COMMENT_TOKEN] = appendComment; +_[IN_CELL_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[IN_CELL_MODE][Tokenizer.START_TAG_TOKEN] = startTagInCell; +_[IN_CELL_MODE][Tokenizer.END_TAG_TOKEN] = endTagInCell; +_[IN_CELL_MODE][Tokenizer.EOF_TOKEN] = eofInBody; + +_[IN_SELECT_MODE] = {}; +_[IN_SELECT_MODE][Tokenizer.CHARACTER_TOKEN] = insertCharacters; +_[IN_SELECT_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken; +_[IN_SELECT_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = insertCharacters; +_[IN_SELECT_MODE][Tokenizer.COMMENT_TOKEN] = appendComment; +_[IN_SELECT_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[IN_SELECT_MODE][Tokenizer.START_TAG_TOKEN] = startTagInSelect; +_[IN_SELECT_MODE][Tokenizer.END_TAG_TOKEN] = endTagInSelect; +_[IN_SELECT_MODE][Tokenizer.EOF_TOKEN] = eofInBody; + +_[IN_SELECT_IN_TABLE_MODE] = {}; +_[IN_SELECT_IN_TABLE_MODE][Tokenizer.CHARACTER_TOKEN] = insertCharacters; +_[IN_SELECT_IN_TABLE_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken; +_[IN_SELECT_IN_TABLE_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = insertCharacters; +_[IN_SELECT_IN_TABLE_MODE][Tokenizer.COMMENT_TOKEN] = appendComment; +_[IN_SELECT_IN_TABLE_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[IN_SELECT_IN_TABLE_MODE][Tokenizer.START_TAG_TOKEN] = startTagInSelectInTable; +_[IN_SELECT_IN_TABLE_MODE][Tokenizer.END_TAG_TOKEN] = endTagInSelectInTable; +_[IN_SELECT_IN_TABLE_MODE][Tokenizer.EOF_TOKEN] = eofInBody; + +_[IN_TEMPLATE_MODE] = {}; +_[IN_TEMPLATE_MODE][Tokenizer.CHARACTER_TOKEN] = characterInBody; +_[IN_TEMPLATE_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken; +_[IN_TEMPLATE_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = whitespaceCharacterInBody; +_[IN_TEMPLATE_MODE][Tokenizer.COMMENT_TOKEN] = appendComment; +_[IN_TEMPLATE_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[IN_TEMPLATE_MODE][Tokenizer.START_TAG_TOKEN] = startTagInTemplate; +_[IN_TEMPLATE_MODE][Tokenizer.END_TAG_TOKEN] = endTagInTemplate; +_[IN_TEMPLATE_MODE][Tokenizer.EOF_TOKEN] = eofInTemplate; + +_[AFTER_BODY_MODE] = {}; +_[AFTER_BODY_MODE][Tokenizer.CHARACTER_TOKEN] = +_[AFTER_BODY_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = tokenAfterBody; +_[AFTER_BODY_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = whitespaceCharacterInBody; +_[AFTER_BODY_MODE][Tokenizer.COMMENT_TOKEN] = appendCommentToRootHtmlElement; +_[AFTER_BODY_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[AFTER_BODY_MODE][Tokenizer.START_TAG_TOKEN] = startTagAfterBody; +_[AFTER_BODY_MODE][Tokenizer.END_TAG_TOKEN] = endTagAfterBody; +_[AFTER_BODY_MODE][Tokenizer.EOF_TOKEN] = stopParsing; + +_[IN_FRAMESET_MODE] = {}; +_[IN_FRAMESET_MODE][Tokenizer.CHARACTER_TOKEN] = +_[IN_FRAMESET_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken; +_[IN_FRAMESET_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = insertCharacters; +_[IN_FRAMESET_MODE][Tokenizer.COMMENT_TOKEN] = appendComment; +_[IN_FRAMESET_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[IN_FRAMESET_MODE][Tokenizer.START_TAG_TOKEN] = startTagInFrameset; +_[IN_FRAMESET_MODE][Tokenizer.END_TAG_TOKEN] = endTagInFrameset; +_[IN_FRAMESET_MODE][Tokenizer.EOF_TOKEN] = stopParsing; + +_[AFTER_FRAMESET_MODE] = {}; +_[AFTER_FRAMESET_MODE][Tokenizer.CHARACTER_TOKEN] = +_[AFTER_FRAMESET_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken; +_[AFTER_FRAMESET_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = insertCharacters; +_[AFTER_FRAMESET_MODE][Tokenizer.COMMENT_TOKEN] = appendComment; +_[AFTER_FRAMESET_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[AFTER_FRAMESET_MODE][Tokenizer.START_TAG_TOKEN] = startTagAfterFrameset; +_[AFTER_FRAMESET_MODE][Tokenizer.END_TAG_TOKEN] = endTagAfterFrameset; +_[AFTER_FRAMESET_MODE][Tokenizer.EOF_TOKEN] = stopParsing; + +_[AFTER_AFTER_BODY_MODE] = {}; +_[AFTER_AFTER_BODY_MODE][Tokenizer.CHARACTER_TOKEN] = tokenAfterAfterBody; +_[AFTER_AFTER_BODY_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = tokenAfterAfterBody; +_[AFTER_AFTER_BODY_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = whitespaceCharacterInBody; +_[AFTER_AFTER_BODY_MODE][Tokenizer.COMMENT_TOKEN] = appendCommentToDocument; +_[AFTER_AFTER_BODY_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[AFTER_AFTER_BODY_MODE][Tokenizer.START_TAG_TOKEN] = startTagAfterAfterBody; +_[AFTER_AFTER_BODY_MODE][Tokenizer.END_TAG_TOKEN] = tokenAfterAfterBody; +_[AFTER_AFTER_BODY_MODE][Tokenizer.EOF_TOKEN] = stopParsing; + +_[AFTER_AFTER_FRAMESET_MODE] = {}; +_[AFTER_AFTER_FRAMESET_MODE][Tokenizer.CHARACTER_TOKEN] = +_[AFTER_AFTER_FRAMESET_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken; +_[AFTER_AFTER_FRAMESET_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = whitespaceCharacterInBody; +_[AFTER_AFTER_FRAMESET_MODE][Tokenizer.COMMENT_TOKEN] = appendCommentToDocument; +_[AFTER_AFTER_FRAMESET_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken; +_[AFTER_AFTER_FRAMESET_MODE][Tokenizer.START_TAG_TOKEN] = startTagAfterAfterFrameset; +_[AFTER_AFTER_FRAMESET_MODE][Tokenizer.END_TAG_TOKEN] = ignoreToken; +_[AFTER_AFTER_FRAMESET_MODE][Tokenizer.EOF_TOKEN] = stopParsing; + + +//Parser +var Parser = module.exports = function (options) { + this.options = mergeOptions(DEFAULT_OPTIONS, options); + + this.treeAdapter = this.options.treeAdapter; + this.pendingScript = null; + + if (this.options.locationInfo) + locationInfoMixin.assign(this); +}; + +// API +Parser.prototype.parse = function (html) { + var document = this.treeAdapter.createDocument(); + + this._bootstrap(document, null); + this.tokenizer.write(html, true); + this._runParsingLoop(null, null); + + return document; +}; + +Parser.prototype.parseFragment = function (html, fragmentContext) { + //NOTE: use
Shake it, baby