Skip to content

Commit

Permalink
v3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aMarCruz committed Dec 27, 2018
1 parent 224b567 commit 178b014
Show file tree
Hide file tree
Showing 27 changed files with 1,950 additions and 2,134 deletions.
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
**/dist
**/coverage
**/test/expected
**/test/fixtures
**/__test__/expected
**/__test__/fixtures
**/*.md
282 changes: 145 additions & 137 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,153 +1,161 @@
const OFF = 0
const WARN = 1
const ERROR = 2
const ON = 2
const YES = true

module.exports = {
root: true,
root: YES,

env: {
node: true,
},
plugins: [],

parserOptions: {
ecmaVersion: 2018,
impliedStrict: true,
ecmaVersion: 6,
impliedStrict: YES,
sourceType: 'module',
ecmaFeatures: {
modules: true,
},
},

globals: {
Promise: false,
// https://github.com/sindresorhus/globals/blob/master/globals.json
env: {
node: YES,
es6: YES,
},

// https://github.com/eslint/eslint/blob/master/conf/eslint-recommended.js
extends: [
'eslint:recommended',
],

rules: {
'block-scoped-var': 2,
'consistent-return': 2,
'curly': [2, 'multi-line'],
'dot-location': [2, 'property'],
'dot-notation': 1,
'eqeqeq': [2, 'smart'],
'guard-for-in': 1,
'no-alert': 2,
'no-catch-shadow': 2,
'no-caller': 2,
'no-case-declarations': 2,
'no-console': 0,
'no-div-regex': 2,
'no-else-return': 2,
'no-eval': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-floating-decimal': 2,
'no-implied-eval': 2,
'no-iterator': 2,
'no-label-var': 2,
'no-lone-blocks': 2,
'no-loop-func': 2,
'no-multi-str': 2,
'no-native-reassign': 2,
'no-new-func': 2,
'no-new-wrappers': 2,
'no-new': 2,
'no-octal-escape': 2,
'no-proto': 2,
'no-return-assign': [2, 'except-parens'],
'no-script-url': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-shadow-restricted-names': 2,
'no-throw-literal': 2,
'no-undef': 2,
'no-undef-init': 2,
'no-unexpected-multiline': 2,
'no-unused-expressions': 2,
'no-unused-vars': 2,
'no-useless-call': 2,
'no-use-before-define': [2, 'nofunc'],
'no-with': 2,
'radix': 2,
'wrap-iife': [2, 'inside'],
'yoda': [2, 'never'],
//
// STYLISTIC ISSUES
//
'array-bracket-spacing': 2,
'brace-style': [2, '1tbs', {
allowSingleLine: true,
}],
'comma-spacing': 2,
'comma-style': 2,
'comma-dangle': [2, {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'never'
}],
'computed-property-spacing': 2,
'consistent-this': [2, '_self'],
'eol-last': 2,
'func-call-spacing': 2,
'indent': ['error', 2, {
flatTernaryExpressions: true,
SwitchCase: 1,
VariableDeclarator: 2
}],
'key-spacing': [2, {
mode: 'minimum',
}],
'keyword-spacing': 2,
'linebreak-style': [2, 'unix'],
'object-curly-spacing': [2, 'always'],
'max-depth': [2, 5],
'max-len': [1, 120, 4, {
ignoreUrls: true,
ignorePattern: '=\\s+/.+/',
}],
'max-nested-callbacks': [2, 5],
'new-parens': 2,
'no-array-constructor': 2,
'no-lonely-if': 2,
'no-multiple-empty-lines': [2, {
max: 2,
}],
'no-new-object': 2,
'no-trailing-spaces': 2,
'no-unneeded-ternary': 2,
'operator-linebreak': 2,
'quote-props': [2, 'as-needed'],
quotes: [2, 'single', 'avoid-escape'],
'semi-spacing': 2,
semi: [2, 'never'],
'space-before-blocks': 2,
'space-before-function-paren': [2, {
anonymous: 'always',
named: 'never',
}],
'space-in-parens': 2,
'space-infix-ops': [2, {
int32Hint: false,
}],
'space-unary-ops': 2,
//
// ES6
//
'arrow-spacing': 2,
'no-confusing-arrow': [2, {
allowParens: true,
}],
'no-duplicate-imports': [2, {
includeExports: true,
}],
'no-useless-computed-key': 2,
'no-useless-rename': 2,
'no-restricted-syntax': [2, 'ForOfStatement'],
'no-var': 2,
'prefer-const': [2, {
destructuring: 'all',
}],
'template-curly-spacing': 2,
'array-bracket-spacing': ERROR,
'array-callback-return': ON,
'arrow-parens': ON,
'arrow-spacing': ON,
'block-scoped-var': ON,
'block-spacing': ERROR,
'brace-style': [ON, '1tbs'],
'comma-dangle': [ON, 'always-multiline'],
'comma-spacing': ERROR,
'comma-style': [ON, 'last'],
'complexity': [ON, 6], // default is 20
'computed-property-spacing': ERROR,
'consistent-return': ON,
'consistent-this': [ON, '_self'],
'curly': ON,
'dot-location': [ON, 'property'],
'dot-notation': WARN,
'eol-last': ON,
'eqeqeq': [ON, 'smart'],
'func-call-spacing': ERROR,
'guard-for-in': WARN,
'handle-callback-err': [ON, '^err(or)?$'],
'indent': [ON, 2, { flatTernaryExpressions: YES, SwitchCase: 1 }],
'jsx-quotes': [ON, 'prefer-double'],
'key-spacing': [ON, { mode: 'minimum' }],
'keyword-spacing': ON,
'linebreak-style': [ON, 'unix'],
'max-depth': [ON, 3],
'max-len': [1, 120, 4, { ignoreUrls: YES, ignoreRegExpLiterals: YES }],
'max-lines-per-function': [ON, { max: 99, skipBlankLines: YES, skipComments: YES }],
'max-lines': [ON, { max: 250, skipBlankLines: YES, skipComments: YES }],
'max-nested-callbacks': [ON, 3], // default is 10
'max-params': [ON, 3],
'max-statements': [ON, 20],
'new-parens': ON,
'no-alert': ON,
'no-array-constructor': ON,
'no-caller': ON,
'no-catch-shadow': ON,
'no-confusing-arrow': [ON, { allowParens: YES }],
'no-div-regex': ON,
'no-duplicate-imports': [ON, { includeExports: YES }],
'no-else-return': ON,
'no-eval': ON,
'no-extend-native': ON,
'no-extra-bind': ON,
'no-floating-decimal': ON,
'no-implicit-globals': ON,
'no-implied-eval': ON,
'no-iterator': ON,
'no-label-var': ON,
'no-lone-blocks': ON,
'no-lonely-if': ON,
'no-loop-func': ON,
'no-multi-str': ON,
'no-multiple-empty-lines': [ON, { max: 2 }],
'no-native-reassign': ON,
'no-new-func': ON,
'no-new-object': ON,
'no-new-wrappers': ON,
'no-new': ON,
'no-octal-escape': ON,
'no-proto': ON,
'no-prototype-builtins': ON,
'no-return-assign': [ON, 'except-parens'],
'no-script-url': ON,
'no-self-compare': ON,
'no-sequences': ON,
'no-shadow-restricted-names': ON,
'no-shadow': ON,
'no-spaced-func': ON,
'no-tabs': ON,
'no-template-curly-in-string': ON,
'no-throw-literal': ON,
'no-trailing-spaces': ON,
'no-undef-init': ON,
'no-unmodified-loop-condition': ON,
'no-unneeded-ternary': ON,
'no-unused-expressions': ON,
'no-use-before-define': [ON, 'nofunc'],
'no-useless-call': ON,
'no-useless-computed-key': ON,
'no-useless-rename': ON,
'no-useless-return': ON,
'no-var': ON,
'no-whitespace-before-property': ON,
'no-with': ON,
'object-curly-spacing': [ON, 'always'],
'one-var-declaration-per-line': ON,
'operator-linebreak': ERROR,
'prefer-const': [ON, { destructuring: 'all' }],
'prefer-numeric-literals': ON,
'prefer-promise-reject-errors': ON,
'quote-props': [ON, 'consistent'],
'quotes': [ON, 'single', 'avoid-escape'],
'radix': ON,
'require-atomic-updates': ON,
'require-await': ON,
'require-yield': ON,
'rest-spread-spacing': ERROR,
'semi-spacing': ERROR,
'semi': [ON, 'never'],
'space-before-blocks': ERROR,
'space-before-function-paren': [ON, { named: 'never' }],
'space-in-parens': ERROR,
'space-infix-ops': ERROR,
'space-unary-ops': ERROR,
'switch-colon-spacing': [ON, { after: YES }],
'template-curly-spacing': ERROR,
'unicode-bom': [ON, 'never'],
'wrap-iife': [ON, 'inside'],
'yield-star-spacing': ON,
'yoda': ERROR,
},
overrides: [
{
files: ['**/__test__/**'],
env: {
jest: true,
},
rules: {
'arrow-parens': OFF,
'brace-style': [ON, '1tbs', { allowSingleLine: true }],
'max-len': OFF,
'max-lines': OFF,
'max-nested-callbacks': [ON, 4],
'no-console': OFF,
'no-debugger': OFF,
},
},
],
}
Loading

0 comments on commit 178b014

Please sign in to comment.