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

docs: add compat.extends example with plugin config #173

Merged
merged 1 commit into from
Nov 3, 2024
Merged
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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const compat = new FlatCompat({
export default [

// mimic ESLintRC-style extends
...compat.extends("standard", "example"),
...compat.extends("standard", "example", "plugin:react/recommended"),

// mimic environments
...compat.env({
Expand All @@ -49,11 +49,11 @@ export default [
}),

// mimic plugins
...compat.plugins("airbnb", "react"),
...compat.plugins("jsx-a11y", "react"),

// translate an entire config
...compat.config({
plugins: ["airbnb", "react"],
plugins: ["jsx-a11y", "react"],
extends: "standard",
env: {
es2020: true,
Expand Down Expand Up @@ -84,7 +84,7 @@ const compat = new FlatCompat({
module.exports = [

// mimic ESLintRC-style extends
...compat.extends("standard", "example"),
...compat.extends("standard", "example", "plugin:react/recommended"),

// mimic environments
...compat.env({
Expand All @@ -93,11 +93,11 @@ module.exports = [
}),

// mimic plugins
...compat.plugins("airbnb", "react"),
...compat.plugins("jsx-a11y", "react"),

// translate an entire config
...compat.config({
plugins: ["airbnb", "react"],
plugins: ["jsx-a11y", "react"],
extends: "standard",
env: {
es2020: true,
Expand Down