v1.0 with SW PWA enabled

This commit is contained in:
Blomios
2026-01-01 17:40:53 +01:00
parent 1c0e22aac1
commit 3c8bebb2ad
29775 changed files with 2197201 additions and 119080 deletions

View File

@ -0,0 +1,18 @@
// @ts-check
import rootConfig from './root.eslint.config.js'
export default [
...rootConfig,
{
rules: {
'cspell/spellchecker': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
'import/no-duplicates': 'off',
'import/no-unresolved': 'off',
'import/order': 'off',
'no-shadow': 'off',
'sort-imports': 'off',
},
},
]

View File

@ -0,0 +1,38 @@
{
"name": "@tanstack/query-codemods",
"private": true,
"description": "Collection of codemods to make the migration easier.",
"author": "Balázs Máté Petró",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/TanStack/query.git",
"directory": "packages/query-codemods"
},
"homepage": "https://tanstack.com/query",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"scripts": {
"clean": "premove ./coverage ./dist-ts",
"test:eslint": "eslint --concurrency=auto ./src",
"test:lib": "vitest",
"test:lib:dev": "pnpm run test:lib --watch"
},
"type": "module",
"exports": {
"./package.json": "./package.json"
},
"sideEffects": false,
"files": [
"src",
"!src/jest.config.js",
"!src/**/__testfixtures__",
"!src/**/__tests__"
],
"devDependencies": {
"@types/jscodeshift": "17.3.0",
"jscodeshift": "17.3.0"
}
}

View File

@ -0,0 +1,56 @@
// @ts-check
// @ts-ignore Needed due to moduleResolution Node vs Bundler
import { tanstackConfig } from '@tanstack/eslint-config'
import pluginCspell from '@cspell/eslint-plugin'
import vitest from '@vitest/eslint-plugin'
export default [
...tanstackConfig,
{
name: 'tanstack/temp',
plugins: {
cspell: pluginCspell,
},
rules: {
'cspell/spellchecker': [
'warn',
{
cspell: {
words: [
'Promisable', // Our public interface
'TSES', // @typescript-eslint package's interface
'codemod', // We support our codemod
'combinate', // Library name
'datatag', // Query options tagging
'extralight', // Our public interface
'jscodeshift',
'refetches', // Query refetch operations
'retryer', // Our public interface
'solidjs', // Our target framework
'tabular-nums', // https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-numeric
'tanstack', // Our package scope
'todos', // Too general word to be caught as error
'tsqd', // Our public interface (TanStack Query Devtools shorthand)
'tsup', // We use tsup as builder
'typecheck', // Field of vite.config.ts
'vue-demi', // dependency of @tanstack/vue-query
'ɵkind', // Angular specific
'ɵproviders', // Angular specific
],
},
},
],
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'no-case-declarations': 'off',
'prefer-const': 'off',
},
},
{
files: ['**/*.spec.ts*', '**/*.test.ts*', '**/*.test-d.ts*'],
plugins: { vitest },
rules: vitest.configs.recommended.rules,
settings: { vitest: { typecheck: true } },
},
]

View File

@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "./dist-ts",
"rootDir": "."
},
"include": ["src", "*.config.*", "package.json"]
}

View File

@ -0,0 +1,26 @@
import { defineConfig } from 'vitest/config'
import packageJson from './package.json'
export default defineConfig({
// fix from https://github.com/vitest-dev/vitest/issues/6992#issuecomment-2509408660
resolve: {
conditions: ['@tanstack/custom-condition'],
},
environments: {
ssr: {
resolve: {
conditions: ['@tanstack/custom-condition'],
},
},
},
test: {
name: packageJson.name,
dir: './src',
watch: false,
globals: true,
coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'] },
typecheck: { enabled: true },
restoreMocks: true,
},
})