Skip to content

Commit

Permalink
Merge pull request #348 from wasabee-project/dev
Browse files Browse the repository at this point in the history
Release 0.21
  • Loading branch information
le-jeu authored Mar 25, 2022
2 parents b97b1d5 + 9e621d5 commit 05c0547
Show file tree
Hide file tree
Showing 253 changed files with 21,147 additions and 24,775 deletions.
30 changes: 27 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"sourceType": "module"
},
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"plugins": ["eslint-plugin-local-rules"],
"env": {
"browser": true,
"jest": false,
Expand All @@ -14,6 +15,7 @@
"commonjs": true,
"es2020": true
},
"ignorePatterns": ["*.d.ts"],
"rules": {
"prettier/prettier": ["error", { "endOfLine": "auto" }],
"no-console": "off",
Expand Down Expand Up @@ -42,14 +44,36 @@
"no-self-compare": 1,
"no-throw-literal": 1,
"no-unused-expressions": 1,
"no-useless-concat": 1,
"no-void": 1,
"no-sequences": 1,
"radix": 1
"radix": 1,
"local-rules/wx-keys": 2
},
"globals": {
"L": "readonly",
"PLAYER": "readonly",
"android": "readonly"
}
},
"overrides": [
{
"files": ["src/**/*.ts"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"prettier/prettier": 0,
"lines-between-class-members": 0,
"@typescript-eslint/no-array-constructor": 1,
"@typescript-eslint/no-empty-function": 1,
"@typescript-eslint/no-inferrable-types": 1
}
}
]
}
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Build 🔧
run: |
npm install
npx gulp build-dev
npm run build-dev
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Build 🔧
run: |
npm install
npx gulp build-prod
npm run build
- name: Deploy 🚀
if: ${{ github.ref_type == 'tag' }}
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Pull request build
on:
pull_request:
branches: [dev]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1

- name: Build
env:
PR_NUMBER: ${{ github.event.number }}
run: |
npm install
npm run build-pr
- uses: actions/upload-artifact@v2
with:
name: pr
path: releases/dev/wasabee.user.js
25 changes: 25 additions & 0 deletions .github/workflows/pr-comment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Pull request Comment
on:
workflow_run:
workflows: ["Pull request build"]
types:
- completed
jobs:
comment:
runs-on: ubuntu-latest
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/download-artifact@v2
with:
name: pr

- name: Pull request artifacts
uses: gavv/pull-request-artifacts@v1.0.0
with:
commit: ${{ github.event.pull_request.head.sha }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
artifacts-branch: artifacts
artifacts: |
wasabee.user.js
23 changes: 23 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build and Deploy Testing
on:
push:
branches:
- testing
jobs:
build-and-deploy-testing:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1

- name: Build 🔧
run: |
npm install
npm run build-testing
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.1
with:
branch: dist # The branch the action should deploy to.
folder: releases # The folder the action should deploy.
clean: false # build is already clean (keep prod/dev)
4 changes: 0 additions & 4 deletions .vscode/settings.json

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
![GitHub issues](https://img.shields.io/github/issues/wasabee-project/Wasabee-IITC.svg)
[![Build Status](https://travis-ci.org/wasabee-project/Wasabee-IITC.svg?branch=master)](https://travis-ci.org/wasabee-project/Wasabee-IITC)
[![Releases](https://img.shields.io/github/v/release/wasabee-project/Wasabee-IITC)](https://github.com/wasabee-project/Wasabee-IITC/releases)
[![Crowdin](https://badges.crowdin.net/wasabee-iitc/localized.svg)](https://crowdin.com/project/wasabee-iitc)

# Wasabee

Expand Down
5 changes: 5 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
files:
- source: /src/code/translations/English.json
translation: /src/code/translations/%language%.json
skip_untranslated_strings: true
update_option: "update_as_unapproved"
45 changes: 45 additions & 0 deletions eslint-local-rules.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
"use strict";

const sourceLanguage = require("./src/code/translations/English.json");

module.exports = {
"wx-keys": {
meta: {
docs: {
description: "Check wX calls",
category: "Possible Errors",
recommended: false,
},
schema: [],
},
create: function (context) {
return {
CallExpression: function (node) {
const callee = node.callee;
if (callee.type !== "Identifier") return;
if (callee.name !== "wX") return;
const args = node.arguments;
if (args.length < 1 || args.length > 2) {
context.report({
node: node,
message: "Invalid number of arguments for wX",
});
} else {
if (args[0].type !== "Literal") return;
const key = args[0].value;
if (key in sourceLanguage) {
return;
}
context.report({
node: node,
message: "Unknown wX key: {{ key }}",
data: {
key: args[0].raw
},
});
}
},
};
},
},
};
Loading

0 comments on commit 05c0547

Please sign in to comment.