Skip to content

Commit

Permalink
maint: align configuration with sdk-js + bump typescript to 5.2.2
Browse files Browse the repository at this point in the history
JMounier committed Nov 22, 2023
1 parent 532d19d commit acd4950
Showing 16 changed files with 1,830 additions and 1,006 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.compat.yml
Original file line number Diff line number Diff line change
@@ -6,5 +6,5 @@ extends:
- "plugin:compat/recommended"

parserOptions:
ecmaVersion: 2018
ecmaVersion: 2019
sourceType: module
30 changes: 25 additions & 5 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
env:
browser: true
mocha: true
node: true
webextensions: true

extends:
- "airbnb-typescript/base"
@@ -14,6 +16,7 @@ parserOptions:
- ./packages/**/tsconfig.browser.json

plugins:
- import
- "@typescript-eslint"
- chai-expect
- chai-friendly
@@ -33,14 +36,24 @@ rules:
no-console:
- warn
- allow:
- warn
- error
- warn
- error
no-continue: 0
no-mixed-operators: 0
no-plusplus:
- error
- allowForLoopAfterthoughts: true
no-restricted-syntax: 0
no-restricted-exports:
- error
- restrictedNamedExports:
- then
restrictDefaultExports:
direct: true
named: true
defaultFrom: true
namedFrom: true
namespaceFrom: true
no-underscore-dangle:
- error
- allowAfterThis: true
@@ -56,11 +69,18 @@ rules:
chai-friendly/no-unused-expressions: 2

import/no-named-as-default: 0
import/no-unresolved:
- error
import/prefer-default-export: 0

mocha-no-only/mocha-no-only:
- error

"@typescript-eslint/lines-between-class-members":
- error
- always
- exceptAfterSingleLine: true

"@typescript-eslint/naming-convention":
- error
- selector: variable
@@ -79,7 +99,7 @@ rules:

overrides:
- files:
- "*.test.ts"
- "*.spec.ts"
- "*.test.ts"
- "*.spec.ts"
rules:
'@typescript-eslint/no-unused-expressions': off
"@typescript-eslint/no-unused-expressions": off
9 changes: 4 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -11,9 +11,8 @@ jobs:
- macos-11
- windows-2019
node_version:
- '16'
- '18'
- '20'
- "18"
- "20"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
@@ -30,7 +29,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v2
with:
node-version: '18'
node-version: "18"
- name: Install packages
run: yarn install
- name: Run eslint
@@ -48,7 +47,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.11'
python-version: "3.11"
- name: Install and configure poetry
run: |
python -m pip install poetry
16 changes: 0 additions & 16 deletions config/compat/ie11.js

This file was deleted.

2 changes: 1 addition & 1 deletion config/karma/karma.config.base.js
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ module.exports = {
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'**/__tests__/index.ts': ['webpack'],
'**/__tests__/index.ts': ['webpack', 'sourcemap'],
},

// test results reporter to use
2 changes: 0 additions & 2 deletions config/karma/karma.config.ci.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const webpack = require('webpack');

const karmaConfig = require('./karma.config.base');
const { makeBaseConfig } = require('./karma.webpack.config');

1 change: 0 additions & 1 deletion config/karma/karma.webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @noflow
const { makeBaseConfig } = require('../webpack.config.base');

const makePatchedBaseConfig = ({ mode, target, devtool, plugins }) => {
87 changes: 32 additions & 55 deletions config/karma/launchers.js
Original file line number Diff line number Diff line change
@@ -8,101 +8,78 @@ const customLaunchers = {

// All sorts of BrowserStack browsers, you can create your using:
// https://www.browserstack.com/automate/capabilities
ChromeWindows10: {
ChromeWindows: {
base: 'BrowserStack',
browser: 'Chrome',
os: 'Windows',
os_version: '10',
os_version: '11',
},
Chrome70Windows7: {
Chrome80Windows: {
base: 'BrowserStack',
browser: 'Chrome',
browser_version: '70.0',
os: 'Windows',
os_version: '7',
},
ChomeOSX: {
base: 'BrowserStack',
browser: 'Chrome',
os: 'OS X',
os_version: 'Mojave',
},
EdgeWindows10: {
base: 'BrowserStack',
browser: 'Edge',
os: 'Windows',
os_version: '10',
os_version: '11',
browser_version: '80.0',
},
Edge18Windows10: {
Edge88: {
base: 'BrowserStack',
browser: 'Edge',
browserVersion: '18.0',
os: 'Windows',
os_version: '10',
os_version: '11',
browserVersion: '88.0',
},
FirefoxWindows10: {
Firefox78: {
base: 'BrowserStack',
browser: 'Firefox',
os: 'Windows',
os_version: '10',
os_version: '11',
browser_version: '78.0',
},
Firefox64Windows8: {
Opera70: {
base: 'BrowserStack',
browser: 'Firefox',
browser_version: '64.0',
browser: 'Opera',
os: 'Windows',
os_version: '8.1',
},
FirefoxOSX: {
base: 'BrowserStack',
browser: 'Firefox',
os: 'OS X',
os_version: 'Mojave',
os_version: '11',
browser_version: '70.0',
},
Safari12Mojave: {
Safari17: {
base: 'BrowserStack',
browser: 'Safari',
browser_version: '12.0',
os: 'OS X',
os_version: 'Mojave',
os_version: 'Sonoma',
},
Safari10Sierra: {
Safari14: {
base: 'BrowserStack',
browser: 'Safari',
browser_version: '10.0',
os: 'OS X',
os_version: 'Sierra',
},
iOS12: {
base: 'BrowserStack',
device: 'iPhone XS',
real_mobile: 'true',
os: 'ios',
os_version: '12.1',
os_version: 'Big Sur',
},
iOS10: {
iOS: {
base: 'BrowserStack',
device: 'iPhone 7',
device: 'iPhone 15',
real_mobile: 'true',
os: 'ios',
os_version: '10.0',
os_version: '17',
},
Android10: {
AndroidChrome: {
base: 'BrowserStack',
device: 'Samsung Galaxy S20',
browser: 'chrome',
device: 'Samsung Galaxy S23',
real_mobile: 'true',
os: 'Android',
os_version: '10.0',
os_version: '13.0',
},
Android8: {
Android11Samsung: {
base: 'BrowserStack',
device: 'Samsung Galaxy S9',
browser: 'samsung',
device: 'Samsung Galaxy S21',
real_mobile: 'true',
os: 'Android',
os_version: '8.0',
os_version: '11.0',
},
Android6: {
Android6Chrome: {
base: 'BrowserStack',
browser: 'chrome',
device: 'Samsung Galaxy S7',
real_mobile: 'true',
os: 'Android',
Loading

0 comments on commit acd4950

Please sign in to comment.