mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-25 11:17:50 +01:00
76d629dcbc
* made open toolbar links open in a new tab * Remove noreferrer to allow filtering out visits from PostHog * Allow referrer * Disable react/jsx-no-target-blank Co-authored-by: Michael Matloka <dev@twixes.com>
70 lines
2.1 KiB
JavaScript
70 lines
2.1 KiB
JavaScript
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
/* global module */
|
|
|
|
module.exports = {
|
|
env: {
|
|
browser: true,
|
|
es6: true,
|
|
'cypress/globals': true,
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: 'detect',
|
|
},
|
|
},
|
|
extends: ['plugin:@typescript-eslint/recommended', 'plugin:react/recommended', 'prettier/@typescript-eslint'],
|
|
globals: {
|
|
Atomics: 'readonly',
|
|
SharedArrayBuffer: 'readonly',
|
|
},
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
ecmaVersion: 2018,
|
|
sourceType: 'module',
|
|
},
|
|
plugins: ['prettier', 'react', 'cypress', '@typescript-eslint'],
|
|
rules: {
|
|
'react/prop-types': [0],
|
|
'react/no-unescaped-entities': [0],
|
|
'react/jsx-no-target-blank': [0],
|
|
'no-unused-vars': ['error', { ignoreRestSiblings: true }],
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
'@typescript-eslint/no-empty-function': 'off',
|
|
'@typescript-eslint/no-inferrable-types': 'off',
|
|
},
|
|
overrides: [
|
|
{
|
|
// enable the rule specifically for TypeScript files
|
|
files: ['*Type.ts', '*Type.tsx'],
|
|
rules: {
|
|
'@typescript-eslint/no-explicit-any': ['off'],
|
|
'@typescript-eslint/ban-types': ['off'],
|
|
},
|
|
},
|
|
{
|
|
// enable the rule specifically for TypeScript files
|
|
files: ['*.ts', '*.tsx'],
|
|
rules: {
|
|
'@typescript-eslint/no-explicit-any': ['off'],
|
|
'@typescript-eslint/explicit-function-return-type': [
|
|
'error',
|
|
{
|
|
allowExpressions: true,
|
|
},
|
|
],
|
|
'@typescript-eslint/explicit-module-boundary-types': ['error'],
|
|
},
|
|
},
|
|
{
|
|
files: ['*.js'],
|
|
rules: {
|
|
'typescript/no-var-requires': 'off',
|
|
},
|
|
},
|
|
],
|
|
}
|