Skip to content

Commit

Permalink
Set up ESLint and add Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
skrypka89 committed Jun 25, 2023
1 parent 88cf905 commit 92eae47
Show file tree
Hide file tree
Showing 13 changed files with 2,037 additions and 220 deletions.
14 changes: 0 additions & 14 deletions .eslintrc.cjs

This file was deleted.

47 changes: 47 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:prettier/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": { "jsx": true },
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"import",
"prettier",
"react",
"react-hooks"
],
"root": true,
"rules": {
"import/no-unresolved": "error",
"no-console": "off",
"prettier/prettier": ["error", { "endOfLine": "auto" }]
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"project": "./src"
}
}
}
}
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"singleQuote": true,
"arrowParens": "avoid",
"endOfLine": "auto",
"importOrder": ["^@/(.*)"],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"importOrderGroupNamespaceSpecifiers": true,
"importOrderCaseInsensitive": true
}
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>Form</title>
</head>
<body>
<div id="root"></div>
Expand Down
Loading

0 comments on commit 92eae47

Please sign in to comment.