Skip to content

Commit c23e35e

Browse files
committed
Use root eslintrc for demo + Fix lint issues
1 parent bf9ef15 commit c23e35e

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
'plugin:react-hooks/recommended',
1515
'prettier',
1616
],
17-
ignorePatterns: ['/packages/*/dist/'],
17+
ignorePatterns: ['/apps/*/build/', '/packages/*/dist/'],
1818
root: true, // Prevents eslint from looking for config files in parent directories of project root.
1919
parser: '@typescript-eslint/parser',
2020
parserOptions: {
@@ -78,6 +78,7 @@ module.exports = {
7878
'jest/prefer-to-have-length': 'warn',
7979
'jest/valid-expect': 'warn',
8080
'react/display-name': 'off', // Triggers incorrectly, and is about obsolete createReactClass anyway.
81+
'react/no-unescaped-entities': 'off', // Not that useful, and makes source less readable.
8182
'sort-imports': ['warn', { ignoreDeclarationSort: true }], // `import {B, A} from ..` ~> `import {A, B} from ..`
8283
},
8384
}

apps/react-hook-tracer-demo/package.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@
2020
"type-check": "tsc",
2121
"type-check-watch": "yarn type-check --watch"
2222
},
23-
"eslintConfig": {
24-
"extends": [
25-
"react-app",
26-
"react-app/jest"
27-
]
28-
},
2923
"browserslist": {
3024
"production": [
3125
">0.2%",

apps/react-hook-tracer-demo/src/App.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
/* eslint-disable @typescript-eslint/no-use-before-define */
22
import { ReactEventHandler, useCallback, useEffect, useState } from 'react'
3-
import { clearLog, resetComponentRegistry, setTracerConfig, TraceLog } from 'react-hook-tracer'
3+
import { TraceLog, clearLog, resetComponentRegistry, setTracerConfig } from 'react-hook-tracer'
4+
5+
import { ItemSelector } from './ItemSelector'
46
import * as contextDemo from './demos/ContextDemo'
5-
import * as demo from './demos/Demo'
67
import * as counter from './demos/Counter'
7-
import * as reducer from './demos/Reducer'
8+
import * as demo from './demos/Demo'
89
import * as domRef from './demos/DomRef'
9-
import { ItemSelector } from './ItemSelector'
10+
import * as reducer from './demos/Reducer'
1011

1112
import './App.css'
1213

0 commit comments

Comments
 (0)