Skip to content

Commit

Permalink
web monetization project configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ionutanin committed Jul 26, 2023
0 parents commit 3df2436
Show file tree
Hide file tree
Showing 57 changed files with 8,850 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env"]
}
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Top-most EditorConfig file ?
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# Indentiation Rules
[*.{css,js,jsx,json,html,scss}]
charset = utf-8
indent_style = space
indent_size = 2
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
!.github
node_modules/
92 changes: 92 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"env": {
"es2020": true,
"browser": true,
"node": true
},
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"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"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2020,
"ecmaFeatures": { "jsx": true }
},
"plugins": [
"prettier",
"react",
"node",
"react-hooks",
"cypress",
"@typescript-eslint",
"jest",
"simple-import-sort",
"@funboxteam/no-only-tests"
],
"rules": {
"semi": "off",
"prettier/prettier": "error",
"react/self-closing-comp": [
"error",
{
"component": true,
"html": true
}
],
"react/prop-types": "off",
"no-param-reassign": "error",
"no-use-before-define": "off",
"no-underscore-dangle": "off",
"no-implicit-coercion": ["error", { "allow": ["!!"] }],
"block-scoped-var": "error",
"no-shadow": "warn",
"no-unsafe-optional-chaining": ["error", { "disallowArithmeticOperators": true }],
"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",
"react/jsx-props-no-spreading": "off",
"import/prefer-default-export": "off",
"jsx-a11y/anchor-is-valid": "warn",
"jsx-a11y/no-noninteractive-tabindex": "warn",
"jsx-a11y/tabindex-no-positive": "warn",
"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-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"
},
"overrides": [
{
"files": [".*rc.js", ".*rc.cjs", "*.config.js", "*.config.cjs"],
"env": {
"node": true
}
}
],
"ignorePatterns": ["dist/**", "dist-firefox-v2"],
"globals": {
"chrome": true
}
}
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI

on:
push:
branches:
- main

pull_request:
branches:
- main

jobs:
build:
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: 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
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
dist-firefox-v2
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
10 changes: 10 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"singleQuote": true,
"printWidth": 100,
"trailingComma": "all",
"quoteProps": "as-needed",
"bracketSpacing": true,
"arrowParens": "avoid",
"bracketSameLine": true,
"semi": false
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Web monetization extension for Chrome and Firefox
Loading

0 comments on commit 3df2436

Please sign in to comment.