@stanlemon/app-template 0.3.55 → 0.3.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ export { default } from "@stanlemon/eslint-config";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stanlemon/app-template",
3
- "version": "0.3.55",
3
+ "version": "0.3.57",
4
4
  "description": "A template for creating apps using the webdev package.",
5
5
  "author": "Stan Lemon <stanlemon@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -11,14 +11,14 @@
11
11
  "start:dev": "NODE_ENV=development nodemon --ignore ./db.json app.js",
12
12
  "build": "npm run webpack:build",
13
13
  "tsc": "tsc",
14
- "webpack:serve": "webpack serve",
14
+ "webpack:serve": "NODE_ENV=development webpack serve",
15
15
  "webpack:build": "NODE_ENV=production webpack",
16
16
  "dev": "NODE_ENV=development concurrently \"npm run webpack:serve\" \"npm run start:dev\"",
17
17
  "test": "jest --detectOpenHandles",
18
18
  "test:watch": "jest -w",
19
19
  "test:coverage": "jest --coverage",
20
- "lint": "eslint --ext js,jsx,ts,tsx ./src/",
21
- "lint:fix": "eslint --fix --ext js,jsx,ts,tsx ./src/"
20
+ "lint": "eslint .",
21
+ "lint:fix": "eslint --fix ."
22
22
  },
23
23
  "dependencies": {
24
24
  "@stanlemon/server-with-auth": "*",
@@ -31,9 +31,11 @@
31
31
  "devDependencies": {
32
32
  "@testing-library/react": "^16.0.1",
33
33
  "@testing-library/user-event": "^14.5.2",
34
- "@types/react": "^18.3.11",
34
+ "@types/jest": "^29.5.13",
35
+ "@types/react": "^18.3.8",
35
36
  "@types/react-dom": "^18.3.0",
36
37
  "concurrently": "^9.0.1",
38
+ "nodemon": "^3.1.7",
37
39
  "supertest": "^7.0.0"
38
40
  }
39
41
  }
package/src/App.test.tsx CHANGED
@@ -3,7 +3,7 @@ import { render, screen, waitFor } from "@testing-library/react";
3
3
  import App from "./App";
4
4
  import { ItemData } from "./views";
5
5
  import { SessionAware } from "./Session";
6
- import fetchApi from "./helpers/fetchApi";
6
+ import { fetchApi } from "./helpers/fetchApi";
7
7
 
8
8
  jest.mock("./helpers/fetchApi");
9
9
 
package/src/Session.tsx CHANGED
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect, useContext, createContext } from "react";
2
2
  import { useCookies } from "react-cookie";
3
3
  import { ErrorMessage } from "./components/";
4
- import fetchApi from "./helpers/fetchApi";
4
+ import { fetchApi } from "./helpers/fetchApi";
5
5
 
6
6
  type SessionContextProperties = {
7
7
  initialized: boolean;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { createElement } from "react";
2
2
 
3
3
  export function Column({
4
4
  as = "div",
@@ -7,7 +7,7 @@ export function Column({
7
7
  as?: keyof React.JSX.IntrinsicElements;
8
8
  children?: React.ReactNode;
9
9
  }) {
10
- return React.createElement(
10
+ return createElement(
11
11
  as,
12
12
  {
13
13
  style: {
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { createElement } from "react";
2
2
 
3
3
  export function Row({
4
4
  as = "div",
@@ -7,7 +7,7 @@ export function Row({
7
7
  as?: keyof React.JSX.IntrinsicElements;
8
8
  children?: React.ReactNode;
9
9
  }) {
10
- return React.createElement(
10
+ return createElement(
11
11
  as,
12
12
  {
13
13
  style: {
@@ -3,7 +3,7 @@ import { render, screen, fireEvent, waitFor } from "@testing-library/react";
3
3
  import userEvent from "@testing-library/user-event";
4
4
  import { Account, PasswordRequest, ProfileForm } from "./";
5
5
  import { SessionAware } from "../Session";
6
- import fetchApi from "../helpers/fetchApi";
6
+ import { fetchApi } from "../helpers/fetchApi";
7
7
 
8
8
  jest.mock("../helpers/fetchApi");
9
9
 
@@ -1,9 +1,9 @@
1
1
  import "@testing-library/jest-dom";
2
2
  import { render, screen, fireEvent } from "@testing-library/react";
3
3
  import userEvent from "@testing-library/user-event";
4
- import Items, { ItemData } from "./Items";
4
+ import { Items, ItemData } from "./Items";
5
5
  import { SessionAware } from "../Session";
6
- import fetchApi from "../helpers/fetchApi";
6
+ import { fetchApi } from "../helpers/fetchApi";
7
7
 
8
8
  jest.mock("../helpers/fetchApi");
9
9
 
@@ -2,7 +2,7 @@ import { useState, useContext } from "react";
2
2
  import { useCookies } from "react-cookie";
3
3
  import { Input, Spacer } from "../components/";
4
4
  import { ProfileData, SessionContext, SessionData } from "../Session";
5
- import fetchApi, { ApiError } from "../helpers/fetchApi";
5
+ import { fetchApi, ApiError } from "../helpers/fetchApi";
6
6
 
7
7
  export type LoginForm = {
8
8
  username: string;
@@ -1,7 +1,7 @@
1
1
  import { useContext, useState } from "react";
2
2
  import { SessionContext } from "../Session";
3
3
  import { Header, Input } from "../components";
4
- import fetchApi, { ApiError } from "../helpers/fetchApi";
4
+ import { fetchApi, ApiError } from "../helpers/fetchApi";
5
5
 
6
6
  export type PasswordForm = {
7
7
  current_password: string;
@@ -1,7 +1,7 @@
1
1
  import { useContext, useState } from "react";
2
2
  import { ProfileData, SessionContext } from "../Session";
3
3
  import { Header, Input } from "../components";
4
- import fetchApi, { ApiError } from "../helpers/fetchApi";
4
+ import { fetchApi, ApiError } from "../helpers/fetchApi";
5
5
 
6
6
  export type ProfileForm = {
7
7
  name: string;
@@ -1,7 +1,7 @@
1
1
  import { useState, useContext } from "react";
2
2
  import { Input, Spacer } from "../components/";
3
3
  import { SessionContext, ProfileData, SessionData } from "../Session";
4
- import fetchApi, { ApiError } from "../helpers/fetchApi";
4
+ import { fetchApi, ApiError } from "../helpers/fetchApi";
5
5
 
6
6
  export type FormErrors = {
7
7
  errors: Record<string, string>;
@@ -1,5 +1,5 @@
1
1
  import { useContext, useEffect } from "react";
2
- import fetchApi, { ApiError } from "../helpers/fetchApi";
2
+ import { fetchApi, ApiError } from "../helpers/fetchApi";
3
3
  import { SessionContext } from "../Session";
4
4
 
5
5
  export function Verify({ token = null }: { token: string | null }) {
package/.eslintrc.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "extends": [
3
- "@stanlemon"
4
- ]
5
- }