]> git.proxmox.com Git - pve-eslint.git/blob - eslint/lib/config/default-config.js
8a6ff820057de81dcde5b332a952a52389b2d28d
[pve-eslint.git] / eslint / lib / config / default-config.js
1 /**
2 * @fileoverview Default configuration
3 * @author Nicholas C. Zakas
4 */
5
6 "use strict";
7
8 //-----------------------------------------------------------------------------
9 // Requirements
10 //-----------------------------------------------------------------------------
11
12 const Rules = require("../rules");
13
14 //-----------------------------------------------------------------------------
15 // Helpers
16 //-----------------------------------------------------------------------------
17
18 exports.defaultConfig = [
19 {
20 plugins: {
21 "@": {
22
23 /*
24 * Because we try to delay loading rules until absolutely
25 * necessary, a proxy allows us to hook into the lazy-loading
26 * aspect of the rules map while still keeping all of the
27 * relevant configuration inside of the config array.
28 */
29 rules: new Proxy({}, {
30 get(target, property) {
31 return Rules.get(property);
32 },
33
34 has(target, property) {
35 return Rules.has(property);
36 }
37 })
38 }
39 },
40 languageOptions: {
41 sourceType: "module",
42 ecmaVersion: "latest",
43 parser: require("espree"),
44 parserOptions: {}
45 }
46 },
47
48 // default ignores are listed here
49 {
50 ignores: [
51 "**/node_modules/",
52 ".git/"
53 ]
54 },
55
56 // intentionally empty config to ensure these files are globbed by default
57 {
58 files: ["**/*.js", "**/*.mjs"]
59 },
60 {
61 files: ["**/*.cjs"],
62 languageOptions: {
63 sourceType: "commonjs",
64 ecmaVersion: "latest"
65 }
66 }
67 ];