-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔨 [#582] Replace ESLint config with flat config
CRA ships with a default ESLint config, which is overridden in the project to disable some bits. ESLint is moving towards flat config, and CRA (unmaintained) is not compatible with it, so we set up our own flows. The envvar disables the CRA integration in react-scripts, as it does not pick up the new config file. The pre-commit checks and CI pipeline ensure that code is properly linted before being committed. We also use the shared config from Maykin for consistency across projects.
- Loading branch information
1 parent
b6c5ed0
commit 47e0f6c
Showing
7 changed files
with
1,274 additions
and
482 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DISABLE_ESLINT_PLUGIN=true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ignoreBuildArtifacts } from "@maykinmedia/eslint-config"; | ||
import recommended from "@maykinmedia/eslint-config/recommended"; | ||
|
||
const config = [ | ||
ignoreBuildArtifacts(["build", "storybook-static"]), | ||
...recommended, | ||
{ | ||
name: "project/react-hooks/disable-exhaustive-deps", | ||
rules: { | ||
"react-hooks/exhaustive-deps": "off", | ||
}, | ||
}, | ||
]; | ||
|
||
export default config; |
Oops, something went wrong.