You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: support flat config format default for ESLint 9 (#277)
* feat: export FlatConfig to support ESLint v9
* refactor: add backwards compatibility for ESLint < 9 and extract common configuration code
* chore: updated README.md
* fix: adjust plugin flowtype in node.factory.js to work with flat config properly
* fix(test): created configuration for tests to be run both with ESLint v8 & v9
* fix: maintain previous order of plugins in final configuration
* fix: bring back compatibility with any jest version in test package
* refactor: export named functions from .factory.js source files
Copy file name to clipboardExpand all lines: README.md
+108-2
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# @callstack/eslint-config
2
2
3
-
Callstack ESLint config for React Native, React and Node.js projects, utilizing Flow, TypeScript, Prettier and Jest with sensible defaults.
3
+
Callstack ESLint config for React Native, React and Node.js projects, utilizing Flow, TypeScript, Prettier and Jest with sensible defaults. Supports both eslintrc and flat config.
You can choose one of the following environments to work with by extending your ESLint config (`.eslintrc`, or `eslintConfig` field in `package.json`) with `@callstack` config tailored to your project.
21
+
You can choose one of the following environments to work with by extending your ESLint config (`eslint.config.mjs` for flat config, or `.eslintrc` / `eslintConfig` field in `package.json` for the eslintrc config style) with `@callstack` config tailored to your project.
22
22
23
23
### React Native config
24
24
25
25
Usage:
26
26
27
+
#### eslintrc format (ESLint < v9)
28
+
27
29
```json
28
30
{
29
31
"extends": "@callstack"
30
32
}
31
33
```
32
34
35
+
#### flat config format (`eslint.config.mjs`, ESLint 9+)
TypeScript is supported out-of-the-box, including importing JS files from TS files and vice-versa. All you need to do is to make sure you have [`typescript`](https://yarnpkg.com/en/package/typescript) module installed.
0 commit comments