38 lines
626 B
JavaScript
38 lines
626 B
JavaScript
import js from '@eslint/js'
|
|
import ts from 'typescript-eslint'
|
|
import prettier from 'eslint-config-prettier'
|
|
import globals from 'globals'
|
|
|
|
/** @type {import('eslint').Linter.Config[]} */
|
|
export default [
|
|
js.configs.recommended,
|
|
...ts.configs.recommended,
|
|
prettier,
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.node
|
|
}
|
|
}
|
|
},
|
|
{
|
|
files: ['**/*.ts', '**/*.tsx'],
|
|
languageOptions: {
|
|
parserOptions: {
|
|
parser: ts.parser
|
|
}
|
|
}
|
|
},
|
|
{
|
|
rules: {
|
|
'@typescript-eslint/consistent-type-imports': [
|
|
'error',
|
|
{
|
|
prefer: 'type-imports',
|
|
fixStyle: 'separate-type-imports'
|
|
}
|
|
]
|
|
}
|
|
},
|
|
]
|