tools: update ESLint to v4.0.0

Update ESLint and configuration to version 4.0.0.

Backport-PR-URL: https://github.com/nodejs/node/pull/14340
PR-URL: https://github.com/nodejs/node/pull/13645
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Rich Trott authored and Myles Borins committed 2017-07-18 14:45:47 -04:00
1 parent bb1b06a4e5
commit 4ffe804c81
1031 files changed
+36817 -42179

No files matched your search

+6 -8
View File
@@ -1,20 +1,18 @@
'use strict';
var stripAnsi = require('strip-ansi');
var codePointAt = require('code-point-at');
var isFullwidthCodePoint = require('is-fullwidth-code-point');
const stripAnsi = require('strip-ansi');
const isFullwidthCodePoint = require('is-fullwidth-code-point');
// https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1345
module.exports = function (str) {
module.exports = str => {
if (typeof str !== 'string' || str.length === 0) {
return 0;
}
var width = 0;
let width = 0;
str = stripAnsi(str);
for (var i = 0; i < str.length; i++) {
var code = codePointAt(str, i);
for (let i = 0; i < str.length; i++) {
const code = str.codePointAt(i);
// ignore control characters
if (code <= 0x1f || (code >= 0x7f && code <= 0x9f)) {
+26 -23
View File
@@ -2,48 +2,49 @@
"_args": [
[
{
"raw": "string-width@^1.0.1",
"raw": "string-width@^2.0.0",
"scope": null,
"escapedName": "string-width",
"name": "string-width",
"rawSpec": "^1.0.1",
"spec": ">=1.0.1 <2.0.0",
"rawSpec": "^2.0.0",
"spec": ">=2.0.0 <3.0.0",
"type": "range"
},
"/Users/trott/io.js/tools/node_modules/inquirer"
]
],
"_from": "string-width@>=1.0.1 <2.0.0",
"_id": "string-width@1.0.2",
"_from": "string-width@>=2.0.0 <3.0.0",
"_id": "string-width@2.0.0",
"_inCache": true,
"_location": "/string-width",
"_nodeVersion": "4.4.5",
"_nodeVersion": "4.5.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/string-width-1.0.2.tgz_1471188233009_0.6573935742489994"
"host": "packages-16-east.internal.npmjs.com",
"tmp": "tmp/string-width-2.0.0.tgz_1474527284011_0.7386264291126281"
},
"_npmUser": {
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
"_npmVersion": "2.15.5",
"_npmVersion": "3.10.7",
"_phantomChildren": {},
"_requested": {
"raw": "string-width@^1.0.1",
"raw": "string-width@^2.0.0",
"scope": null,
"escapedName": "string-width",
"name": "string-width",
"rawSpec": "^1.0.1",
"spec": ">=1.0.1 <2.0.0",
"rawSpec": "^2.0.0",
"spec": ">=2.0.0 <3.0.0",
"type": "range"
},
"_requiredBy": [
"/inquirer"
"/inquirer",
"/table"
],
"_resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"_shasum": "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3",
"_resolved": "https://registry.npmjs.org/string-width/-/string-width-2.0.0.tgz",
"_shasum": "635c5436cc72a6e0c387ceca278d4e2eec52687e",
"_shrinkwrap": null,
"_spec": "string-width@^1.0.1",
"_spec": "string-width@^2.0.0",
"_where": "/Users/trott/io.js/tools/node_modules/inquirer",
"author": {
"name": "Sindre Sorhus",
@@ -54,8 +55,7 @@
"url": "https://github.com/sindresorhus/string-width/issues"
},
"dependencies": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^3.0.0"
},
"description": "Get the visual width of a string - the number of columns required to display it",
@@ -65,16 +65,16 @@
},
"directories": {},
"dist": {
"shasum": "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3",
"tarball": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz"
"shasum": "635c5436cc72a6e0c387ceca278d4e2eec52687e",
"tarball": "https://registry.npmjs.org/string-width/-/string-width-2.0.0.tgz"
},
"engines": {
"node": ">=0.10.0"
"node": ">=4"
},
"files": [
"index.js"
],
"gitHead": "282cf3d53918a92cc3ee0778dcf938039bcbc47b",
"gitHead": "523d7ba4dbb24d40cde88d2c36bb1c7124ab6f82",
"homepage": "https://github.com/sindresorhus/string-width#readme",
"keywords": [
"string",
@@ -119,5 +119,8 @@
"scripts": {
"test": "xo && ava"
},
"version": "1.0.2"
"version": "2.0.0",
"xo": {
"esnext": true
}
}