-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy patheslint.config.js
More file actions
33 lines (32 loc) · 806 Bytes
/
Copy patheslint.config.js
File metadata and controls
33 lines (32 loc) · 806 Bytes
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
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintConfigPrettier from 'eslint-config-prettier';
import globals from 'globals';
export default tseslint.config(
{ ignores: ['dist/**'] },
js.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
globals: globals.node,
},
},
{
files: ['tests/**/*.js'],
languageOptions: {
globals: {
...globals.node,
...globals.mocha,
},
},
},
eslintConfigPrettier,
{
// eslint-config-prettier turns "curly" off (it's not a formatting rule,
// but it can interact with how Prettier prints the block); re-enable it
// explicitly so every if/else/for/while body is always braced.
rules: {
curly: ['error', 'all'],
},
},
);