|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], |
| 4 | + parser: '@typescript-eslint/parser', |
| 5 | + plugins: ['@typescript-eslint'], |
| 6 | + env: { |
| 7 | + browser: true, |
| 8 | + es2020: true, |
| 9 | + node: true, |
| 10 | + }, |
| 11 | + rules: { |
| 12 | + // Disable prettier - rrweb formatting is normalized separately |
| 13 | + 'prettier/prettier': 'off', |
| 14 | + // Disable rules that conflict with rrweb's codebase |
| 15 | + '@typescript-eslint/no-explicit-any': 'off', |
| 16 | + '@typescript-eslint/no-unused-vars': 'off', |
| 17 | + '@typescript-eslint/ban-ts-comment': 'off', |
| 18 | + '@typescript-eslint/no-non-null-assertion': 'off', |
| 19 | + '@typescript-eslint/no-empty-function': 'off', |
| 20 | + '@typescript-eslint/no-this-alias': 'off', |
| 21 | + '@typescript-eslint/no-unused-expressions': 'off', |
| 22 | + '@typescript-eslint/no-require-imports': 'off', |
| 23 | + 'no-prototype-builtins': 'off', |
| 24 | + 'no-useless-escape': 'off', |
| 25 | + 'no-empty': 'off', |
| 26 | + 'prefer-const': 'off', |
| 27 | + 'no-constant-condition': 'off', |
| 28 | + 'no-extra-semi': 'off', |
| 29 | + 'no-var': 'off', |
| 30 | + 'no-global-assign': 'off', |
| 31 | + // posthog-js specific rules that don't apply to rrweb |
| 32 | + 'posthog-js/no-direct-array-check': 'off', |
| 33 | + 'posthog-js/no-direct-boolean-check': 'off', |
| 34 | + 'posthog-js/no-direct-document-check': 'off', |
| 35 | + 'posthog-js/no-direct-function-check': 'off', |
| 36 | + 'posthog-js/no-direct-navigator-check': 'off', |
| 37 | + 'posthog-js/no-direct-null-check': 'off', |
| 38 | + 'posthog-js/no-direct-number-check': 'off', |
| 39 | + 'posthog-js/no-direct-object-check': 'off', |
| 40 | + 'posthog-js/no-direct-string-check': 'off', |
| 41 | + 'posthog-js/no-direct-undefined-check': 'off', |
| 42 | + 'posthog-js/no-direct-window-check': 'off', |
| 43 | + 'compat/compat': 'off', |
| 44 | + }, |
| 45 | + ignorePatterns: ['dist/', 'node_modules/', '*.js', '*.cjs', '*.mjs'], |
| 46 | +} |
0 commit comments