Skip to content
Closed
Changes from 1 commit
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: 12 additions & 0 deletions eslint-plugin-prettier.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,18 @@ const eslintPluginPrettier = {
'prefer-arrow-callback': 'off',
},
},
'flat/recommended': {
plugins: {
get prettier() {
return eslintPluginPrettier
}
},
rules: {
'prettier/prettier': 'error',
'arrow-body-style': 'off',
'prefer-arrow-callback': 'off',
},
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix Prettier violations: add missing semicolon and trailing commas in flat config.

These style errors will fail linting. Add the semicolon after the return and commas where indicated.

     'flat/recommended': {
       plugins: {
         get prettier() {
-          return eslintPluginPrettier
-        }
+          return eslintPluginPrettier;
+        },
       },
       rules: {
         'prettier/prettier': 'error',
         'arrow-body-style': 'off',
         'prefer-arrow-callback': 'off',
       },
-    }
+    },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'flat/recommended': {
plugins: {
get prettier() {
return eslintPluginPrettier
}
},
rules: {
'prettier/prettier': 'error',
'arrow-body-style': 'off',
'prefer-arrow-callback': 'off',
},
}
'flat/recommended': {
plugins: {
get prettier() {
return eslintPluginPrettier;
},
},
rules: {
'prettier/prettier': 'error',
'arrow-body-style': 'off',
'prefer-arrow-callback': 'off',
},
},
🧰 Tools
🪛 ESLint

[error] 146-146: Insert ;

(prettier/prettier)


[error] 147-147: Insert ,

(prettier/prettier)


[error] 154-154: Insert ,

(prettier/prettier)

🤖 Prompt for AI Agents
In eslint-plugin-prettier.js around lines 143 to 154, the flat/recommended
config is missing a semicolon after the getter's return and missing trailing
commas in the object literals; fix by adding a semicolon after "return
eslintPluginPrettier;" inside the getter, and add the necessary trailing commas
after the plugins getter block, after the rules object entries (and after the
flat/recommended object entry) so the file conforms to Prettier rules.

},
rules: {
prettier: {
Expand Down