-
Notifications
You must be signed in to change notification settings - Fork 6
/
eslint.config.js
38 lines (37 loc) · 1.49 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
import globals from 'globals'
import eslint from '@eslint/js'
import tseslint from 'typescript-eslint'
import eslintPluginJest from 'eslint-plugin-jest'
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
eslintPluginJest.configs['flat/recommended'],
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.browser,
...globals.node,
},
},
rules: {
'comma-spacing': ['error', { 'before': false, 'after': true }],
'comma-style': ['error', 'last'],
'func-call-spacing': ['error', 'never'],
'key-spacing': ['error', { 'mode': 'minimum', 'beforeColon': false, 'afterColon': true }],
'keyword-spacing': ['error', { 'before': true, 'after': true }],
'linebreak-style': ['error', 'unix'],
'lines-between-class-members': ['error', 'always'],
'no-console': ['warn', { 'allow': ['warn'] }],
'no-empty-function': 'error',
'no-multiple-empty-lines': ['error', { 'max': 2 }],
'no-var': 'error',
'quotes': ['error', 'single'],
'semi': ['error', 'never'],
'svelte/no-at-html-tags': 'off',
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': ['error', { 'named': 'never', 'anonymous': 'always', 'asyncArrow': 'always' }],
},
}
)