mirror of
https://github.com/VladSez/easy-invoice-pdf
synced 2026-04-21 21:47:52 +00:00
* feat: add debug local storage UI and update README; include new template parameter handling in invoice form * feat: add URL compression logic when generating link to invoice to reduce url length + add unit tests + improved existing e2e tests * ci: remove type check step from unit tests workflow to streamline CI process * test: update e2e tests for Stripe invoice sharing logic and template; increase timeout for visibility checks * test: refactor e2e tests for invoice generation and sharing; update element selectors and enhance URL disallow rules in robots.txt * chore: enhance README with detailed features and update about page references; add GitHub star CTA component * chore: update configuration files for Prettier, run prettify across the project * chore: run dedupe * test: add e2e tests for Open Graph meta tags in invoice templates; verify correct rendering for default and Stripe templates * chore: remove @stagewise/toolbar-next package and related development toolbar component from the project
101 lines
2.9 KiB
JavaScript
101 lines
2.9 KiB
JavaScript
// @ts-check
|
|
import { FlatCompat } from "@eslint/eslintrc";
|
|
import tseslint from "typescript-eslint";
|
|
import playwright from "eslint-plugin-playwright";
|
|
import youMightNotNeedAnEffect from "eslint-plugin-react-you-might-not-need-an-effect";
|
|
|
|
const compat = new FlatCompat({
|
|
baseDirectory: import.meta.dirname,
|
|
});
|
|
|
|
export default tseslint.config(
|
|
{
|
|
ignores: [".next", "playwright-output"],
|
|
},
|
|
// next config
|
|
...compat.extends("next/core-web-vitals"),
|
|
{
|
|
files: ["**/*.ts", "**/*.tsx"],
|
|
extends: [
|
|
...tseslint.configs.recommended,
|
|
...tseslint.configs.recommendedTypeChecked,
|
|
...tseslint.configs.stylisticTypeChecked,
|
|
],
|
|
rules: {
|
|
"@typescript-eslint/array-type": "off",
|
|
"@typescript-eslint/consistent-type-definitions": "off",
|
|
"@typescript-eslint/consistent-type-imports": [
|
|
"warn",
|
|
{ prefer: "type-imports", fixStyle: "inline-type-imports" },
|
|
],
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"error",
|
|
{ argsIgnorePattern: "^_" },
|
|
],
|
|
"@typescript-eslint/require-await": "off",
|
|
"@typescript-eslint/no-misused-promises": [
|
|
"error",
|
|
{ checksVoidReturn: { attributes: false } },
|
|
],
|
|
"@typescript-eslint/prefer-nullish-coalescing": "off",
|
|
"@typescript-eslint/unbound-method": "off",
|
|
"@typescript-eslint/consistent-indexed-object-style": "off",
|
|
"@typescript-eslint/non-nullable-type-assertion-style": "off",
|
|
"no-restricted-imports": [
|
|
"error",
|
|
{
|
|
paths: [
|
|
{
|
|
// https://github.com/diegomura/react-pdf/issues/2890#issuecomment-2443831013
|
|
name: "@react-pdf/renderer",
|
|
message:
|
|
"Please use @react-pdf/renderer/lib/react-pdf.browser instead. Check https://github.com/diegomura/react-pdf/issues/2890#issuecomment-2443831013 for more details.",
|
|
},
|
|
{
|
|
name: "node:process",
|
|
message: "Please use @/env.ts instead.",
|
|
},
|
|
{
|
|
name: "process",
|
|
message: "Please use @/env.ts instead.",
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
rules: {
|
|
"no-console": ["warn", { allow: ["error"] }],
|
|
},
|
|
},
|
|
{
|
|
files: ["src/**/*.ts", "src/**/*.tsx"],
|
|
plugins: {
|
|
"react-you-might-not-need-an-effect": youMightNotNeedAnEffect,
|
|
},
|
|
rules: {
|
|
"react-you-might-not-need-an-effect/you-might-not-need-an-effect": "warn",
|
|
},
|
|
},
|
|
// Playwright config for e2e tests only
|
|
{
|
|
...playwright.configs["flat/recommended"],
|
|
files: ["e2e/**"],
|
|
rules: {
|
|
...playwright.configs["flat/recommended"].rules,
|
|
// Customize Playwright rules
|
|
// ...
|
|
},
|
|
},
|
|
{
|
|
linterOptions: {
|
|
reportUnusedDisableDirectives: true,
|
|
},
|
|
languageOptions: {
|
|
parserOptions: {
|
|
projectService: true,
|
|
},
|
|
},
|
|
},
|
|
);
|