mirror of
https://github.com/LukeHagar/form.git
synced 2025-12-09 12:27:44 +00:00
fix: eslint for example project (#407)
* chore: fix eslint for example project * chore: fix linting
This commit is contained in:
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["react-app", "prettier"],
|
|
||||||
"rules": {
|
|
||||||
// "eqeqeq": 0,
|
|
||||||
// "jsx-a11y/anchor-is-valid": 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
15
examples/react/simple/.eslintrc.cjs
Normal file
15
examples/react/simple/.eslintrc.cjs
Normal 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;
|
||||||
@@ -1,11 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import ReactDOM from "react-dom/client";
|
import ReactDOM from "react-dom/client";
|
||||||
import {
|
import { createFormFactory } from "@tanstack/react-form";
|
||||||
FieldApi,
|
import type { FieldApi } from "@tanstack/react-form";
|
||||||
FormApi,
|
|
||||||
createFormFactory,
|
|
||||||
useField,
|
|
||||||
} from "@tanstack/react-form";
|
|
||||||
|
|
||||||
type Person = {
|
type Person = {
|
||||||
firstName: string;
|
firstName: string;
|
||||||
|
|||||||
8
examples/react/simple/tsconfig.json
Normal file
8
examples/react/simple/tsconfig.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"jsx": "react",
|
||||||
|
"noEmit": true
|
||||||
|
},
|
||||||
|
"include": ["**/*.ts", "**/*.tsx", ".eslintrc.cjs", "rollup.config.js"]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user