Update eslint-config-noms to enforce comma-spacing (#3149)

This commit is contained in:
Erik Arvidsson
2017-02-06 17:08:58 -08:00
committed by GitHub
parent 8378d4952e
commit f40c941dc9
7 changed files with 107 additions and 93 deletions

View File

@@ -11,6 +11,7 @@ module.exports = {
'arrow-spacing': ['error', {'before': true, 'after': true}],
'camelcase': 'error',
'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': ['error', {'before': false, 'after': true}],
'eol-last': 'error',
'eqeqeq': 'error',
'flowtype/boolean-style': 'error',

View File

@@ -3,7 +3,7 @@
"description": "Shared eslintrc for noms",
"repository": "https://github.com/attic-labs/noms/tree/master/js/eslint-config-noms",
"license": "Apache-2.0",
"version": "1.1.0",
"version": "1.2.0",
"main": "index.js",
"dependencies": {
"babel-eslint": "^7.1.1",

View File

@@ -498,16 +498,16 @@ suite('Diff List', () => {
assert.deepEqual(directDiff, listDiff);
const expectedDiff = [
[0,49,50,0],
[50,50,49,51],
[1000,49,50,1000],
[1050,50,49,1051],
[2000,49,50,2000],
[2050,50,49,2051],
[3000,49,50,3000],
[3050,50,49,3051],
[4000,49,50,4000],
[4050,50,49,4051],
[0, 49, 50, 0],
[50, 50, 49, 51],
[1000, 49, 50, 1000],
[1050, 50, 49, 1051],
[2000, 49, 50, 2000],
[2050, 50, 49, 2051],
[3000, 49, 50, 3000],
[3050, 50, 49, 3051],
[4000, 49, 50, 4000],
[4050, 50, 49, 4051],
];
assert.deepEqual(expectedDiff, directDiff);
});
@@ -517,7 +517,7 @@ suite('Diff List', () => {
const nums2 = nums1.slice(0);
const directDiff = calcSplices(nums1.length, nums2.length, DEFAULT_MAX_SPLICE_MATRIX_SIZE,
(i, j) => equals(nums1[i],nums2[j]));
(i, j) => equals(nums1[i], nums2[j]));
const l1 = new List(nums1);
const l2 = new List(nums2);
@@ -533,7 +533,7 @@ suite('Diff List', () => {
const nums2 = ['one', 'two', 'three', 'four'];
const directDiff = calcSplices(nums1.length, nums2.length, DEFAULT_MAX_SPLICE_MATRIX_SIZE,
(i, j) => equals(nums1[i],nums2[j]));
(i, j) => equals(nums1[i], nums2[j]));
const l1 = new List(nums1);
const l2 = new List(nums2);
@@ -541,7 +541,7 @@ suite('Diff List', () => {
assert.deepEqual(directDiff, listDiff);
const expectedDiff = [
[3,0,1,3],
[3, 0, 1, 3],
];
assert.deepEqual(expectedDiff, directDiff);
});
@@ -551,7 +551,7 @@ suite('Diff List', () => {
const nums2 = ['one', 'two', 'four'];
const directDiff = calcSplices(nums1.length, nums2.length, DEFAULT_MAX_SPLICE_MATRIX_SIZE,
(i, j) => equals(nums1[i],nums2[j]));
(i, j) => equals(nums1[i], nums2[j]));
const l1 = new List(nums1);
const l2 = new List(nums2);
@@ -559,7 +559,7 @@ suite('Diff List', () => {
assert.deepEqual(directDiff, listDiff);
const expectedDiff = [
[2,1,1,2],
[2, 1, 1, 2],
];
assert.deepEqual(expectedDiff, directDiff);
});
@@ -584,7 +584,7 @@ suite('Diff List', () => {
const listDiff = await l2.diff(l1);
assert.deepEqual(listDiff, [
[3,0,5,3],
[3, 0, 5, 3],
]);
});
});

View File

@@ -49,7 +49,7 @@ suite('SequenceCursor', () => {
}
test('retreating past the start', async () => {
const cur = testCursor([[100, 101],[102]]);
const cur = testCursor([[100, 101], [102]]);
expect(cur, 0, 0, true, 100);
assert.isFalse(await cur.retreat());
expect(cur, -1, 0, false, null);
@@ -58,7 +58,7 @@ suite('SequenceCursor', () => {
});
test('retreating past the start, then advanding past the end', async () => {
const cur = testCursor([[100, 101],[102]]);
const cur = testCursor([[100, 101], [102]]);
assert.isFalse(await cur.retreat());
assert.isTrue(await cur.advance());
expect(cur, 0, 0, true, 100);
@@ -73,7 +73,7 @@ suite('SequenceCursor', () => {
});
test('advancing past the end', async () => {
const cur = testCursor([[100, 101],[102]]);
const cur = testCursor([[100, 101], [102]]);
assert.isTrue(await cur.advance());
expect(cur, 1, 0, true, 101);
assert.isTrue(await cur.retreat());
@@ -85,7 +85,7 @@ suite('SequenceCursor', () => {
});
test('advancing past the end, then retreating past the start.', async () => {
const cur = testCursor([[100, 101],[102]]);
const cur = testCursor([[100, 101], [102]]);
assert.isTrue(await cur.advance());
assert.isTrue(await cur.advance());
expect(cur, 0, 1, true, 102);

View File

@@ -142,7 +142,7 @@ suite('Spec', () => {
const invalidDatasetNames = [' ', '', '$', '#', ':', '\n', '💩'];
invalidDatasetNames.map(s => `mem::${s}`).forEach(assertInvalid);
const validDatasetNames = ['a', 'Z', '0','/', '-', '_'];
const validDatasetNames = ['a', 'Z', '0', '/', '-', '_'];
for (const s of validDatasetNames) {
Spec.forDataset(`mem::${s}`);
}

View File

@@ -120,7 +120,7 @@ suite('Specs', () => {
const invalidDatasetNames = [' ', '', '$', '#', ':', '\n', '💩'];
invalidDatasetNames.map(s => `mem::${s}`).forEach(assertInvalid);
const validDatasetNames = ['a', 'Z', '0','/', '-', '_'];
const validDatasetNames = ['a', 'Z', '0', '/', '-', '_'];
for (const s of validDatasetNames) {
DatasetSpec.parse(`mem::${s}`);
}

View File

@@ -23,7 +23,7 @@ acorn-globals@^3.1.0:
dependencies:
acorn "^4.0.4"
acorn-jsx@^3.0.0, acorn-jsx@^3.0.1:
acorn-jsx@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b"
dependencies:
@@ -148,6 +148,13 @@ array-unique@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
array.prototype.find@^2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.0.3.tgz#08c3ec33e32ec4bab362a2958e686ae92f59271d"
dependencies:
define-properties "^1.1.2"
es-abstract "^1.7.0"
arrify@^1.0.0, arrify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
@@ -255,13 +262,14 @@ babel-core@^6.0.0, babel-core@^6.0.14, babel-core@^6.14.0, babel-core@^6.17.0, b
slash "^1.0.0"
source-map "^0.5.0"
babel-eslint@7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.0.0.tgz#54e51b4033f54ac81326ecea4c646a779935196d"
babel-eslint@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.1.1.tgz#8a6a884f085aa7060af69cfc77341c2f99370fb2"
dependencies:
babel-code-frame "^6.16.0"
babel-traverse "^6.15.0"
babel-types "^6.15.0"
babylon "^6.11.2"
babylon "^6.13.0"
lodash.pickby "^4.6.0"
babel-generator@6.19.0:
@@ -995,7 +1003,7 @@ babelify@^7.3.0:
babel-core "^6.0.14"
object-assign "^4.0.0"
babylon@^6.11.0, babylon@^6.11.1, babylon@^6.11.2, babylon@^6.11.4, babylon@^6.13.0:
babylon@^6.11.0, babylon@^6.11.1, babylon@^6.11.4, babylon@^6.13.0:
version "6.15.0"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e"
@@ -1430,6 +1438,13 @@ default-require-extensions@^1.0.0:
dependencies:
strip-bom "^2.0.0"
define-properties@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94"
dependencies:
foreach "^2.0.5"
object-keys "^1.0.8"
defined@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693"
@@ -1606,6 +1621,23 @@ error@^7.0.0:
string-template "~0.2.1"
xtend "~4.0.0"
es-abstract@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.7.0.tgz#dfade774e01bfcd97f96180298c449c8623fb94c"
dependencies:
es-to-primitive "^1.1.1"
function-bind "^1.1.0"
is-callable "^1.1.3"
is-regex "^1.0.3"
es-to-primitive@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d"
dependencies:
is-callable "^1.1.1"
is-date-object "^1.0.1"
is-symbol "^1.0.1"
es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.7:
version "0.10.12"
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047"
@@ -1682,65 +1714,27 @@ escope@^3.6.0:
esrecurse "^4.1.0"
estraverse "^4.1.1"
eslint-config-noms@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/eslint-config-noms/-/eslint-config-noms-1.0.0.tgz#09ab3b633198e0925a08c333ea7cd7641c72e9fb"
"eslint-config-noms@file:../eslint-config-noms":
version "1.2.0"
dependencies:
babel-eslint "7.0.0"
eslint "3.8.1"
eslint-plugin-flowtype "2.25.0"
eslint-plugin-react "6.3.0"
babel-eslint "^7.1.1"
eslint "^3.13.1"
eslint-plugin-flowtype "^2.30.0"
eslint-plugin-react "^6.9.0"
eslint-plugin-flowtype@2.25.0:
version "2.25.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.25.0.tgz#c462521ab20ce3d8db819f10ad3c9f1bc7f3f819"
eslint-plugin-flowtype@^2.30.0:
version "2.30.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.30.0.tgz#3054a265f9c8afe3046c3d41b72d32a736f9b4ae"
dependencies:
lodash "^4.15.0"
eslint-plugin-react@6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.3.0.tgz#fac3504a02917fc8b15f7f28514058cffde9cb76"
eslint-plugin-react@^6.9.0:
version "6.9.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.9.0.tgz#54c2e9906b76f9d10142030bdc34e9d6840a0bb2"
dependencies:
array.prototype.find "^2.0.1"
doctrine "^1.2.2"
jsx-ast-utils "^1.3.1"
eslint@3.8.1:
version "3.8.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.8.1.tgz#7d02db44cd5aaf4fa7aa489e1f083baa454342ba"
dependencies:
chalk "^1.1.3"
concat-stream "^1.4.6"
debug "^2.1.1"
doctrine "^1.2.2"
escope "^3.6.0"
espree "^3.3.1"
estraverse "^4.2.0"
esutils "^2.0.2"
file-entry-cache "^2.0.0"
glob "^7.0.3"
globals "^9.2.0"
ignore "^3.1.5"
imurmurhash "^0.1.4"
inquirer "^0.12.0"
is-my-json-valid "^2.10.0"
is-resolvable "^1.0.0"
js-yaml "^3.5.1"
json-stable-stringify "^1.0.0"
levn "^0.3.0"
lodash "^4.0.0"
mkdirp "^0.5.0"
natural-compare "^1.4.0"
optionator "^0.8.2"
path-is-inside "^1.0.1"
pluralize "^1.2.1"
progress "^1.1.8"
require-uncached "^1.0.2"
shelljs "^0.6.0"
strip-bom "^3.0.0"
strip-json-comments "~1.0.1"
table "^3.7.8"
text-table "~0.2.0"
user-home "^2.0.0"
jsx-ast-utils "^1.3.4"
eslint@^3.13.1:
version "3.13.1"
@@ -1970,6 +1964,10 @@ for-own@^0.1.4:
dependencies:
for-in "^0.1.5"
foreach@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
foreground-child@^1.3.3, foreground-child@^1.5.3:
version "1.5.6"
resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.6.tgz#4fd71ad2dfde96789b980a5c0a295937cb2f5ce9"
@@ -2038,7 +2036,7 @@ fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10:
mkdirp ">=0.5 0"
rimraf "2"
function-bind@^1.0.2:
function-bind@^1.0.2, function-bind@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771"
@@ -2168,7 +2166,7 @@ globals-docs@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/globals-docs/-/globals-docs-2.3.0.tgz#dca4088af196f7800f4eba783eaeff335cb6759c"
globals@^9.0.0, globals@^9.14.0, globals@^9.2.0:
globals@^9.0.0, globals@^9.14.0:
version "9.14.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034"
@@ -2330,7 +2328,7 @@ iconv-lite@0.4.13:
version "0.4.13"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2"
ignore@^3.1.5, ignore@^3.2.0:
ignore@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.0.tgz#8d88f03c3002a0ac52114db25d2c673b0bf1e435"
@@ -2431,12 +2429,20 @@ is-builtin-module@^1.0.0:
dependencies:
builtin-modules "^1.0.0"
is-callable@^1.1.1, is-callable@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
is-ci@^1.0.9:
version "1.0.10"
resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e"
dependencies:
ci-info "^1.0.0"
is-date-object@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
is-decimal@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.0.tgz#940579b6ea63c628080a69e62bda88c8470b4fe0"
@@ -2538,6 +2544,10 @@ is-property@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84"
is-regex@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.3.tgz#0d55182bddf9f2fde278220aec3a75642c908637"
is-relative@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-0.2.1.tgz#d27f4c7d516d175fb610db84bbeef23c3bc97aa5"
@@ -2560,6 +2570,10 @@ is-stream@^1.0.1, is-stream@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
is-symbol@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572"
is-typedarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
@@ -2963,11 +2977,10 @@ jsprim@^1.2.2:
json-schema "0.2.3"
verror "1.3.6"
jsx-ast-utils@^1.3.1:
version "1.3.5"
resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.3.5.tgz#9ba6297198d9f754594d62e59496ffb923778dd4"
jsx-ast-utils@^1.3.4:
version "1.4.0"
resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.0.tgz#5afe38868f56bc8cc7aeaef0100ba8c75bd12591"
dependencies:
acorn-jsx "^3.0.1"
object-assign "^4.1.0"
kebab-case@^1.0.0:
@@ -3506,6 +3519,10 @@ object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
object-keys@^1.0.8:
version "1.0.11"
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
object.omit@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
@@ -4124,10 +4141,6 @@ set-immediate-shim@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61"
shelljs@^0.6.0:
version "0.6.1"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.6.1.tgz#ec6211bed1920442088fe0f70b2837232ed2c8a8"
shelljs@^0.7.5:
version "0.7.6"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad"
@@ -4335,7 +4348,7 @@ strip-json-comments@^2.0.0, strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
strip-json-comments@~1.0.1, strip-json-comments@~1.0.4:
strip-json-comments@~1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91"