Migrate internal ESLint rules to ESM (#17123)

This commit is contained in:
fisker Cheung authored and GitHub committed 2025-02-16 15:36:06 +08:00
1 parent 150e92fe45
commit b72a37c51e
23 files changed
+82 -161

No files matched your search

@@ -1,6 +1,5 @@
"use strict";
import { findVariable } from "@eslint-community/eslint-utils";
const { findVariable } = require("@eslint-community/eslint-utils");
const ERROR = "error";
const SUGGESTION = "suggestion";
const selector = [
@@ -12,12 +11,9 @@ const selector = [
].join(", ")})`,
].join("");
module.exports = {
export default {
meta: {
type: "suggestion",
docs: {
url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/no-identifier-n.js",
},
messages: {
[ERROR]: "Please rename variable 'n'.",
[SUGGESTION]: "Rename to `node`.",