Urara-Blog/node_modules/.pnpm-store/v3/files/27/38cb1d61a7ebb2a34ef5fc11325e470dced124cc78003497caf6e2d81fcbcc853330100c0d742b2117e1c32ed1470fd4f750dfcc3bd31401717dca182347c4
2022-08-14 01:14:53 +08:00

70 lines
1.8 KiB
Text

/**
* @fileoverview Default configuration
* @author Nicholas C. Zakas
*/
"use strict";
//-----------------------------------------------------------------------------
// Requirements
//-----------------------------------------------------------------------------
const Rules = require("../rules");
//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------
exports.defaultConfig = [
{
plugins: {
"@": {
parsers: {
espree: require("espree")
},
/*
* Because we try to delay loading rules until absolutely
* necessary, a proxy allows us to hook into the lazy-loading
* aspect of the rules map while still keeping all of the
* relevant configuration inside of the config array.
*/
rules: new Proxy({}, {
get(target, property) {
return Rules.get(property);
},
has(target, property) {
return Rules.has(property);
}
})
}
},
languageOptions: {
sourceType: "module",
ecmaVersion: "latest",
parser: "@/espree",
parserOptions: {}
}
},
// default ignores are listed here
{
ignores: [
"**/node_modules/**",
".git/**"
]
},
// intentionally empty config to ensure these files are globbed by default
{
files: ["**/*.js", "**/*.mjs"]
},
{
files: ["**/*.cjs"],
languageOptions: {
sourceType: "commonjs",
ecmaVersion: "latest"
}
}
];