fix: eslint for example project (#407)

* chore: fix eslint for example project

* chore: fix linting
This commit is contained in:
Corbin Crutchley
2023-08-28 18:22:22 -07:00
committed by GitHub
parent 7ee5524693
commit 77594a63ba
4 changed files with 25 additions and 13 deletions

View File

@@ -1,7 +0,0 @@
{
"extends": ["react-app", "prettier"],
"rules": {
// "eqeqeq": 0,
// "jsx-a11y/anchor-is-valid": 0
}
}

View File

@@ -0,0 +1,15 @@
// @ts-check
/** @type {import('eslint').Linter.Config} */
const config = {
extends: ["plugin:react/recommended", "plugin:react-hooks/recommended"],
parserOptions: {
tsconfigRootDir: __dirname,
project: "./tsconfig.json",
},
rules: {
"react/no-children-prop": "off",
},
};
module.exports = config;

View File

@@ -1,11 +1,7 @@
import React from "react";
import ReactDOM from "react-dom/client";
import {
FieldApi,
FormApi,
createFormFactory,
useField,
} from "@tanstack/react-form";
import { createFormFactory } from "@tanstack/react-form";
import type { FieldApi } from "@tanstack/react-form";
type Person = {
firstName: string;

View File

@@ -0,0 +1,8 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"jsx": "react",
"noEmit": true
},
"include": ["**/*.ts", "**/*.tsx", ".eslintrc.cjs", "rollup.config.js"]
}