mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
change plugin system
This commit is contained in:
66
.eslintrc.js
66
.eslintrc.js
@ -1,8 +1,8 @@
|
||||
module.exports = {
|
||||
extends: [
|
||||
'plugin:import/typescript',
|
||||
'eslint:recommended',
|
||||
'plugin:import/recommended',
|
||||
'plugin:import/typescript',
|
||||
'plugin:@typescript-eslint/eslint-recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
||||
@ -13,30 +13,51 @@ module.exports = {
|
||||
project: './tsconfig.json',
|
||||
tsconfigRootDir: __dirname,
|
||||
sourceType: 'module',
|
||||
ecmaVersion: 'latest'
|
||||
ecmaVersion: 'latest',
|
||||
},
|
||||
rules: {
|
||||
'arrow-parens': ['error', 'always'],
|
||||
'object-curly-spacing': ['error', 'always'],
|
||||
'@typescript-eslint/no-floating-promises': 'off',
|
||||
'@typescript-eslint/no-misused-promises': ['off', { checksVoidReturn: false }],
|
||||
'@typescript-eslint/no-misused-promises': [
|
||||
'off',
|
||||
{ checksVoidReturn: false },
|
||||
],
|
||||
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
||||
"@typescript-eslint/no-non-null-assertion": "off",
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'@typescript-eslint/no-unsafe-assignment': 'off',
|
||||
'import/first': 'error',
|
||||
'import/newline-after-import': 'error',
|
||||
'import/no-default-export': 'off',
|
||||
'import/no-duplicates': 'error',
|
||||
'import/no-unresolved': ['error', { ignore: ['^virtual:', '\\?inline$', '\\?raw$', '\\?asset&asarUnpack', '^youtubei.js$'] }],
|
||||
'import/no-unresolved': [
|
||||
'error',
|
||||
{
|
||||
ignore: [
|
||||
'^virtual:',
|
||||
'\\?inline$',
|
||||
'\\?raw$',
|
||||
'\\?asset&asarUnpack',
|
||||
'^youtubei.js$',
|
||||
],
|
||||
},
|
||||
],
|
||||
'import/order': [
|
||||
'error',
|
||||
{
|
||||
'groups': ['builtin', 'external', ['internal', 'index', 'sibling'], 'parent', 'type'],
|
||||
groups: [
|
||||
'builtin',
|
||||
'external',
|
||||
['internal', 'index', 'sibling'],
|
||||
'parent',
|
||||
'type',
|
||||
],
|
||||
'newlines-between': 'always-and-inside-groups',
|
||||
'alphabetize': {order: 'ignore', caseInsensitive: false}
|
||||
}
|
||||
alphabetize: { order: 'ignore', caseInsensitive: false },
|
||||
},
|
||||
],
|
||||
'import/prefer-default-export': 'off',
|
||||
'camelcase': ['error', {properties: 'never'}],
|
||||
camelcase: ['error', { properties: 'never' }],
|
||||
'class-methods-use-this': 'off',
|
||||
'lines-around-comment': [
|
||||
'error',
|
||||
@ -49,17 +70,21 @@ module.exports = {
|
||||
],
|
||||
'max-len': 'off',
|
||||
'no-mixed-operators': 'error',
|
||||
'no-multi-spaces': ['error', {ignoreEOLComments: true}],
|
||||
'no-multi-spaces': ['error', { ignoreEOLComments: true }],
|
||||
'no-tabs': 'error',
|
||||
'no-void': 'error',
|
||||
'no-empty': 'off',
|
||||
'prefer-promise-reject-errors': 'off',
|
||||
'quotes': ['error', 'single', {
|
||||
avoidEscape: true,
|
||||
allowTemplateLiterals: false,
|
||||
}],
|
||||
quotes: [
|
||||
'error',
|
||||
'single',
|
||||
{
|
||||
avoidEscape: true,
|
||||
allowTemplateLiterals: false,
|
||||
},
|
||||
],
|
||||
'quote-props': ['error', 'consistent'],
|
||||
'semi': ['error', 'always'],
|
||||
semi: ['error', 'always'],
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
@ -67,4 +92,15 @@ module.exports = {
|
||||
es6: true,
|
||||
},
|
||||
ignorePatterns: ['dist', 'node_modules'],
|
||||
root: true,
|
||||
settings: {
|
||||
'import/parsers': {
|
||||
'@typescript-eslint/parser': ['.ts', '.tsx'],
|
||||
},
|
||||
'import/resolver': {
|
||||
typescript: {
|
||||
alwaysTryTypes: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user