-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from hildjj/flat-modules
Flat modules
- Loading branch information
Showing
16 changed files
with
1,892 additions
and
12 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
"use strict"; | ||
|
||
module.exports = [ | ||
{ | ||
ignores: [ | ||
"node_modules/**", | ||
"test/**", | ||
], | ||
}, | ||
require("./flat/js"), | ||
require("./flat/cjs"), | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
"use strict"; | ||
|
||
// Use module.js before this, which has most of the config. This just | ||
// overrides sourceType for .cjs files. | ||
module.exports = { | ||
files: ["**/*.cjs"], | ||
languageOptions: { | ||
sourceType: "commonjs", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"use strict"; | ||
|
||
module.exports = require("globals"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"use strict"; | ||
|
||
const globals = require("globals"); | ||
const { rules } = require("../rules/js.js"); | ||
|
||
module.exports = { | ||
files: ["**/*.js", "**/*.cjs", "**/*.mjs", "**/*.ts"], | ||
plugins: { | ||
"@stylistic": require("@stylistic/eslint-plugin"), | ||
}, | ||
languageOptions: { | ||
globals: globals["shared-node-browser"], | ||
ecmaVersion: 2020, | ||
sourceType: "module", | ||
}, | ||
rules, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import cjs from "@peggyjs/eslint-config/flat/cjs.js"; | ||
import module from "@peggyjs/eslint-config/flat/module.js"; | ||
import ts from "@peggyjs/eslint-config/flat/ts.js"; | ||
|
||
export default [ | ||
module, | ||
cjs, | ||
ts, | ||
]; |
Oops, something went wrong.