refactor: component viewer (#2377)

This commit is contained in:
Mo
2023-07-28 07:08:52 -05:00
committed by GitHub
parent 3de6af445b
commit c7fb0d2aca
9 changed files with 84 additions and 40 deletions

View File

@@ -1,3 +1,5 @@
// Recommended: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/recommended-type-checked.ts
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
@@ -9,15 +11,25 @@ module.exports = {
plugins: ['@typescript-eslint', 'prettier'],
ignorePatterns: ['**/*.spec.ts'],
rules: {
'@typescript-eslint/restrict-template-expressions': 'error',
'standard/no-callback-literal': 0, // Disable this as we have too many callbacks relying on literals
'no-throw-literal': 0,
camelcase: 'off',
'sort-imports': 'off',
'eol-last': 'error',
'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 0 }],
'no-trailing-spaces': 'error',
'prettier/prettier': [
'error',
{
singleQuote: true,
trailingComma: 'all',
printWidth: 120,
semi: false,
},
{
usePrettierrc: false,
},
],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/prefer-as-const': 'error',
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-duplicate-enum-values': 'error',
'@typescript-eslint/restrict-template-expressions': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
@@ -31,31 +43,26 @@ module.exports = {
'@typescript-eslint/no-floating-promises': ['error'],
'block-scoped-var': 'error',
'comma-dangle': ['error', 'always-multiline'],
curly: ['error', 'all'],
'eol-last': 'error',
'no-confusing-arrow': 'error',
'no-inline-comments': 'warn',
'no-invalid-this': 'error',
'no-return-assign': 'warn',
'no-console': ['warn', { allow: ['warn', 'error'] }],
'no-constructor-return': 'error',
'no-duplicate-imports': 'error',
'no-inline-comments': 'warn',
'no-invalid-this': 'error',
'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 0 }],
'no-return-assign': 'warn',
'no-self-compare': 'error',
'no-console': ['warn', { allow: ['warn', 'error'] }],
'no-throw-literal': 0,
'no-trailing-spaces': 'error',
'no-unmodified-loop-condition': 'error',
'no-unused-private-class-members': 'error',
'object-curly-spacing': ['error', 'always'],
'sort-imports': 'off',
'standard/no-callback-literal': 0, // Disable this as we have too many callbacks relying on literals
camelcase: 'off',
curly: ['error', 'all'],
quotes: ['error', 'single', { avoidEscape: true }],
semi: ['error', 'never'],
'prettier/prettier': [
'error',
{
singleQuote: true,
trailingComma: 'all',
printWidth: 120,
semi: false,
},
{
usePrettierrc: false,
},
],
},
}