Skip to content

Commit

Permalink
fix: eslint for example project (#407)
Browse files Browse the repository at this point in the history
* chore: fix eslint for example project

* chore: fix linting
  • Loading branch information
crutchcorn authored Aug 29, 2023
1 parent 7ee5524 commit 77594a6
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 13 deletions.
7 changes: 0 additions & 7 deletions examples/react/simple/.eslintrc

This file was deleted.

15 changes: 15 additions & 0 deletions examples/react/simple/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -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;
8 changes: 2 additions & 6 deletions examples/react/simple/src/index.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
8 changes: 8 additions & 0 deletions examples/react/simple/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"jsx": "react",
"noEmit": true
},
"include": ["**/*.ts", "**/*.tsx", ".eslintrc.cjs", "rollup.config.js"]
}

0 comments on commit 77594a6

Please sign in to comment.