-
-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy patheslint.config.js
More file actions
78 lines (76 loc) · 1.97 KB
/
Copy patheslint.config.js
File metadata and controls
78 lines (76 loc) · 1.97 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// @ts-check
import base from '@1stg/eslint-config';
import nodeDependencies from 'eslint-plugin-node-dependencies';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default tseslint.config(
...base,
...nodeDependencies.configs['flat/recommended'],
{
ignores: [
'coverage',
'dist',
'test/fixtures',
'!test/fixtures/paths/node_modules/**/*.js',
],
},
{
plugins: {
'@typescript-eslint': tseslint.plugin,
},
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
'prettier/prettier': 'off',
'valid-jsdoc': 'off',
'max-len': 'off',
'space-before-function-paren': [
'error',
{
anonymous: 'never',
named: 'never',
asyncArrow: 'always',
},
],
'import/no-import-module-exports': 'off',
'arrow-parens': ['error', 'as-needed'],
'sonarjs/fixme-tag': 'warn',
'sonarjs/function-return-type': 'off',
'sonarjs/todo-tag': 'warn',
quotes: ['error', 'single', { avoidEscape: true }],
},
},
{
files: ['__mocks__/**/*.ts', '**/*.spec.ts'],
languageOptions: {
globals: globals.vitest,
},
rules: {
'@typescript-eslint/no-magic-numbers': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/prefer-promise-reject-errors': 'off',
'@typescript-eslint/require-await': 'off',
'no-magic-numbers': 'off',
'sonarjs/slow-regex': 'off',
'unicorn-x/no-useless-undefined': 'off',
'@typescript-eslint/unbound-method': 'off',
},
},
{
files: ['**/*.d.ts'],
rules: {
'@typescript-eslint/prefer-function-type': 'off',
'no-unused-vars': 'off',
},
},
{
files: ['src/index.ts'],
rules: {
'n/hashbang': 'off',
},
},
);