34 lines
904 B
TypeScript
34 lines
904 B
TypeScript
import js from '@eslint/js'
|
|
import globals from 'globals'
|
|
import tseslint from 'typescript-eslint'
|
|
import stylistic from '@stylistic/eslint-plugin'
|
|
import { defineConfig } from 'eslint/config'
|
|
|
|
export default defineConfig([
|
|
{
|
|
files: ['**/*.ts'],
|
|
plugins: { js, stylistic },
|
|
extends: ['js/recommended'],
|
|
languageOptions: { globals: globals.node },
|
|
},
|
|
tseslint.configs.recommended,
|
|
tseslint.configs.stylistic,
|
|
stylistic.configs.customize({
|
|
indent: 2,
|
|
quotes: 'single',
|
|
semi: false,
|
|
arrowParens: true,
|
|
braceStyle: '1tbs',
|
|
// 'linebreakStyle': ['error', 'unix'],
|
|
// 'keyword-spacing': ['error', { before: true, after: true }],
|
|
}),
|
|
{
|
|
files: ['tests/**/*.test.ts'],
|
|
rules: {
|
|
'@typescript-eslint/no-unused-vars': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/no-empty-function': 'off',
|
|
},
|
|
},
|
|
])
|