-
-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Copy patheslint.config.mjs
28 lines (27 loc) · 933 Bytes
/
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
import globals from 'globals'
import pluginJs from '@eslint/js'
import tseslint from 'typescript-eslint'
import mocha from 'eslint-plugin-mocha'
import stylistic from '@stylistic/eslint-plugin'
/** @type {import('eslint').Linter.Config[]} */
export default [
{
ignores: ['**/dist/', '**/*.js'],
},
{ languageOptions: { globals: globals.node } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
mocha.configs['flat'].recommended,
stylistic.configs['recommended-flat'],
{
rules: {
'mocha/no-mocha-arrows': 'off',
'mocha/no-setup-in-describe': 'off',
'mocha/no-exclusive-tests': 'error',
'@stylistic/arrow-parens': ['error', 'as-needed'],
'@stylistic/brace-style': ['error', '1tbs', { allowSingleLine: true }],
'@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
'object-shorthand': ['error', 'always', { avoidQuotes: true }],
},
},
]