Skip to content

Commit

Permalink
feat: react js rules (#28)
Browse files Browse the repository at this point in the history
* feat: react rules
  • Loading branch information
irekrog authored Aug 8, 2022
1 parent d055af3 commit 16f41d4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
7 changes: 7 additions & 0 deletions configs/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,12 @@ module.exports = {
'consistent-return': 'off',
'prefer-named-capture-group': 'off',
'class-methods-use-this': 'off',
'no-shadow': 'off',
'no-empty-function': [
'error',
{
allow: ['arrowFunctions'],
},
],
},
};
7 changes: 6 additions & 1 deletion configs/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ module.exports = {
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-shadow': 'off',
'@typescript-eslint/method-signature-style': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-empty-function': [
'error',
{
allow: ['arrowFunctions'],
},
],
},
};
23 changes: 13 additions & 10 deletions react-javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@ module.exports = {
extends: ['./configs/eslint', './configs/unicorn', './configs/react'],
rules: {
'no-underscore-dangle': 'off',
'no-implicit-coercion': [
'error',
{
boolean: false,
},
],

'unicorn/filename-case': 'off',
'unicorn/no-thenable': 'off',
'unicorn/no-useless-undefined': 'off',
'unicorn/numeric-separators-style': 'off',
'unicorn/prefer-module': 'off',
'unicorn/prefer-node-protocol': 'off',
'unicorn/prefer-regexp-test': 'off',
'unicorn/prefer-set-has': 'off',
// disabled because of https://github.com/sindresorhus/eslint-plugin-unicorn/issues/687
'unicorn/prefer-spread': 'off',
'unicorn/template-indent': 'off',
'unicorn/text-encoding-identifier-case': 'off',
'unicorn/template-indent': [
'error',
{
indent: 4,
},
],

'simple-import-sort/exports': 'error',
'simple-import-sort/imports': [
Expand Down

0 comments on commit 16f41d4

Please # to comment.