Skip to content

Commit

Permalink
Eslint 9 flat config - fix config name (#3947)
Browse files Browse the repository at this point in the history
  • Loading branch information
dartess authored Oct 21, 2024
1 parent 9a3432a commit 88aa108
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/weak-rivers-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"eslint-plugin-mobx": patch
---

fix config name for recommended flat config
14 changes: 7 additions & 7 deletions packages/eslint-plugin-mobx/src/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"use strict"

const fs = require("fs");
const path = require("path");
const fs = require("fs")
const path = require("path")

const exhaustiveMakeObservable = require("./exhaustive-make-observable.js")
const unconditionalMakeObservable = require("./unconditional-make-observable.js")
const missingMakeObservable = require("./missing-make-observable.js")
const missingObserver = require("./missing-observer")
const noAnonymousObserver = require("./no-anonymous-observer.js")

const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf8"));
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf8"))

const pluginMobx = {
meta: {
Expand All @@ -23,7 +23,7 @@ const pluginMobx = {
"missing-observer": missingObserver,
"no-anonymous-observer": noAnonymousObserver
}
};
}

const recommendedRules = {
"mobx/exhaustive-make-observable": "warn",
Expand All @@ -37,13 +37,13 @@ module.exports = {
configs: {
recommended: {
plugins: ["mobx"],
rules: recommendedRules,
rules: recommendedRules
}
},
flatConfigs: {
recommended: {
name: "react-hooks/recommended",
plugins: { "mobx": pluginMobx },
name: "mobx/recommended",
plugins: { mobx: pluginMobx },
rules: recommendedRules
}
}
Expand Down

0 comments on commit 88aa108

Please sign in to comment.