Skip to content

Commit

Permalink
feat: add mixed-esm-and-cjs config for eslint.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
aladdin-add committed Aug 22, 2023
1 parent fff9ae0 commit aa45c93
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions configs/mixed-esm-and-cjs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* @fileoverview the `mixed-esm-and-cjs` config for `eslint.config.js`
* @author 唯然<weiran.zsd@outlook.com>
*/

"use strict"

const recommendedConfig = require("./recommended.js")
const esmConfig = require("./recommended-module.js")
const cjsConfig = require("./recommended-script.js")

module.exports = [
{
files: ["**/*.js"],
recommendedConfig,
},
{
files: ["**/*.mjs"],
esmConfig,
},
{
files: ["**/*.cjs"],
cjsConfig,
},
]

0 comments on commit aa45c93

Please sign in to comment.