Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bundler and add grant flow script #20

Merged
merged 7 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

File renamed without changes.
19 changes: 5 additions & 14 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:jsx-a11y/recommended",
"plugin:cypress/recommended",
"plugin:tailwind/recommended",
"prettier",
"plugin:jest/recommended",
"plugin:@typescript-eslint/recommended"
Expand All @@ -36,13 +33,9 @@
"@typescript-eslint",
"jest",
"@typescript-eslint",
"simple-import-sort",
"@funboxteam/no-only-tests"
"simple-import-sort"
],
"settings": {
"import/resolver": {
"typescript": {}
},
"react": {
"version": "detect"
}
Expand All @@ -69,7 +62,6 @@
"no-unused-vars": ["error", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }],
"no-return-assign": "warn",
"consistent-return": "off",
"import/no-unresolved": "error",
"no-redeclare": "error",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
Expand All @@ -81,14 +73,13 @@
"jsx-a11y/click-events-have-key-events": "warn",
"jsx-a11y/no-static-element-interactions": "warn",
"jsx-a11y/no-noninteractive-element-interactions": "warn",
"tailwind/class-order": "error",
"no-console": "error",
"no-console": "warn",
"no-empty": ["error", { "allowEmptyCatch": true }],
"@funboxteam/no-only-tests/no-only": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
"react/react-in-jsx-scope": "off",
"react/jsx-uses-react": "off"
"react/jsx-uses-react": "off",
"@typescript-eslint/no-explicit-any": "off"
},
"overrides": [
{
Expand All @@ -98,7 +89,7 @@
}
}
],
"ignorePatterns": ["dist/**", "dist-firefox-v2/**", "coverage/**"],
"ignorePatterns": ["dist/**", "dev/**", "coverage/**"],
"globals": {
"chrome": true,
"browser": true
Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
33 changes: 1 addition & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,35 +23,4 @@ jobs:
run: rm -rf node_modules && yarn install --frozen-lockfile

- name: Build
run: yarn build

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'

- name: Install dependencies
run: rm -rf node_modules && yarn install --frozen-lockfile

- name: Lint
run: yarn lint

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn

- name: Install dependencies
run: rm -rf node_modules && yarn install --frozen-lockfile

- name: Unit test
run: yarn test
run: yarn build:chrome
71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: 'CodeQL'

on:
push:
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
schedule:
- cron: '34 5 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ['typescript']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
41 changes: 41 additions & 0 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Upload Built files

on:
push:
branches:
- master

jobs:
upload:
name: Build and Upload files on Artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.16.0

- name: Build
run: |
yarn install --frozen-lockfile
yarn upload
- name: Uploading Chrome Extension
uses: actions/upload-artifact@v3
with:
name: chrome
path: dist/chrome
- name: Uploading Firefox Extension
uses: actions/upload-artifact@v3
with:
name: firefox
path: dist/firefox
- name: Uploading Opera Extension
uses: actions/upload-artifact@v3
with:
name: opera
path: dist/opera
- name: Uploading Edge Extension
uses: actions/upload-artifact@v3
with:
name: edge
path: dist/edge
5 changes: 5 additions & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ lerna-debug.log*

node_modules
dist
temp
preview
dev
dist-ssr
dist-firefox-v2
public/manifest.json
*.local
coverage
.husky
.vscode

# Editor directories and files
.vscode/*
Expand Down
6 changes: 6 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"no-inline-html": {
"allowed_elements": ["details", "p", "div", "h1", "strong"]
},
"line-length": false
}
9 changes: 0 additions & 9 deletions _types/global.d.ts

This file was deleted.

15 changes: 9 additions & 6 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,15 @@ export default {

// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
moduleNameMapper: {
'^@/src(.*)$': '<rootDir>/src$1',
'^@/assets(.*)$': '<rootDir>/src/assets$1',
'^@/pages(.*)$': '<rootDir>/src/pages$1',
'^@/lib(.*)$': '<rootDir>/src/lib$1',
'^@/utils(.*)$': '<rootDir>/src/utils$1',
'^@/hooks(.*)$': '<rootDir>/src/hooks$1',
'^utils(.*)$': '<rootDir>/utils$1',
'^popup(.*)$': '<rootDir>/popup$1',
'^background(.*)$': '<rootDir>/background$1',
'^content(.*)$': '<rootDir>/content$1',
'^assets(.*)$': '<rootDir>/assets$1',
'^components(.*)$': '<rootDir>/components$1',
'^types(.*)$': '<rootDir>/types$1',
'^@redux(.*)$': '<rootDir>/@redux$1',
'^@hooks(.*)$': '<rootDir>/@hooks$1',
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
},

Expand Down
66 changes: 0 additions & 66 deletions manifest.ts

This file was deleted.

Loading