Files
iptv/eslint.config.mjs

55 lines
1.1 KiB
JavaScript
Raw Normal View History

2025-07-29 03:53:52 +03:00
import typescriptEslint from '@typescript-eslint/eslint-plugin'
import globals from 'globals'
import tsParser from '@typescript-eslint/parser'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'
2025-02-22 13:28:59 +03:00
2025-07-29 03:53:52 +03:00
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
2025-02-22 13:28:59 +03:00
const compat = new FlatCompat({
2025-07-29 03:53:52 +03:00
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
})
2025-02-22 13:28:59 +03:00
export default [
2025-07-29 03:53:52 +03:00
...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended'),
{
plugins: {
'@typescript-eslint': typescriptEslint
},
2025-02-22 13:28:59 +03:00
2025-07-29 03:53:52 +03:00
languageOptions: {
globals: {
...globals.browser
},
2025-02-22 13:28:59 +03:00
2025-07-29 03:53:52 +03:00
parser: tsParser,
ecmaVersion: 'latest',
sourceType: 'module'
},
2025-02-22 13:28:59 +03:00
2025-07-29 03:53:52 +03:00
rules: {
'no-case-declarations': 'off',
2025-02-22 13:28:59 +03:00
2025-07-29 03:53:52 +03:00
indent: [
'error',
2,
{
SwitchCase: 1
}
],
2025-02-22 13:28:59 +03:00
2025-07-29 03:53:52 +03:00
'linebreak-style': ['error', 'windows'],
quotes: ['error', 'single'],
semi: ['error', 'never']
}
2025-07-29 04:28:41 +03:00
},
{
ignores: ['tests/__data__/**']
2025-07-29 03:53:52 +03:00
}
]