Skip to content

Commit

Permalink
ESLint, prettier & pre commit hook setup
Browse files Browse the repository at this point in the history
  • Loading branch information
dhairya-rathod committed Sep 22, 2022
1 parent 3906f16 commit 62c6672
Show file tree
Hide file tree
Showing 7 changed files with 7,380 additions and 20 deletions.
12 changes: 12 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# lock file
package-lock.json

# Editor directories and files
.vscode/*
tsconfig.json
tsconfig.node.json
vite.config.json
vite.config.js
.prettierrc
postcss.config.cjs
tailwind.config.cjs
16 changes: 16 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:prettier/recommended"],
"overrides": [],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react"],
"rules": {
"react/react-in-jsx-scope": "off"
}
}
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install lint-staged
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.vscode/*
tsconfig.json
tsconfig.node.json
vite.config.json
.prettierrc
postcss.config.cjs
tailwind.config.cjs
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": true,
"tabWidth": 2,
"printWidth": 100,
"singleQuote": true,
"trailingComma": "none",
"jsxBracketSameLine": false,
"endOfLine": "auto"
}
Loading

0 comments on commit 62c6672

Please sign in to comment.