|
| 1 | +module.exports = { |
| 2 | + extends: [ |
| 3 | + 'plugin:@typescript-eslint/recommended', |
| 4 | + 'plugin:@typescript-eslint/eslint-recommended', |
| 5 | + '@rocket.chat/eslint-config', |
| 6 | + 'prettier', |
| 7 | + ], |
| 8 | + parser: '@typescript-eslint/parser', |
| 9 | + parserOptions: { |
| 10 | + sourceType: 'module', |
| 11 | + ecmaVersion: 2018, |
| 12 | + warnOnUnsupportedTypeScriptVersion: false, |
| 13 | + ecmaFeatures: { |
| 14 | + experimentalObjectRestSpread: true, |
| 15 | + legacyDecorators: true, |
| 16 | + }, |
| 17 | + }, |
| 18 | + plugins: ['@typescript-eslint', 'prettier'], |
| 19 | + rules: { |
| 20 | + 'func-call-spacing': 'off', |
| 21 | + 'indent': 'off', |
| 22 | + 'import/order': [ |
| 23 | + 'error', |
| 24 | + { |
| 25 | + 'newlines-between': 'always', |
| 26 | + 'groups': [ |
| 27 | + 'builtin', |
| 28 | + 'external', |
| 29 | + 'internal', |
| 30 | + ['parent', 'sibling', 'index'], |
| 31 | + ], |
| 32 | + 'alphabetize': { |
| 33 | + order: 'asc', |
| 34 | + }, |
| 35 | + }, |
| 36 | + ], |
| 37 | + 'jsx-quotes': ['error', 'prefer-single'], |
| 38 | + 'no-empty-function': 'off', |
| 39 | + 'no-extra-parens': 'off', |
| 40 | + 'no-redeclare': 'off', |
| 41 | + 'no-spaced-func': 'off', |
| 42 | + 'no-undef': 'off', |
| 43 | + 'no-unused-vars': 'off', |
| 44 | + 'no-useless-constructor': 'off', |
| 45 | + 'no-use-before-define': 'off', |
| 46 | + 'operator-linebreak': 'off', |
| 47 | + '@typescript-eslint/ban-ts-ignore': 'off', |
| 48 | + '@typescript-eslint/func-call-spacing': 'error', |
| 49 | + '@typescript-eslint/indent': 'off', |
| 50 | + '@typescript-eslint/no-explicit-any': 'off', |
| 51 | + '@typescript-eslint/no-extra-parens': 'off', |
| 52 | + '@typescript-eslint/no-redeclare': ['error'], |
| 53 | + '@typescript-eslint/no-use-before-define': ['error'], |
| 54 | + '@typescript-eslint/interface-name-prefix': 'off', |
| 55 | + '@typescript-eslint/explicit-function-return-type': [ |
| 56 | + 'warn', |
| 57 | + { |
| 58 | + allowExpressions: true, |
| 59 | + }, |
| 60 | + ], |
| 61 | + '@typescript-eslint/no-unused-vars': 'off', |
| 62 | + '@typescript-eslint/no-unused-vars-experimental': 'warn', |
| 63 | + 'prettier/prettier': 2, |
| 64 | + }, |
| 65 | + env: { |
| 66 | + browser: true, |
| 67 | + commonjs: true, |
| 68 | + es6: true, |
| 69 | + node: true, |
| 70 | + jest: true, |
| 71 | + }, |
| 72 | + settings: { |
| 73 | + 'import/resolver': { |
| 74 | + node: { |
| 75 | + extensions: ['.js', '.ts', '.tsx'], |
| 76 | + }, |
| 77 | + }, |
| 78 | + }, |
| 79 | +}; |
0 commit comments