-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59d8b89
commit 3b5ae1b
Showing
35 changed files
with
2,328 additions
and
1,896 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import eslint from '@eslint/js'; | ||
import eslintFunctional from 'eslint-plugin-functional'; | ||
import eslintImport from 'eslint-plugin-import'; | ||
import { | ||
config as eslintTypescriptConfig, | ||
configs as eslintTypescriptConfigs, | ||
parser as eslintTypescriptParser, | ||
} from 'typescript-eslint'; | ||
import eslintUnusedImports from 'eslint-plugin-unused-imports'; | ||
import eslintReact from 'eslint-plugin-react'; | ||
import eslintReactHooks from 'eslint-plugin-react-hooks'; | ||
import eslintTailwindcss from 'eslint-plugin-tailwindcss'; | ||
|
||
export default eslintTypescriptConfig({ | ||
extends: [ | ||
eslint.configs.recommended, | ||
eslintImport.flatConfigs.react, | ||
eslintImport.flatConfigs.recommended, | ||
eslintImport.flatConfigs.typescript, | ||
eslintReact.configs.flat.recommended, | ||
eslintReact.configs.flat['jsx-runtime'], | ||
eslintTailwindcss.configs['flat/recommended'], | ||
eslintTypescriptConfigs.strict, | ||
], | ||
plugins: { | ||
functional: eslintFunctional, | ||
'unused-imports': eslintUnusedImports, | ||
'react-hooks': eslintReactHooks, | ||
}, | ||
languageOptions: { | ||
parser: eslintTypescriptParser, | ||
parserOptions: { | ||
project: './tsconfig.eslint.json', | ||
}, | ||
}, | ||
rules: { | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_', | ||
destructuredArrayIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
}, | ||
], | ||
'linebreak-style': ['error', 'unix'], | ||
'no-constant-condition': ['error', { checkLoops: false }], | ||
quotes: ['error', 'single', { avoidEscape: true }], | ||
semi: ['error', 'always'], | ||
'@typescript-eslint/consistent-type-imports': 'error', | ||
'functional/immutable-data': 'error', | ||
'functional/no-let': 'error', | ||
'functional/prefer-tacit': 'error', | ||
'import/order': 'error', | ||
'no-param-reassign': 'error', | ||
'no-var': 'error', | ||
'prefer-const': 'error', | ||
'unused-imports/no-unused-imports': 'error', | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'warn', | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
typescript: true, | ||
node: { | ||
extensions: ['.cjs', '.d.ts', '.js', '.jsx', '.mjs', '.ts', '.tsx'], | ||
}, | ||
}, | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
{ | ||
"name": "react-petstore", | ||
"type": "module", | ||
"version": "1.0.0", | ||
"description": "A skeleton react app for the petstore api.", | ||
"keywords": [ | ||
"chubbyts", | ||
|
@@ -13,50 +12,53 @@ | |
"repository": "chubbyts/react-petstore", | ||
"scripts": { | ||
"build": "tsc && vite build", | ||
"cs-fix": "prettier --write src tests *.cjs *.js *.ts", | ||
"cs": "prettier --check src tests *.cjs *.js *.ts", | ||
"cs-fix": "prettier --write src tests *.js *.ts", | ||
"cs": "prettier --check src tests *.js *.ts", | ||
"develop": "vite", | ||
"lint-fix": "eslint src tests *.cjs *.js *.ts --fix", | ||
"lint": "eslint src tests *.cjs *.js *.ts", | ||
"lint-fix": "eslint src tests *.js *.ts --fix", | ||
"lint": "eslint src tests", | ||
"start": "pnpm i && pnpm cs-fix && pnpm develop", | ||
"test": "vitest" | ||
}, | ||
"dependencies": { | ||
"@chubbyts/chubbyts-throwable-to-error": "^1.2.1", | ||
"cross-fetch": "^4.0.0", | ||
"date-fns": "^3.6.0", | ||
"qs": "^6.12.1", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"react-router-dom": "^6.23.1", | ||
"zod": "^3.23.8" | ||
"@chubbyts/chubbyts-throwable-to-error": "^1.3.2", | ||
"cross-fetch": "^4.1.0", | ||
"date-fns": "^4.1.0", | ||
"qs": "^6.13.1", | ||
"react": "^19.0.0", | ||
"react-dom": "^19.0.0", | ||
"react-router-dom": "^7.1.1", | ||
"zod": "^3.24.1" | ||
}, | ||
"devDependencies": { | ||
"@chubbyts/chubbyts-function-mock": "^1.4.1", | ||
"@chubbyts/chubbyts-function-mock": "^1.5.2", | ||
"@eslint/js": "^9.17.0", | ||
"@prettier/sync": "^0.5.2", | ||
"@testing-library/react": "^16.0.0", | ||
"@testing-library/react": "^16.1.0", | ||
"@testing-library/user-event": "^14.5.2", | ||
"@types/node": "^20.14.2", | ||
"@types/qs": "^6.9.15", | ||
"@types/react": "^18.3.3", | ||
"@types/react-dom": "^18.3.0", | ||
"@typescript-eslint/eslint-plugin": "^7.13.0", | ||
"@typescript-eslint/parser": "^7.13.0", | ||
"@vitejs/plugin-react-swc": "^3.7.0", | ||
"@vitest/coverage-v8": "^1.6.0", | ||
"autoprefixer": "^10.4.19", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-react": "^7.34.2", | ||
"eslint-plugin-react-hooks": "^4.6.2", | ||
"eslint-plugin-tailwindcss": "^3.17.3", | ||
"jsdom": "^24.1.0", | ||
"postcss": "^8.4.38", | ||
"prettier": "^3.3.2", | ||
"tailwindcss": "^3.4.4", | ||
"typescript": "^5.4.5", | ||
"vite": "^5.3.1", | ||
"vitest": "^1.6.0" | ||
"@types/node": "^22.10.5", | ||
"@types/qs": "^6.9.17", | ||
"@types/react": "^19.0.2", | ||
"@types/react-dom": "^19.0.2", | ||
"@vitejs/plugin-react-swc": "^3.7.2", | ||
"@vitest/coverage-v8": "^2.1.8", | ||
"autoprefixer": "^10.4.20", | ||
"eslint": "^9.17.0", | ||
"eslint-import-resolver-typescript": "^3.7.0", | ||
"eslint-plugin-functional": "^7.2.0", | ||
"eslint-plugin-import": "^2.31.0", | ||
"eslint-plugin-react-hooks": "^5.1.0", | ||
"eslint-plugin-react": "^7.37.3", | ||
"eslint-plugin-tailwindcss": "^3.17.5", | ||
"eslint-plugin-unused-imports": "^4.1.4", | ||
"jsdom": "^25.0.1", | ||
"postcss": "^8.4.49", | ||
"prettier": "^3.4.2", | ||
"tailwindcss": "^3.4.17", | ||
"typescript-eslint": "^8.19.0", | ||
"typescript": "^5.7.2", | ||
"vite": "^6.0.7", | ||
"vitest": "^2.1.8" | ||
}, | ||
"engines": { | ||
"node": ">=18" | ||
|
@@ -66,5 +68,6 @@ | |
"tabWidth": 2, | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} | ||
}, | ||
"packageManager": "[email protected]+sha512.93e57b0126f0df74ce6bff29680394c0ba54ec47246b9cf321f0121d8d9bb03f750a705f24edc3c1180853afd7c2c3b94196d0a3d53d3e069d9e2793ef11f321" | ||
} |
Oops, something went wrong.