Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove old lint rules #3199

Merged
merged 3 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
"testing-library/prefer-user-event": "warn",
"testing-library/prefer-wait-for": "warn",
"testing-library/prefer-explicit-assert": "warn",
"complexity": "off",
"max-statements": "off",
"max-nested-callbacks": ["error", 2],
"react/prefer-stateless-function": ["error"],
"react/prop-types": [
"warn",
Expand Down Expand Up @@ -259,7 +256,6 @@
"*.test.tsx"
],
"rules": {
"max-nested-callbacks": "off",
"react/display-name": "off",
"camelcase": "off"
}
Expand Down
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ We are using the [Testing Library](https://testing-library.com/docs/react-testin

will lint the whole project.

We have some extra rules to keep the code more maintainable:

- Complexity of max 5 per function: to prevent functions with a lot of of different outcome
- 10 max statements per function: to prevent a function doing too much
- 2 level of nested callbacks: to prevent complexity within nested functions
- Mandatory prop-types: as we don't have a Type system, this rule will help us have documented components

## Build the application for production

```bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable max-nested-callbacks */
import {
createColumnHelper,
flexRender,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable max-nested-callbacks */
import {
createColumnHelper,
flexRender,
Expand Down
1 change: 0 additions & 1 deletion src/ui/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ const Trigger = React.forwardRef<
React.useEffect(() => {
if (!isOpen) {
setWasJustClosed(true)
// eslint-disable-next-line max-nested-callbacks
setTimeout(() => {
ref.current?.blur()
setWasJustClosed(false)
Expand Down
Loading