switch to yarn, add prettier-eslint, update dependencies
Some checks failed
Actions / Lint Plugins (push) Failing after 13s
Actions / Build Plugins (push) Failing after 15s

This commit is contained in:
Seaswimmer 2024-12-22 12:11:24 -05:00
parent 3d3a80c688
commit 4bc006d97f
Signed by: cswimr
GPG key ID: 0EC431A8DA8F8087
10 changed files with 3285 additions and 1971 deletions

View file

@ -0,0 +1,43 @@
name: Actions
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build Plugins
runs-on: docker
container: catthehacker/ubuntu:act-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build plugins
run: yarn build
lint:
name: Lint Plugins
runs-on: docker
container: catthehacker/ubuntu:act-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint plugins
run: yarn lint

View file

@ -1,26 +0,0 @@
name: Build Plugins
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build plugins
runs-on: docker
container: catthehacker/ubuntu:act-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Build plugins
run: npm run build

3
.vscode/extensions.json vendored Normal file
View file

@ -0,0 +1,3 @@
{
"recommendations": ["rvest.vs-code-prettier-eslint", "dbaeumer.vscode-eslint"]
}

9
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,9 @@
{
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
"editor.formatOnType": false,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"files.autoSave": "onFocusChange",
"vs-code-prettier-eslint.prettierLast": false // set as "true" to run 'prettier' last not first
}

14
eslint.config.mjs Normal file
View file

@ -0,0 +1,14 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";
/** @type {import('eslint').Linter.Config[]} */
export default [
{files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"]},
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
];

View file

@ -41,7 +41,7 @@
# https://devenv.sh/reference/options/
languages.javascript = {
enable = true;
npm = {
yarn = {
enable = true;
install.enable = true;
};

1939
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -3,7 +3,9 @@
"scripts": {
"publish": "gauntlet publish",
"build": "gauntlet build",
"dev": "gauntlet dev"
"dev": "gauntlet dev",
"lint": "prettier-eslint \"src/**/*.tsx\"",
"lint:write": "yarn lint --write"
},
"dependencies": {
"@project-gauntlet/api": "0.12.0",
@ -11,10 +13,19 @@
"which": "^5.0.0"
},
"devDependencies": {
"@eslint/js": "^9.17.0",
"@project-gauntlet/tools": "0.9.0",
"@types/deno": "^2.0.0",
"@types/react": "^18.3.18",
"@types/react": "^19.0.2",
"@types/which": "^3.0.4",
"typescript": "^5.7.2"
"@typescript-eslint/parser": "^8.18.1",
"eslint": "^9.17.0",
"eslint-plugin-react": "^7.37.2",
"globals": "^15.14.0",
"prettier": "^3.4.2",
"prettier-eslint": "^16.3.0",
"prettier-eslint-cli": "^8.0.1",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.1"
}
}

View file

@ -1,9 +1,10 @@
import { Action, ActionPanel, Content, Icons, Inline } from "@project-gauntlet/api/components";
import { ReactNode } from "react";
import React, { ReactNode } from "react";
import { Clipboard, showHud } from "@project-gauntlet/api/helpers";
import * as UnicodeEmoji from "unicode-emoji";
// @ts-expect-error
// @ts-expect-error gauntlet uses deno and not node
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const denoCore: DenoCore = Deno[Deno.internal].core;
export default function EmojiPicker(props: { text: string }): ReactNode | undefined {

3198
yarn.lock Normal file

File diff suppressed because it is too large Load diff