Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Commit

Permalink
MWPW-122611 - [GH Action] Old browser function detection (adobecom#423)
Browse files Browse the repository at this point in the history
* MWPW-122611 - [GH Action] Old browser function detection

- add a Github action to check for unsupported functions

* MWPW-122611 - [GH Action] Old browser function detection

- add a Github action to check for unsupported functions

* MWPW-122611 - [GH Action] Old browser function detection

- add a Github action to check for unsupported functions

* MWPW-122611 - [GH Action] Old browser function detection

- add a Github action to check for unsupported functions

* MWPW-122611 - [GH Action] Old browser function detection

- add a Github action to check for unsupported functions

* MWPW-122611 - [GH Action] Old browser function detection

- add a Github action to check for unsupported functions

* MWPW-122611 - [GH Action] Old browser function detection

- add a Github action to check for unsupported functions

* MWPW-122611 - [GH Action] Old browser function detection

- add a Github action to check for unsupported functions

---------

Co-authored-by: Aaron Mauchley <mauchley@adobe.com>
  • Loading branch information
2 people authored and Chris Peyer committed May 22, 2023
1 parent d068550 commit 6d0bcd1
Show file tree
Hide file tree
Showing 6 changed files with 365 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
last 1 chrome version
last 1 firefox version
last 1 edge version
safari >= 14
ios_saf >= 14
16 changes: 16 additions & 0 deletions .eslintrc-code-compatibility.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
root: true,
extends: ['plugin:compat/recommended', 'plugin:ecmalist/recommended'],
settings: { es: { aggressive: true } },
env: { browser: true, mocha: true },
parser: '@babel/eslint-parser',
parserOptions: {
allowImportExportEverywhere: true,
sourceType: 'module',
requireConfigFile: false,
},
ignorePatterns: [
'/libs/deps/*',
'/tools/loc/*',
],
};
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
root: true,
extends: ['airbnb-base', 'plugin:react-hooks/recommended'],
extends: ['airbnb-base', 'plugin:react-hooks/recommended', 'plugin:compat/recommended', 'plugin:ecmalist/recommended'],
settings: { es: { aggressive: true } },
env: { browser: true, mocha: true },
parser: '@babel/eslint-parser',
parserOptions: {
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/code-compatibility.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check code compatibility with Milo supported browsers

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
check:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Check for unsupported functions
run: |
# Install eslint and its plugins
npm install
# Check for unsupported functions in the code
npx eslint --no-eslintrc -c .eslintrc-code-compatibility.js .
Loading

0 comments on commit 6d0bcd1

Please sign in to comment.