Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
install & configure prettier + install missing dep
Browse files Browse the repository at this point in the history
  • Loading branch information
subject026 committed Jan 23, 2023
1 parent ec426b8 commit bad242d
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 26 deletions.
26 changes: 13 additions & 13 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
module.exports = {
env: {
browser: true,
es2021: true,
es2021: true
},
extends: ['plugin:react/recommended', 'airbnb'],
extends: ['plugin:react/recommended', 'airbnb', 'prettier'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
jsx: true
},
ecmaVersion: 'latest',
sourceType: 'module',
sourceType: 'module'
},
plugins: ['react', '@typescript-eslint', 'import'],
plugins: ['react', '@typescript-eslint', 'import', 'prettier'],
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
extensions: ['.js', '.jsx', '.ts', '.tsx']
},
typescript: {
project: './tsconfig.json',
},
},
project: './tsconfig.json'
}
}
},
rules: {
indent: ['error', 2, { SwitchCase: 1 }],
Expand All @@ -33,8 +33,8 @@ module.exports = {
'ignorePackages',
{
tsx: 'never',
ts: 'never',
},
],
},
ts: 'never'
}
]
}
};
7 changes: 7 additions & 0 deletions .otherrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"plugins": [
"prettier-plugin-organize-imports",
"prettier-plugin-tailwindcss"
],
"pluginSearchDirs": false
}
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 80
}
14 changes: 4 additions & 10 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"eslint.format.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"[typescriptreact]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
}
,
"tailwindCSS.rootFontSize": 18,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"tailwindCSS.rootFontSize": 18
}
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"hardhat:fund": "HARDHAT_NETWORK=localhost node hardhat/fund.js",
"e2e:local": "yarn build:testing && ts-node tests/scripts/local.ts",
"test:synpress": "env-cmd -f .env yarn synpress run --config supportFile='tests/e2e/support.js'",
"lint": "eslint src --ext .ts,.tsx"
"lint": "eslint src --ext .ts,.tsx",
"format": "prettier --config .prettierrc 'src/**/*.ts' --write"
},
"dependencies": {
"@esbuild-plugins/node-globals-polyfill": "^0.1.1",
Expand All @@ -35,6 +36,7 @@
"gsap": "^3.9.1",
"hardhat-ethernal": "^2.1.0",
"postcss": "^8.4.6",
"prettier-plugin-tailwindcss": "^0.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.3.0",
Expand All @@ -61,6 +63,7 @@
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1",
"babel-loader": "^8.2.5",
"chalk": "^5.2.0",
"eslint": "^8.26.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
Expand All @@ -72,7 +75,8 @@
"hardhat": "^2.11.2",
"kill-port": "^2.0.1",
"postcss-import": "^14.1.0",
"prettier": "^2.5.1",
"prettier": "^2.8.3",
"prettier-plugin-organize-imports": "^3.2.2",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.3",
"ts-node": "^10.9.1",
Expand Down
5 changes: 5 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import prettier from 'prettier-plugin-tailwindcss';

export default {
plugins: [prettier],
};
22 changes: 21 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7618,6 +7618,11 @@ chalk@^5.0.1:
resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.1.2.tgz#d957f370038b75ac572471e83be4c5ca9f8e8c45"
integrity sha512-E5CkT4jWURs1Vy5qGJye+XwCkNj7Od3Af7CP6SujMetSMkLs8Do2RWJK5yx1wamHV/op8Rz+9rltjaTQWDnEFQ==

chalk@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3"
integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==

chance@^1.1.4:
version "1.1.9"
resolved "https://registry.yarnpkg.com/chance/-/chance-1.1.9.tgz#fbf409726a956415b4bde0e8db010f60b60fc01b"
Expand Down Expand Up @@ -16237,16 +16242,31 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"

prettier-plugin-organize-imports@^3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-3.2.2.tgz#91993365e017daa5d0d28d8183179834224d8dd1"
integrity sha512-e97lE6odGSiHonHJMTYC0q0iLXQyw0u5z/PJpvP/3vRy6/Zi9kLBwFAbEGjDzIowpjQv8b+J04PDamoUSQbzGA==

prettier-plugin-tailwindcss@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.2.1.tgz#989b35afd86c550cb671da69891aba4f4a051159"
integrity sha512-aIO8IguumORyRsmT+E7JfJ3A9FEoyhqZR7Au7TBOege3VZkgMvHJMkufeYp4zjnDK2iq4ktkvGMNOQR9T8lisQ==

"prettier@>=2.2.1 <=2.3.0":
version "2.3.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18"
integrity sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w==

prettier@^2.5.1, prettier@^2.7.1:
prettier@^2.7.1:
version "2.7.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64"
integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==

prettier@^2.8.3:
version "2.8.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.3.tgz#ab697b1d3dd46fb4626fbe2f543afe0cc98d8632"
integrity sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==

pretty-bytes@^5.6.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb"
Expand Down

0 comments on commit bad242d

Please sign in to comment.