-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2da60f9
commit 1fe7f40
Showing
7 changed files
with
55 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,7 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:jsx-a11y/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": [ | ||
"jsx-a11y", | ||
"import", | ||
"sort-keys-fix", | ||
"react-hooks", | ||
"@typescript-eslint", | ||
"prettier", | ||
"cypress" | ||
], | ||
"extends": "typescript-react-pro", | ||
"plugins": ["cypress"], | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"es6": true, | ||
"jest": true, | ||
"cypress/globals": true | ||
}, | ||
"globals": { | ||
"JSX": "readonly" | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
}, | ||
"import/parsers": { | ||
"@typescript-eslint/parser": [".ts", ".tsx"] | ||
}, | ||
"import/resolver": { | ||
"node": { | ||
"extensions": [".js", ".jsx", ".ts", ".tsx"] | ||
}, | ||
"typescript": { | ||
"alwaysTryTypes": true, | ||
// always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist` | ||
"project": ["tsconfig.json"] | ||
} | ||
} | ||
}, | ||
"rules": { | ||
"no-alert": "error", | ||
"no-console": "error", | ||
"react-hooks/rules-of-hooks": "error", | ||
"prettier/prettier": [ | ||
"warn", | ||
{}, | ||
{ | ||
"properties": { | ||
"usePrettierrc": true | ||
} | ||
} | ||
], | ||
"import/order": [ | ||
"warn", | ||
{ | ||
"groups": [ | ||
"builtin", | ||
"external", | ||
"internal", | ||
"parent", | ||
"sibling", | ||
"index", | ||
"object" | ||
], | ||
"newlines-between": "always", | ||
"alphabetize": { | ||
"order": "asc", | ||
"caseInsensitive": true | ||
} | ||
} | ||
], | ||
"import/named": "error", | ||
"import/default": "error", | ||
"import/export": "error", | ||
"import/no-named-as-default": "warn", | ||
"import/no-named-as-default-member": "off", | ||
"import/no-duplicates": "error", | ||
"import/no-unresolved": "error", | ||
"sort-keys-fix/sort-keys-fix": "warn", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/consistent-type-imports": "warn", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/no-empty-function": "off" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["*.js"], | ||
"rules": { | ||
"@typescript-eslint/explicit-module-boundary-types": ["off"], | ||
"@typescript-eslint/no-var-requires": ["off"] | ||
} | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
import ErrorBoundary from '../ErrorBoundary' | ||
import { RecoilRoot } from 'recoil' | ||
import { BrowserRouter, Routes, Route } from 'react-router-dom' | ||
import TodoMVC from './TodoMVC' | ||
import { RecoilRoot } from 'recoil' | ||
|
||
import ErrorBoundary from '../ErrorBoundary' | ||
import { NotFound } from '../NotFound' | ||
|
||
const App: React.FC = () => (<ErrorBoundary> | ||
<BrowserRouter> | ||
<RecoilRoot> | ||
<Routes> | ||
<Route path="/" element={<TodoMVC />} /> | ||
<Route path="*" element={<NotFound />} /> | ||
</Routes> | ||
</RecoilRoot> | ||
</BrowserRouter> | ||
</ErrorBoundary>) | ||
import TodoMVC from './TodoMVC' | ||
|
||
const App: React.FC = () => ( | ||
<ErrorBoundary> | ||
<BrowserRouter> | ||
<RecoilRoot> | ||
<Routes> | ||
<Route path="/" element={<TodoMVC />} /> | ||
<Route path="*" element={<NotFound />} /> | ||
</Routes> | ||
</RecoilRoot> | ||
</BrowserRouter> | ||
</ErrorBoundary> | ||
) | ||
|
||
export default App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
|
||
import React from 'react' | ||
import ReactDOM from 'react-dom/client' | ||
import { RecoilRoot } from 'recoil' | ||
|
||
import './index.css' | ||
import App from './App' | ||
import ErrorBoundary from './ErrorBoundary' | ||
import { NotFound } from './NotFound' | ||
|
||
const root = ReactDOM.createRoot(document.getElementById('root')!) | ||
|
||
root.render(<App />) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters