Skip to content

Commit 77594a6

Browse files
authored
fix: eslint for example project (#407)
* chore: fix eslint for example project * chore: fix linting
1 parent 7ee5524 commit 77594a6

File tree

4 files changed

+25
-13
lines changed

4 files changed

+25
-13
lines changed

examples/react/simple/.eslintrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

examples/react/simple/.eslintrc.cjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// @ts-check
2+
3+
/** @type {import('eslint').Linter.Config} */
4+
const config = {
5+
extends: ["plugin:react/recommended", "plugin:react-hooks/recommended"],
6+
parserOptions: {
7+
tsconfigRootDir: __dirname,
8+
project: "./tsconfig.json",
9+
},
10+
rules: {
11+
"react/no-children-prop": "off",
12+
},
13+
};
14+
15+
module.exports = config;

examples/react/simple/src/index.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import React from "react";
22
import ReactDOM from "react-dom/client";
3-
import {
4-
FieldApi,
5-
FormApi,
6-
createFormFactory,
7-
useField,
8-
} from "@tanstack/react-form";
3+
import { createFormFactory } from "@tanstack/react-form";
4+
import type { FieldApi } from "@tanstack/react-form";
95

106
type Person = {
117
firstName: string;

examples/react/simple/tsconfig.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "../../../tsconfig.json",
3+
"compilerOptions": {
4+
"jsx": "react",
5+
"noEmit": true
6+
},
7+
"include": ["**/*.ts", "**/*.tsx", ".eslintrc.cjs", "rollup.config.js"]
8+
}

0 commit comments

Comments
 (0)