Skip to content

Commit

Permalink
docs: add compat.extends example with plugin config (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic authored Nov 3, 2024
1 parent 3e3b80a commit 2b0aa3a
Showing 1 changed file with 6 additions and 6 deletions.
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

0 comments on commit 2b0aa3a

Please sign in to comment.