Skip to content

Commit

Permalink
Code refactored using eslint, ramda and lodash
Browse files Browse the repository at this point in the history
  • Loading branch information
makarkotlov committed Aug 14, 2019
1 parent 02487dc commit 84021e5
Show file tree
Hide file tree
Showing 23 changed files with 2,890 additions and 2,179 deletions.
65 changes: 65 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
module.exports = {
extends: [
'airbnb',
'prettier',
'plugin:sonarjs/recommended',
'plugin:unicorn/recommended',
],
env: {
browser: true,
es6: true,
},
rules: {
'import/extensions': 0,
'import/no-extraneous-dependencies': 0,
'react/no-danger': 0,
'jsx-a11y/label-has-for': 0,
'jsx-a11y/label-has-associated-control': 0,
'jsx-a11y/anchor-is-valid': 0,
'no-shadow': 0,
'no-bitwise': ['error', { allow: ['^'] }],
'no-underscore-dangle': ['off', { enforceInMethodNames: true }],

'unicorn/catch-error-name': 'off',
'unicorn/custom-error-definition': 'off',
'unicorn/error-message': 'error',
'unicorn/escape-case': 'error',
'unicorn/explicit-length-check': 'error',
'unicorn/filename-case': 'off',
'unicorn/import-index': 'error',
'unicorn/new-for-builtins': 'error',
'unicorn/no-abusive-eslint-disable': 'error',
'unicorn/no-array-instanceof': 'error',
'unicorn/no-console-spaces': 'error',
'unicorn/no-fn-reference-in-iterator': 'off',
'unicorn/no-for-loop': 'error',
'unicorn/no-hex-escape': 'error',
'unicorn/no-keyword-prefix': 'off',
'unicorn/no-new-buffer': 'error',
'unicorn/no-process-exit': 'error',
'unicorn/no-unreadable-array-destructuring': 'error',
'unicorn/no-unsafe-regex': 'off',
'unicorn/no-unused-properties': 'off',
'unicorn/no-zero-fractions': 'error',
'unicorn/number-literal-case': 'error',
'unicorn/prefer-add-event-listener': 'error',
'unicorn/prefer-event-key': 'error',
'unicorn/prefer-exponentiation-operator': 'error',
'unicorn/prefer-flat-map': 'error',
'unicorn/prefer-includes': 'error',
'unicorn/prefer-node-append': 'error',
'unicorn/prefer-node-remove': 'error',
'unicorn/prefer-query-selector': 'error',
'unicorn/prefer-spread': 'error',
'unicorn/prefer-starts-ends-with': 'error',
'unicorn/prefer-text-content': 'error',
'unicorn/prefer-type-error': 'error',
'unicorn/prevent-abbreviations': 'off',
'unicorn/regex-shorthand': 'error',
'unicorn/throw-new-error': 'error',
},
settings: {
'import/core-modules': ['react'],
},
plugins: ['sonarjs', 'unicorn', 'import'],
}
5 changes: 3 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"printWidth": 80,
"tabWidth": 4,
// "tabWidth": 4,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
"jsxBracketSameLine": false
"jsxBracketSameLine": false,
"arrowParens": "avoid"
}
Loading

0 comments on commit 84021e5

Please sign in to comment.