Skip to content

Commit

Permalink
fix eslint and get all tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
planttheidea committed Dec 16, 2023
1 parent f847f0c commit ba00559
Show file tree
Hide file tree
Showing 6 changed files with 906 additions and 208 deletions.
21 changes: 6 additions & 15 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
{
"extends": ["airbnb-base"],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2019,
"sourceType": "module"
"env": {
"node": true
},
"rules": {
"no-param-reassign": "off",
"no-plusplus": "off",
"no-shadow": "off",
"no-underscore-dangle": "off",
"no-use-before-define": "off",
"import/order": "off",
"implicit-arrow-linebreak": "off",
"object-curly-newline": "off",
"operator-linebreak": "off"
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "commonjs"
}
}
28 changes: 16 additions & 12 deletions __tests__/__fixtures__/complex/shallow-iterable/output.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
let _determination = true;
for (let _key = 0, _length = item.length, _v, _result; _key < _length; ++_key) {
_v = item[_key];
_result = typeof _v === 'string';
if (!_result) {
_determination = false;
break;
}
}
const _length2 = array.length;
const _results2 = Array(_length2);
const _results = Array(_length2);
for (let _key2 = 0, _item; _key2 < _length2; ++_key2) {
_item = array[_key2];
_results2[_key2] = _determination;
let _determination = true;
for (
let _key3 = 0, _length3 = _item.length, _v2, _result3;
_key3 < _length3;
++_key3
) {
_v2 = _item[_key3];
_result3 = typeof _v2 === 'string';
if (!_result3) {
_determination = false;
break;
}
}
_results[_key2] = _determination;
}
const allStrings = _results2;
const allStrings = _results;
13 changes: 0 additions & 13 deletions __tests__/__runtime__/reduce.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,6 @@ const DECREMENTING_ARRAY_RESULT = ARRAY.reduceRight(isEven, 10);
const BAD_OBJECT_RESULT = Object.assign({}, OBJECT);
const OBJECT_RESULT = Object.values(OBJECT).reduce(isEven, 10);

console.log(
reduceRight(ARRAY, (total, value) =>
value % 2 === 0 ? total + value : total,
),
OBJECT_RESULT,
isEqual(
reduceRight(ARRAY, (total, value) =>
value % 2 === 0 ? total + value : total,
),
OBJECT_RESULT,
),
);

module.exports = {
cached: {
decrementing: {
Expand Down
6 changes: 0 additions & 6 deletions __tests__/runtime.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ const TRANSFORMED_FILES = fs.readdirSync(TEST_FILES).reduce((tests, file) => {

describe('runtime tests', () => {
for (const fn in TRANSFORMED_FILES) {
if (fn === 'errors') {
console.log('foo');

continue;
}

const file = TRANSFORMED_FILES[fn];

describe(fn, () => {
Expand Down
Loading

0 comments on commit ba00559

Please sign in to comment.