-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
35 lines (32 loc) · 1.2 KB
/
Copy patheslint.config.js
File metadata and controls
35 lines (32 loc) · 1.2 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
import config from '@sozdev/eslint-config'
import eslintPluginStylisticTs from '@stylistic/eslint-plugin-ts'
/** @type {import('eslint').Linter.FlatConfig} */
const schema = [
...config,
{
plugins: {
'@stylistic/ts': eslintPluginStylisticTs,
},
rules: {
// General
'eslint-comments/no-unlimited-disable': 'off',
'no-console': ['warn', { allow: ['warn', 'error'] }],
'no-unused-vars': ['warn', { args: 'none' }],
'no-param-reassign': ['error', { props: false }],
// 'no-underscore-dangle': ['error', { allow: ['_id', '_count'] }],
// 'no-shadow': ['error', { allow: ['_id', '_count'] }],
'no-unused-expressions': ['error', { allowShortCircuit: true }],
'no-shadow-restricted-names': ['error'],
// Stylistic
'curly': ['error', 'all'],
'brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
'newline-before-return': ['error'],
'newline-per-chained-call': ['error', { ignoreChainWithDepth: 2 }],
'multiline-ternary': ['error', 'always'],
// 'brace-style': ['error', '1tbs'],
'arrow-body-style': ['error', 'as-needed'],
'eqeqeq': ['error', 'always'],
},
},
]
export default schema