]> git.proxmox.com Git - pve-eslint.git/blob - eslint/lib/config/default-config.js
import 8.23.1 source
[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 parsers: {
23 espree: require("espree")
24 },
25
26 /*
27 * Because we try to delay loading rules until absolutely
28 * necessary, a proxy allows us to hook into the lazy-loading
29 * aspect of the rules map while still keeping all of the
30 * relevant configuration inside of the config array.
31 */
32 rules: new Proxy({}, {
33 get(target, property) {
34 return Rules.get(property);
35 },
36
37 has(target, property) {
38 return Rules.has(property);
39 }
40 })
41 }
42 },
43 languageOptions: {
44 sourceType: "module",
45 ecmaVersion: "latest",
46 parser: "@/espree",
47 parserOptions: {}
48 }
49 },
50
51 // default ignores are listed here
52 {
53 ignores: [
54 "**/node_modules/**",
55 ".git/**"
56 ]
57 },
58
59 // intentionally empty config to ensure these files are globbed by default
60 {
61 files: ["**/*.js", "**/*.mjs"]
62 },
63 {
64 files: ["**/*.cjs"],
65 languageOptions: {
66 sourceType: "commonjs",
67 ecmaVersion: "latest"
68 }
69 }
70 ];