0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-21 13:39:22 +01:00

chore: lint for browser compatability so humans don't have to (#17527)

* chore: lint for browser compatability so humans don't have to

* Doh

* Update UI snapshots for `chromium` (1)

* we already do not support opera mini

* Update UI snapshots for `chromium` (1)

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Paul D'Ambra 2023-09-19 16:19:48 +01:00 committed by GitHub
parent b653af8da6
commit bb61ee1fa1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 6 deletions

View File

@ -26,6 +26,7 @@ module.exports = {
'plugin:eslint-comments/recommended',
'plugin:storybook/recommended',
'prettier',
'plugin:compat/recommended',
],
globals,
parser: '@typescript-eslint/parser',
@ -36,7 +37,7 @@ module.exports = {
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['prettier', 'react', 'cypress', '@typescript-eslint', 'no-only-tests', 'jest'],
plugins: ['prettier', 'react', 'cypress', '@typescript-eslint', 'no-only-tests', 'jest', 'compat'],
rules: {
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-debugger': 'error',

View File

@ -236,6 +236,7 @@
"cypress-terminal-report": "^5.1.1",
"eslint": "^7.8.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-cypress": "^2.13.3",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-jest": "^27.2.3",
@ -305,7 +306,7 @@
"last 2 edge versions"
],
"production": [
"defaults"
"defaults and not not op_mini all"
]
},
"browser": {

View File

@ -513,6 +513,9 @@ devDependencies:
eslint-config-prettier:
specifier: ^8.8.0
version: 8.8.0(eslint@7.32.0)
eslint-plugin-compat:
specifier: ^4.2.0
version: 4.2.0(eslint@7.32.0)
eslint-plugin-cypress:
specifier: ^2.13.3
version: 2.13.3(eslint@7.32.0)
@ -3146,6 +3149,10 @@ packages:
maxmind: 4.3.8
dev: false
/@mdn/browser-compat-data@5.3.16:
resolution: {integrity: sha512-b0kKg2weqKDLI+Ai5+tocgUEIidccdSfzUndbS2YnwIp5aVvd3M0D+DCcbrsSOSgMyrV9QKMqogtqMIjKwvDxw==}
dev: true
/@mdx-js/react@2.3.0(react@16.14.0):
resolution: {integrity: sha512-zQH//gdOmuu7nt2oJR29vFhDv88oGPmVw6BggmrHeMI+xgEkp1B2dX9/bMBSYtK0dyLX/aOmesKS09g222K1/g==}
peerDependencies:
@ -7222,6 +7229,12 @@ packages:
util: 0.12.5
dev: true
/ast-metadata-inferer@0.8.0:
resolution: {integrity: sha512-jOMKcHht9LxYIEQu+RVd22vtgrPaVCtDRQ/16IGmurdzxvYbDd5ynxjnyrzLnieG96eTcAyaoj/wN/4/1FyyeA==}
dependencies:
'@mdn/browser-compat-data': 5.3.16
dev: true
/ast-types@0.14.2:
resolution: {integrity: sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==}
engines: {node: '>=4'}
@ -7655,7 +7668,7 @@ packages:
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
dependencies:
caniuse-lite: 1.0.30001521
caniuse-lite: 1.0.30001538
electron-to-chromium: 1.4.492
node-releases: 2.0.13
update-browserslist-db: 1.0.11(browserslist@4.21.10)
@ -7800,7 +7813,7 @@ packages:
resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==}
dependencies:
browserslist: 4.21.10
caniuse-lite: 1.0.30001521
caniuse-lite: 1.0.30001538
lodash.memoize: 4.1.2
lodash.uniq: 4.5.0
dev: true
@ -7809,8 +7822,8 @@ packages:
resolution: {integrity: sha512-IB1BXTZKPDVPM7cnV4iaKaHxckvdr/3xtctB3f7Hmenx3qYBhGtTZ//7EllK66aKXW98Lx0+7Yr0kxBtIt3tzg==}
dev: true
/caniuse-lite@1.0.30001521:
resolution: {integrity: sha512-fnx1grfpEOvDGH+V17eccmNjucGUnCbP6KL+l5KqBIerp26WK/+RQ7CIDE37KGJjaPyqWXXlFUyKiWmvdNNKmQ==}
/caniuse-lite@1.0.30001538:
resolution: {integrity: sha512-HWJnhnID+0YMtGlzcp3T9drmBJUVDchPJ08tpUGFLs9CYlwWPH2uLgpHn8fND5pCgXVtnGS3H4QR9XLMHVNkHw==}
/case-anything@2.1.10:
resolution: {integrity: sha512-JczJwVrCP0jPKh05McyVsuOg6AYosrB9XWZKbQzXeDAm2ClE/PJE/BcrrQrVyGYH7Jg8V/LDupmyL4kFlVsVFQ==}
@ -9837,6 +9850,22 @@ packages:
eslint: 7.32.0
dev: true
/eslint-plugin-compat@4.2.0(eslint@7.32.0):
resolution: {integrity: sha512-RDKSYD0maWy5r7zb5cWQS+uSPc26mgOzdORJ8hxILmWM7S/Ncwky7BcAtXVY5iRbKjBdHsWU8Yg7hfoZjtkv7w==}
engines: {node: '>=14.x'}
peerDependencies:
eslint: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
'@mdn/browser-compat-data': 5.3.16
ast-metadata-inferer: 0.8.0
browserslist: 4.21.10
caniuse-lite: 1.0.30001538
eslint: 7.32.0
find-up: 5.0.0
lodash.memoize: 4.1.2
semver: 7.5.4
dev: true
/eslint-plugin-cypress@2.13.3(eslint@7.32.0):
resolution: {integrity: sha512-nAPjZE5WopCsgJwl3vHm5iafpV+ZRO76Z9hMyRygWhmg5ODXDPd+9MaPl7kdJ2azj+sO87H3P1PRnggIrz848g==}
peerDependencies: