-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
54 lines (52 loc) · 1.58 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import { FlatCompat } from '@eslint/eslintrc';
const compat = new FlatCompat();
export default tseslint.config(
eslint.configs.recommended,
...compat.extends('plugin:import/recommended'),
...compat.extends('plugin:unicorn/recommended'),
...tseslint.configs.recommended,
{
ignores: [
'dist/**',
'package-e2e/**',
'scripts/**',
'*.{js,json,mjs}'
],
},
{
rules: {
'quotes': ['error', 'single', {'avoidEscape': true}],
'import/no-unresolved': 'off',
'import/order': ['error', {
'newlines-between': 'always'
}],
'import/no-extraneous-dependencies': 'error',
'unicorn/consistent-function-scoping': 'off',
'unicorn/filename-case': 'off',
'unicorn/no-array-callback-reference': 'off',
'unicorn/no-for-loop': 'off',
'unicorn/no-null': 'off',
'unicorn/prefer-module': 'off',
'unicorn/no-nested-ternary': 'off',
'unicorn/prevent-abbreviations': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
'argsIgnorePattern': '^_'
}
],
'@typescript-eslint/triple-slash-reference': 'off',
},
},
{
files: ['**/*.test.ts', '**/__tests__/**/*'],
rules: {
'@typescript-eslint/no-unused-expressions': 'off', // Allow Chai assertions like `expect(foo).to.be.true`
},
},
);