-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
eslint.config.js
34 lines (29 loc) · 859 Bytes
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import js from "@eslint/js";
import ts_eslint from "typescript-eslint";
/** @type {import('eslint').Linter.FlatConfig[]} */
const GLOBAL_RULES = [
{
ignores: [
"**/.*", // hidden files
],
},
];
/** @type {import('eslint').Linter.FlatConfig[]} */
const LANGUAGE_CONFIGS = [
// Configuration presets scoped to just languages
js.configs.recommended,
...ts_eslint.configs.recommended,
];
/** @type {import('eslint').Linter.FlatConfig[]} */
const LIBRARY_CONFIGS = [];
/** @type {import('eslint').Linter.FlatConfig[]} */
const DIRECTORY_CONFIGS = [];
/** @type {import('eslint').Linter.FlatConfig[]} */
const result = [
// Order-sensitive. Later configs merge configs with earlier ones, but take precedence in case of.
...GLOBAL_RULES,
...LANGUAGE_CONFIGS,
...LIBRARY_CONFIGS,
...DIRECTORY_CONFIGS,
];
export default result;