mirror of https://github.com/iptv-org/iptv
Update eslint.config.mjs
parent
e68db91344
commit
f0f3297572
@ -1,56 +1,56 @@
|
|||||||
import typescriptEslint from '@typescript-eslint/eslint-plugin'
|
import typescriptEslint from '@typescript-eslint/eslint-plugin'
|
||||||
import globals from 'globals'
|
import stylistic from '@stylistic/eslint-plugin'
|
||||||
import tsParser from '@typescript-eslint/parser'
|
import tsParser from '@typescript-eslint/parser'
|
||||||
import path from 'node:path'
|
import { FlatCompat } from '@eslint/eslintrc'
|
||||||
import { fileURLToPath } from 'node:url'
|
import { fileURLToPath } from 'node:url'
|
||||||
import js from '@eslint/js'
|
import globals from 'globals'
|
||||||
import stylistic from '@stylistic/eslint-plugin'
|
import path from 'node:path'
|
||||||
import { FlatCompat } from '@eslint/eslintrc'
|
import js from '@eslint/js'
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url)
|
const __filename = fileURLToPath(import.meta.url)
|
||||||
const __dirname = path.dirname(__filename)
|
const __dirname = path.dirname(__filename)
|
||||||
const compat = new FlatCompat({
|
const compat = new FlatCompat({
|
||||||
baseDirectory: __dirname,
|
baseDirectory: __dirname,
|
||||||
recommendedConfig: js.configs.recommended,
|
recommendedConfig: js.configs.recommended,
|
||||||
allConfig: js.configs.all
|
allConfig: js.configs.all
|
||||||
})
|
})
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended'),
|
...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended'),
|
||||||
{
|
{
|
||||||
plugins: {
|
plugins: {
|
||||||
'@typescript-eslint': typescriptEslint,
|
'@typescript-eslint': typescriptEslint,
|
||||||
'@stylistic': stylistic
|
'@stylistic': stylistic
|
||||||
},
|
},
|
||||||
|
|
||||||
languageOptions: {
|
languageOptions: {
|
||||||
globals: {
|
globals: {
|
||||||
...globals.browser
|
...globals.browser
|
||||||
},
|
},
|
||||||
|
|
||||||
parser: tsParser,
|
parser: tsParser,
|
||||||
ecmaVersion: 'latest',
|
ecmaVersion: 'latest',
|
||||||
sourceType: 'module'
|
sourceType: 'module'
|
||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
'no-case-declarations': 'off',
|
'no-case-declarations': 'off',
|
||||||
|
|
||||||
indent: [
|
indent: [
|
||||||
'error',
|
'error',
|
||||||
2,
|
2,
|
||||||
{
|
{
|
||||||
SwitchCase: 1
|
SwitchCase: 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
'@stylistic/linebreak-style': ['error', 'windows'],
|
'@stylistic/linebreak-style': ['error', 'windows'],
|
||||||
quotes: ['error', 'single'],
|
quotes: ['error', 'single'],
|
||||||
semi: ['error', 'never']
|
semi: ['error', 'never']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
ignores: ['tests/__data__/**']
|
ignores: ['tests/__data__/**']
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
Reference in New Issue