Skip to content

Commit

Permalink
Merge pull request #76 from ordermentum/more-typescript-overrides
Browse files Browse the repository at this point in the history
More typescript overrides
  • Loading branch information
pedroabreu authored Jun 24, 2024
2 parents 70622a6 + 55e9bb5 commit 6a6a0e3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/mean-eyes-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ordermentum/eslint-config-ordermentum': patch
---

Minor fixes for typescript specific rules
18 changes: 12 additions & 6 deletions browser.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
module.exports = {
plugins: ['@emotion', 'react', 'jsx-a11y', 'promise', 'unicorn', "react-hooks"],
plugins: [
'@emotion',
'react',
'jsx-a11y',
'promise',
'unicorn',
'react-hooks',
],
env: {
browser: true,
jest: true,
Expand All @@ -10,7 +17,6 @@ module.exports = {
'plugin:promise/recommended',
],
rules: {
'jsx-a11y/label-has-for': 'warn',
'jsx-a11y/no-autofocus': 'warn',
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'jsx-a11y/no-static-element-interactions': 'warn',
Expand Down Expand Up @@ -43,11 +49,11 @@ module.exports = {
'react/display-name': 'warn',
'react/prop-types': 'warn',
'import/no-extraneous-dependencies': 'error',
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',

"unicorn/no-array-reduce": "error",
"unicorn/no-array-for-each": "error",
'unicorn/no-array-reduce': 'error',
'unicorn/no-array-for-each': 'error',
// from ts-conversion
'import/no-duplicates': 'warn',
'jsx-a11y/label-has-for': 'off',
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ module.exports = {
'no-redeclare': 'off',
'unicorn/no-array-reduce': 'error',
'unicorn/no-array-for-each': 'error',
'@typescript-eslint/no-redeclare': ['error'],
'max-classes-per-file': ['error', 5],
'no-useless-catch': 'warn',
'unicorn/no-abusive-eslint-disable': 'off',
Expand All @@ -104,6 +103,7 @@ module.exports = {
'@typescript-eslint/no-use-before-define': 'error',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'@typescript-eslint/no-redeclare': ['error'],
},
},
],
Expand Down

0 comments on commit 6a6a0e3

Please sign in to comment.