Skip to content

Commit

Permalink
Support running PWA in offline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kuchta committed Apr 7, 2024
1 parent 3514fa3 commit a20f746
Show file tree
Hide file tree
Showing 19 changed files with 2,865 additions and 223 deletions.
14 changes: 0 additions & 14 deletions .eslintrc.yaml

This file was deleted.

66 changes: 66 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// @ts-check

import eslint from '@eslint/js'
import tslint from 'typescript-eslint'
import stylistic from '@stylistic/eslint-plugin'
import globals from 'globals'
import reactConfig from 'eslint-config-react-app'
import importPlugin from 'eslint-plugin-import'
import flowtypePlugin from 'eslint-plugin-flowtype'
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y'
import reactPlugin from 'eslint-plugin-react'
import reactHooksPlugin from 'eslint-plugin-react-hooks'


export default tslint.config({
files: ['**/*.{js,jsx}'],
extends: [ eslint.configs.recommended ],
}, {
files: ['**/*.{ts,tsx}'],
extends: [
eslint.configs.recommended,
...tslint.configs.recommended,
],
plugins: {
'@typescript-eslint': tslint.plugin,
'@stylistic': stylistic,
'import': importPlugin,
'flowtype': flowtypePlugin,
'jsx-a11y': jsxA11yPlugin,
'react': reactPlugin,
'react-hooks': reactHooksPlugin,
},
languageOptions: {
parser: tslint.parser,
parserOptions: {
project: true,
},
globals: {
...globals.browser,
'JSX': 'readonly'
}
},
settings: {
react: {
version: 'detect'
}
},
rules: {
...reactConfig.overrides.rules,
...reactConfig.rules,
'semi': ['error', 'never'],
'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'],
'eqeqeq': ['error', 'always', {'null': 'ignore'}],
'default-case': 'off',
'no-cond-assign': 'off',
'no-mixed-operators': 'off',
'import/no-anonymous-default-export': 'off',
'@stylistic/quotes': ['warn', 'single'],
'@stylistic/jsx-quotes': ['warn', 'prefer-double'],
'@typescript-eslint/no-unsafe-argument': 'error',
'@typescript-eslint/no-unsafe-assignment': 'error',
'@typescript-eslint/no-unsafe-call': 'error',
'@typescript-eslint/no-unsafe-member-access': 'error',
'@typescript-eslint/no-unsafe-return': 'error',
}
})
7 changes: 3 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
<html lang="en" data-theme="autumn">
<head>
<title>RadixVerse</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="icon" href="/favicon.webp">
<link rel="manifest" href="/manifest.json">
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<link rel="icon" href="/images/icon.ico" sizes="48x48">
<script type="module" src="/src/app.tsx"></script>
</head>
<body>
Expand Down
9 changes: 0 additions & 9 deletions manifest.json

This file was deleted.

30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,32 @@
"version": "0.0.3",
"homepage": "https://kuchta.github.com/radixverse",
"repository": "kuchta/radixverse",
"packageManager": "pnpm@8.11.0",
"type": "module",
"author": {
"name": "Míla Kuchta",
"email": "mila.kuchta@gmail.com"
},
"packageManager": "pnpm@8.11.0",
"engines": { "node": ">= v20" },
"author": { "name": "Míla Kuchta", "email": "mila.kuchta@gmail.com" },
"scripts": {
"start": "vite --host",
"check": "tsc",
"check-watch": "tsc --watch",
"lint": "eslint --ext ts,tsx --report-unused-disable-directives --max-warnings 10 ./src",
"test": "tsx --test src/**/*.test.ts",
"lint": "eslint --report-unused-disable-directives src",
"test": "tsx --test src/*.test.ts",
"build": "vite build",
"preview": "vite preview --host",
"preview": "vite preview",
"pre-commit": "npm run check && npm run lint && npm run build && npm test"
},
"devDependencies": {
"@types/node": "^20.12.2",
"@types/react": "^18.2.73",
"@types/react-dom": "^18.2.23",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"@stylistic/eslint-plugin": "^1.7.0",
"@types/node": "^20.12.5",
"@types/react": "^18.2.74",
"@types/react-dom": "^18.2.24",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.19",
"daisyui": "^4.9.0",
"daisyui": "^4.10.1",
"eslint": "^8.57.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-react-hooks": "4.6.0",
"globals": "^15.0.0",
"postcss": "^8.4.38",
"react": "0.0.0-experimental-c17a27ef4-20231127",
"react-dom": "0.0.0-experimental-c17a27ef4-20231127",
Expand All @@ -39,6 +37,8 @@
"tailwindcss": "^3.4.1",
"tsx": "^4.7.0",
"typescript": "^5.3.3",
"vite": "^5.0.12"
"typescript-eslint": "^7.5.0",
"vite": "5.2.8",
"vite-plugin-pwa": "^0.19.8"
}
}
Loading

0 comments on commit a20f746

Please sign in to comment.