mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-09 17:51:46 +00:00
fix tests
This commit is contained in:
@ -18,51 +18,89 @@ export default tsEslint.config(
|
||||
{
|
||||
plugins: {
|
||||
stylistic,
|
||||
importPlugin
|
||||
importPlugin,
|
||||
},
|
||||
languageOptions: {
|
||||
parser: tsEslint.parser,
|
||||
parserOptions: {
|
||||
project: true,
|
||||
project: ['tsconfig.json', 'tsconfig.test.json'],
|
||||
sourceType: 'module',
|
||||
ecmaVersion: 'latest'
|
||||
}
|
||||
ecmaVersion: 'latest',
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'stylistic/arrow-parens': ['error', 'always'],
|
||||
'stylistic/object-curly-spacing': ['error', 'always'],
|
||||
'stylistic/jsx-pascal-case': 'error',
|
||||
'stylistic/jsx-curly-spacing': ['error', { when: 'never', children: true }],
|
||||
'stylistic/jsx-curly-spacing': [
|
||||
'error',
|
||||
{ when: 'never', children: true },
|
||||
],
|
||||
'stylistic/jsx-sort-props': 'error',
|
||||
'prettier/prettier': ['error', { singleQuote: true, semi: true, tabWidth: 2, trailingComma: 'all', quoteProps: 'preserve' }],
|
||||
'prettier/prettier': [
|
||||
'error',
|
||||
{
|
||||
singleQuote: true,
|
||||
semi: true,
|
||||
tabWidth: 2,
|
||||
trailingComma: 'all',
|
||||
quoteProps: 'preserve',
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-floating-promises': 'off',
|
||||
'@typescript-eslint/no-misused-promises': ['off', { checksVoidReturn: false }],
|
||||
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
||||
'@typescript-eslint/no-misused-promises': [
|
||||
'off',
|
||||
{ checksVoidReturn: false },
|
||||
],
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'warn',
|
||||
{ argsIgnorePattern: '^_' },
|
||||
],
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'@typescript-eslint/consistent-type-imports': ['error', {
|
||||
fixStyle: 'inline-type-imports',
|
||||
prefer: 'type-imports',
|
||||
disallowTypeAnnotations: false,
|
||||
}],
|
||||
'@typescript-eslint/consistent-type-imports': [
|
||||
'error',
|
||||
{
|
||||
fixStyle: 'inline-type-imports',
|
||||
prefer: 'type-imports',
|
||||
disallowTypeAnnotations: false,
|
||||
},
|
||||
],
|
||||
'importPlugin/first': 'error',
|
||||
'importPlugin/newline-after-import': 'off',
|
||||
'importPlugin/no-default-export': 'off',
|
||||
'importPlugin/no-duplicates': 'error',
|
||||
'importPlugin/no-unresolved': ['error', { ignore: ['^virtual:', '\\?inline$', '\\?raw$', '\\?asset&asarUnpack'] }],
|
||||
'importPlugin/order': ['error', {
|
||||
'groups': ['builtin', 'external', ['internal', 'index', 'sibling'], 'parent', 'type'],
|
||||
'newlines-between': 'always-and-inside-groups',
|
||||
'alphabetize': { order: 'ignore', caseInsensitive: false }
|
||||
}],
|
||||
'importPlugin/no-unresolved': [
|
||||
'error',
|
||||
{
|
||||
ignore: ['^virtual:', '\\?inline$', '\\?raw$', '\\?asset&asarUnpack'],
|
||||
},
|
||||
],
|
||||
'importPlugin/order': [
|
||||
'error',
|
||||
{
|
||||
'groups': [
|
||||
'builtin',
|
||||
'external',
|
||||
['internal', 'index', 'sibling'],
|
||||
'parent',
|
||||
'type',
|
||||
],
|
||||
'newlines-between': 'always-and-inside-groups',
|
||||
'alphabetize': { order: 'ignore', caseInsensitive: false },
|
||||
},
|
||||
],
|
||||
'importPlugin/prefer-default-export': 'off',
|
||||
'camelcase': ['error', { properties: 'never' }],
|
||||
'class-methods-use-this': 'off',
|
||||
'stylistic/lines-around-comment': ['error', {
|
||||
beforeBlockComment: false,
|
||||
afterBlockComment: false,
|
||||
beforeLineComment: false,
|
||||
afterLineComment: false,
|
||||
}],
|
||||
'stylistic/lines-around-comment': [
|
||||
'error',
|
||||
{
|
||||
beforeBlockComment: false,
|
||||
afterBlockComment: false,
|
||||
beforeLineComment: false,
|
||||
afterLineComment: false,
|
||||
},
|
||||
],
|
||||
'stylistic/max-len': 'off',
|
||||
'stylistic/no-mixed-operators': 'warn', // prettier does not support no-mixed-operators
|
||||
'stylistic/no-multi-spaces': ['error', { ignoreEOLComments: true }],
|
||||
@ -70,16 +108,20 @@ export default tsEslint.config(
|
||||
'no-void': 'error',
|
||||
'no-empty': 'off',
|
||||
'prefer-promise-reject-errors': 'off',
|
||||
'stylistic/quotes': ['error', 'single', {
|
||||
avoidEscape: true,
|
||||
allowTemplateLiterals: 'never',
|
||||
}],
|
||||
'stylistic/quotes': [
|
||||
'error',
|
||||
'single',
|
||||
{
|
||||
avoidEscape: true,
|
||||
allowTemplateLiterals: 'never',
|
||||
},
|
||||
],
|
||||
'stylistic/quote-props': ['error', 'consistent'],
|
||||
'stylistic/semi': ['error', 'always'],
|
||||
},
|
||||
settings: {
|
||||
'import/parsers': {
|
||||
'@typescript-eslint/parser': ['.ts']
|
||||
'@typescript-eslint/parser': ['.ts'],
|
||||
},
|
||||
'import/resolver': {
|
||||
typescript: {},
|
||||
|
||||
Reference in New Issue
Block a user