-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
43 lines (42 loc) · 1.09 KB
/
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
35
36
37
38
39
40
41
42
43
import eslint from '@eslint/js'
import tseslint from 'typescript-eslint'
import prettier from 'eslint-config-prettier'
import functional from 'eslint-plugin-functional'
import globals from 'globals'
export default tseslint.config(
{
files: ['**/*.{ts,tsx,mts}'],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
functional.configs.recommended,
prettier,
],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
projectService: true,
},
globals: { ...globals.browser, ...globals.node },
},
rules: {
'functional/prefer-immutable-types': 'warn',
'no-unused-vars': 'off',
'functional/functional-parameters': 'warn',
'functional/no-expression-statements': [
'error',
{
ignoreCodePattern: ['^console.'],
},
],
},
},
{
files: ['**/*.test.ts', '**/*.{js,mjs,cjs}'],
extends: [functional.configs.off],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
{ ignores: ['dist', '.yarn', '.astro', '*.d.ts'] },
)