tools: update ESLint to 3.4.0

PR-URL: https://github.com/nodejs/node/pull/8296
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
This commit is contained in:
Rich Trott committed 2016-08-30 10:40:45 -07:00
1 parent 932c824c60
commit 201115812e
303 files changed
+2226 -2057

No files matched your search

+5
View File
@@ -16,6 +16,11 @@ module.exports = function (str) {
for (var i = 0; i < str.length; i++) {
var code = codePointAt(str, i);
// ignore control characters
if (code <= 0x1f || (code >= 0x7f && code <= 0x9f)) {
continue;
}
// surrogates
if (code >= 0x10000) {
i++;
+17 -12
View File
@@ -14,16 +14,20 @@
]
],
"_from": "string-width@>=1.0.1 <2.0.0",
"_id": "string-width@1.0.1",
"_id": "string-width@1.0.2",
"_inCache": true,
"_installable": true,
"_location": "/string-width",
"_nodeVersion": "0.12.5",
"_nodeVersion": "4.4.5",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/string-width-1.0.2.tgz_1471188233009_0.6573935742489994"
},
"_npmUser": {
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
"_npmVersion": "2.11.2",
"_npmVersion": "2.15.5",
"_phantomChildren": {},
"_requested": {
"raw": "string-width@^1.0.1",
@@ -38,8 +42,8 @@
"/inquirer",
"/table"
],
"_resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz",
"_shasum": "c92129b6f1d7f52acf9af424a26e3864a05ceb0a",
"_resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"_shasum": "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3",
"_shrinkwrap": null,
"_spec": "string-width@^1.0.1",
"_where": "/Users/trott/io.js/tools/node_modules/inquirer",
@@ -58,12 +62,13 @@
},
"description": "Get the visual width of a string - the number of columns required to display it",
"devDependencies": {
"ava": "0.0.4"
"ava": "*",
"xo": "*"
},
"directories": {},
"dist": {
"shasum": "c92129b6f1d7f52acf9af424a26e3864a05ceb0a",
"tarball": "http://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz"
"shasum": "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3",
"tarball": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz"
},
"engines": {
"node": ">=0.10.0"
@@ -71,8 +76,8 @@
"files": [
"index.js"
],
"gitHead": "f279cfd14835f0a3c8df69ba18e9a3960156e135",
"homepage": "https://github.com/sindresorhus/string-width",
"gitHead": "282cf3d53918a92cc3ee0778dcf938039bcbc47b",
"homepage": "https://github.com/sindresorhus/string-width#readme",
"keywords": [
"string",
"str",
@@ -114,7 +119,7 @@
"url": "git+https://github.com/sindresorhus/string-width.git"
},
"scripts": {
"test": "node test.js"
"test": "xo && ava"
},
"version": "1.0.1"
"version": "1.0.2"
}
+4 -3
View File
@@ -2,7 +2,7 @@
> Get the visual width of a string - the number of columns required to display it
Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width.
Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width.
Useful to be able to measure the actual width of command-line output.
@@ -17,7 +17,7 @@ $ npm install --save string-width
## Usage
```js
var stringWidth = require('string-width');
const stringWidth = require('string-width');
stringWidth('古');
//=> 2
@@ -34,8 +34,9 @@ stringWidth('a');
- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module
- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string
- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)
MIT © [Sindre Sorhus](https://sindresorhus.com)