Skip to content
Draft
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
17 changes: 0 additions & 17 deletions .eslintrc.json

This file was deleted.

7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ on:
default: ${{ github.ref }}

jobs:
lint:
runs-on: ubuntu-latest
steps:
- run: npm run lint

build:
permissions:
contents: write
Expand Down Expand Up @@ -164,4 +169,4 @@ jobs:
name="${{ inputs.asset-prefix }}_${{ inputs.platform }}_$(basename "$file")"
echo "Uploading $name, file: $file"
zip -j - "$file" | gh-actions-artifact-client.js upload "${name}" --retentionDays=7
done
done
74 changes: 74 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import { defineConfig } from "eslint/config";
import typeScript from '@typescript-eslint/eslint-plugin';
import typeScriptParser from '@typescript-eslint/parser';
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import imports from 'eslint-plugin-import';
import unusedImports from 'eslint-plugin-unused-imports';
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default defineConfig([
{
files: [
"src/**/*.ts",
"src/**/*.tsx",
],

languageOptions: {
parser: typeScriptParser,
parserOptions: {
"tsx": true,
"jsx": true,
"js": true,
"useJSXTextNode": true,
"project": "./tsconfig.json",
"tsconfigRootDir": "."
},
},

extends: compat.extends(
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
),

plugins: {
react,
typeScript,
imports,
unusedImports,
},

settings: {
react: {
version: 'detect',
},
},

rules: {
semi: ["error", "always"],
quotes: ["error", "single"],

"no-unused-vars": ["error", {
argsIgnorePattern: "^_",
}],

"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "warn",
"react/react-in-jsx-scope": "off",
},
},
reactHooks.configs['recommended-latest'],
]);
Loading
Loading