Skip to content

Commit

Permalink
chore: initial push
Browse files Browse the repository at this point in the history
  • Loading branch information
crutchcorn committed Dec 31, 2023
0 parents commit 53ea25d
Show file tree
Hide file tree
Showing 26 changed files with 5,650 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
68 changes: 68 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// @ts-check

/** @type {import('eslint').Linter.Config} */
const config = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'import'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'prettier',
],
env: {
browser: true,
es2020: true,
},
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json',
sourceType: 'module',
ecmaVersion: 2020,
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: true,
},
react: {
version: 'detect',
},
},
rules: {
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unnecessary-condition': 'error',
'@typescript-eslint/no-inferrable-types': [
'error',
{
ignoreParameters: true,
},
],
'no-shadow': 'error',
'import/no-cycle': 'error',
'import/no-unresolved': ['error', { ignore: ['^@tanstack/'] }],
'import/no-unused-modules': ['off', { unusedExports: true }],
'no-redeclare': 'off',
'@typescript-eslint/no-unused-vars': 'off',
},
overrides: [
{
files: ['**/*.test.{ts,tsx}'],
rules: {
'@typescript-eslint/no-unnecessary-condition': 'off',
},
},
],
}

module.exports = config
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto eol=lf
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [tannerlinsley]
89 changes: 89 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: '🐛 Bug report'
description: Report a reproducible bug or regression
body:
- type: markdown
attributes:
value: |
Thank you for reporting an issue :pray:.
This issue tracker is for reporting reproducible bugs or regression's found in [TanStack Config](https://github.com/TanStack/config)
If you have a question about how to achieve something and are struggling, please post a question
inside of TanStack Config's [Discussions tab](https://github.com/TanStack/config/discussions)
Before submitting a new bug/issue, please check the links below to see if there is a solution or question posted there already:
- TanStack Config's [Discussions tab](https://github.com/TanStack/config/discussions)
- TanStack Config's [Open Issues](https://github.com/TanStack/config/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)
- TanStack Config's [Closed Issues](https://github.com/TanStack/config/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed)
The more information you fill in, the better the community can help you.
- type: textarea
id: description
attributes:
label: Describe the bug
description: Provide a clear and concise description of the challenge you are running into.
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: Describe the steps we have to take to reproduce the behavior.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
description: Provide a clear and concise description of what you expected to happen.
placeholder: |
As a user, I expected ___ behavior but i am seeing ___
validations:
required: true
- type: dropdown
attributes:
label: How often does this bug happen?
description: |
Following the repro steps above, how easily are you able to reproduce this bug?
options:
- Every time
- Often
- Sometimes
- Only once
- type: textarea
id: screenshots_or_videos
attributes:
label: Screenshots or Videos
description: |
If applicable, add screenshots or a video to help explain your problem.
For more information on the supported file image/file types and the file size limits, please refer
to the following link: https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/attaching-files
placeholder: |
You can drag your video or image files inside of this editor ↓
- type: input
id: rq-version
attributes:
label: TanStack Config version
description: |
Please let us know the exact version of TanStack Config you were using when the issue occurred. Please don't just put in "latest", as this is subject to change.
placeholder: |
e.g. v0.0.1
validations:
required: true
- type: input
id: ts-version
attributes:
label: TypeScript version
description: |
If you are using TypeScript, please let us know the exact version of TypeScript you were using when the issue occurred.
placeholder: |
e.g. v4.9.4
- type: textarea
id: additional
attributes:
label: Additional context
description: Add any other context about the problem here.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Feature Requests & Questions
url: https://github.com/TanStack/config/discussions
about: Please ask and answer questions here.
- name: Community Chat
url: https://discord.gg/mQd7egN
about: A dedicated discord server hosted by Tanner Linsley
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: ci

on:
workflow_dispatch:
inputs:
tag:
description: override release tag
required: false
push:
branches: ['main', 'alpha', 'beta']

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}

jobs:
test-and-publish:
name: Test & Publish
if: github.repository == 'TanStack/config'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Run Tests
run: pnpm run test:ci
- name: Publish
run: |
git config --global user.name 'Tanner Linsley'
git config --global user.email '[email protected]'
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
pnpm run cipublish
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
TAG: ${{ inputs.tag }}
44 changes: 44 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: pr

on:
pull_request:
paths-ignore:
- 'docs/**'
- 'media/**'
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}

jobs:
test:
name: 'Test'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Get appropriate base and head commits for `nx affected` commands
uses: nrwl/nx-set-shas@v3
with:
main-branch-name: 'main'
- name: Run Checks
run: pnpm run test:pr
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
50 changes: 50 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
node_modules
package-lock.json
yarn.lock

# builds
types
build
*/build
dist
lib
es
artifacts
.rpt2_cache
coverage
*.tgz

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
.next

npm-debug.log*
yarn-debug.log*
yarn-error.log*
.history
size-plugin.json
stats-hydration.json
stats.json
stats.html
.vscode/settings.json

*.log
.DS_Store
node_modules
.cache
dist
.idea

nx-cloud.env

.nx/cache
.tsup
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
prefer-workspace-packages=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.19.0
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
**/.next
**/.nx/cache
**/.svelte-kit
**/build
**/coverage
**/dist
**/docs
**/codemods/**/__testfixtures__
pnpm-lock.yaml
Loading

0 comments on commit 53ea25d

Please sign in to comment.