diff --git a/client/.eslintrc.json b/client/.eslintrc.json index f28ce168..9f44204a 100644 --- a/client/.eslintrc.json +++ b/client/.eslintrc.json @@ -1,12 +1,14 @@ { "env": { "browser": true, + "jest": true, "node": true, "es2021": true }, "extends": [ "plugin:react/recommended", - "airbnb" + "airbnb", + "plugin:prettier/recommended" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -22,6 +24,26 @@ "prettier" ], "rules": { - "prettier/prettier": "error" + "react/jsx-filename-extension": [1, { "extensions": [".tsx"] }], + "prettier/prettier": "error", + "no-use-before-define": "off", + "@typescript-eslint/no-use-before-define": ["error", { "variables": false }], + "import/extensions": [ + "error", + "ignorePackages", + { + "js": "never", + "jsx": "never", + "ts": "never", + "tsx": "never" + } + ] + }, + "settings": { + "import/resolver": { + "node": { + "extensions": [".js", ".jsx", ".ts", ".tsx"] + } + } } } diff --git a/client/.prettierrc.json b/client/.prettierrc.json new file mode 100644 index 00000000..be725c57 --- /dev/null +++ b/client/.prettierrc.json @@ -0,0 +1,10 @@ +{ + "singleQuote": true, + "semi": false, + "tabWidth": 2, + "useTabs": false, + "trailingComma": "all", + "printWidth": 80, + "arrowParens": "always", + "bracketSpacing": true +} diff --git a/client/src/App.tsx b/client/src/App.tsx index 9708fac2..d267e8eb 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -1,5 +1,5 @@ -import React from 'react'; +import React from 'react' -const App = () => <>Init; +const App = () => <>Init -export default App; \ No newline at end of file +export default App diff --git a/client/src/index.tsx b/client/src/index.tsx index 339143ab..40751379 100644 --- a/client/src/index.tsx +++ b/client/src/index.tsx @@ -1,8 +1,8 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; +import React from 'react' +import ReactDOM from 'react-dom' -import App from './App'; +import App from './App' -const rootElement = document.getElementById('root'); +const rootElement = document.getElementById('root') -ReactDOM.render(, rootElement); +ReactDOM.render(, rootElement)