From 3b0578526655d3cf49c8ba85978136d5b9e4015e Mon Sep 17 00:00:00 2001 From: Victor Nascimento Bakke Date: Fri, 12 Jul 2019 01:26:13 +0200 Subject: [PATCH] style: use es6 BREAKING CHANGE: requires either transpilation for older environments and browsers, or requires you to stick to newer browsers and NodeJS versions. --- .eslintrc.js | 57 +------------- index.js | 184 +++++++++++++-------------------------------- package.json | 2 +- test/index.spec.js | 34 ++++----- yarn.lock | 7 ++ 5 files changed, 81 insertions(+), 203 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 8eed6e2..47bc9d4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,57 +1,4 @@ module.exports = { root: true, - extends: ['./node_modules/sanctuary-style/eslint-es3.json'], - rules: { - strict: 'off', - indent: [ - 'error', - 'tab', - { - 'SwitchCase': 1, - 'FunctionDeclaration': { 'parameters': 'first' }, - 'FunctionExpression': { 'parameters': 'first' }, - 'CallExpression': { 'arguments': 'first' }, - 'ArrayExpression': 'first', - 'ObjectExpression': 'first', - 'ignoredNodes': [ - 'CallExpression', - 'CallExpression > *', - 'CallExpression > ArrowFunctionExpression ArrowFunctionExpression > *', - 'CallExpression > FunctionExpression > BlockStatement', - 'ConditionalExpression', - 'MemberExpression' - ], - }, - ], - 'no-tabs': 'off', - }, - overrides: [ - { - files: ['*.md'], - globals: { - '$': false, - 'Cons': false, - 'Descending': false, - 'Just': false, - 'Left': false, - 'Nil': false, - 'Nothing': false, - 'Pair': false, - 'R': false, - 'Right': false, - 'S': false, - 'Sum': false, - 'localStorage': false, - 'sanctuary': false, - 'window': false - }, - rules: { - 'comma-dangle': ['error', 'always-multiline'], - 'indent': ['off'], - 'no-eval': ['off'], - 'no-extra-semi': ['off'], - 'no-unused-vars': ['error', { 'varsIgnorePattern': '^([$]|S)$' }] - } - } - ] -} + extends: ['@gipphe/eslint-config-haskellish'], +}; diff --git a/index.js b/index.js index ebdc10f..2cb30ac 100644 --- a/index.js +++ b/index.js @@ -1,75 +1,17 @@ -// UMD setup ripped straight from Q.js - -(function(definition) { - 'use strict'; - - // This file will function properly as a