-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
28 lines (27 loc) · 986 Bytes
/
eslint.config.mjs
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
// @ts-check
// Allows us to bring in the recommended core rules from eslint itself
import js from "@eslint/js";
// Allows us to use the typed utility for our config, and to bring in the recommended rules for TypeScript projects from typescript-eslint
import { config, configs } from 'typescript-eslint';
// Export our config array, which is composed together thanks to the typed utility function from typescript-eslint
export default config(
{ ignores: [ 'coverage/**' ] },
{
// Everything in this config object targets our TypeScript files
files: [ '**/*.ts' ],
extends: [
// Apply the recommended core rules
js.configs.recommended,
// Apply the recommended TypeScript rules
...configs.recommended,
// Optionally apply stylistic rules from typescript-eslint that improve code consistency
...configs.stylistic
]
},
{
files: [ '**/*.spec.ts' ],
rules: {
'@typescript-eslint/no-explicit-any': 'off'
}
}
);