-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
35 lines (34 loc) · 1 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
import stylistic from '@stylistic/eslint-plugin'
import tsParser from '@typescript-eslint/parser'
import ts from '@typescript-eslint/eslint-plugin'
import js from '@eslint/js'
import globals from 'globals'
/** @type {import('eslint').Linter.FlatConfig[]} */
export default [
{ files: ['src/**/*.ts', 'eslint.config.js'], ...js.configs.recommended },
{ files: ['src/**/*.ts', 'eslint.config.js'], ...stylistic.configs['recommended-flat'] },
{ files: ['src/**/*.ts', 'eslint.config.js'],
languageOptions: {
globals: {
...globals.node,
},
parser: tsParser,
parserOptions: {
config: './tsconfig.json',
ecmaFeatures: { modules: true },
ecmaVersion: 'latest',
sourceType: 'module',
},
},
plugins: {
'@typescript-eslint': ts,
ts,
},
rules: {
...ts.configs['eslint-recommended'].rules,
...ts.configs['recommended'].rules,
'@stylistic/max-len': ['error', { code: 120 }],
'no-var': 'error',
},
},
]