首先项目被创建为 ES module。因为在 package.json,中 type: module,所有 .js 文件声明为 ES 模块 。
eslint.js, prettier.js 被默认为使用了 ES module 规范,因为是.js 文件。
eslint.js, prettier.js 重命名为以 .cjs 结尾 会告诉 node.js 它使用了 CommonJS 规范。 就将 "type": "commonjs",package.json 将所有 .js 文件视为 CommonJS