Skip to content

Commit

Permalink
feat: add prettier config for tailwind and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tutods committed Feb 6, 2024
1 parent 0435114 commit 188280b
Show file tree
Hide file tree
Showing 11 changed files with 1,509 additions and 1,945 deletions.
1 change: 0 additions & 1 deletion .prettierrc

This file was deleted.

1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"packages/*"
],
"repository": "https://github.com/tutods/lib",
"packageManager": "[email protected]",
"engineStrict": true,
"engines": {
"node": ">=18.x.x",
Expand All @@ -21,7 +22,7 @@
"scripts": {
"commit": "cz",
"prepare": "husky install",
"format": "prettier --write ./packages **/*.md **/*.json",
"format": "prettier --write ./packages **/*.{js,jsx,ts,tsx,md,mdx,html,css}",
"lint": "eslint --ext .js,.ts,.tsx,.jsx packages --ignore-path .gitignore",
"preversion:stable": "lerna version --conventional-graduate --yes",
"version:stable": "lerna publish from-git --yes",
Expand Down
1 change: 0 additions & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@tutods/components",
"private": false,
"publishConfig": {
"access": "public"
},
Expand Down
21 changes: 21 additions & 0 deletions packages/eslint-config/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Daniel Sousa

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
27 changes: 13 additions & 14 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "@tutods/eslint-config",
"description": "ESLint configuration for JavaScript, TypeScript, React, Node.js, TailwindCSS projects, allowing to use other configs like sort imports, sort keys and more.",
"version": "1.16.7",
"private": false,
"keywords": [
"eslint",
"react",
Expand Down Expand Up @@ -65,43 +64,43 @@
"typescript": ">=4"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
},
"@typescript-eslint/eslint-plugin": {
"optional": true
},
"@typescript-eslint/parser": {
"optional": true
},
"eslint-plugin-sort-destructure-keys": {
"eslint-config-prettier": {
"optional": true
},
"eslint-plugin-sort-keys-fix": {
"eslint-plugin-jsx-a11y": {
"optional": true
},
"eslint-plugin-simple-import-sort": {
"eslint-plugin-prettier": {
"optional": true
},
"eslint-plugin-tailwindcss": {
"eslint-plugin-react": {
"optional": true
},
"prettier": {
"eslint-plugin-react-hooks": {
"optional": true
},
"eslint-config-prettier": {
"eslint-plugin-simple-import-sort": {
"optional": true
},
"eslint-plugin-prettier": {
"eslint-plugin-sort-destructure-keys": {
"optional": true
},
"eslint-plugin-jsx-a11y": {
"eslint-plugin-sort-keys-fix": {
"optional": true
},
"eslint-plugin-react": {
"eslint-plugin-tailwindcss": {
"optional": true
},
"eslint-plugin-react-hooks": {
"prettier": {
"optional": true
},
"typescript": {
"optional": true
}
},
Expand Down
21 changes: 21 additions & 0 deletions packages/prettier-config/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Daniel Sousa

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
12 changes: 9 additions & 3 deletions packages/prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "@tutods/prettier-config",
"description": "Prettier configuration to use in web projects, like React, Node, etc.",
"version": "0.2.1",
"private": false,
"keywords": [
"prettier",
"formatting",
Expand All @@ -21,13 +20,20 @@
"license": "MIT",
"main": "index.js",
"exports": {
".": "./index.js"
".": "./index.js",
"./tailwind": "./tailwind.js"
},
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"prettier": ">=2.0.0"
"prettier": ">=3.0.0",
"prettier-plugin-tailwindcss": ">=0.5"
},
"peerDependenciesMeta": {
"prettier-plugin-tailwindcss": {
"optional": true
}
},
"gitHead": "f8b9beafd8432648c3c15d290ad95fe1bdf95dd2"
}
6 changes: 6 additions & 0 deletions packages/prettier-config/tailwind.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import("prettier").Config} */
module.exports = {
...require("./index"),
plugins: ["prettier-plugin-tailwindcss"],
tailwindFunctions: ["clsx", "cn", "twMerge", "cva"],
};
3 changes: 0 additions & 3 deletions pnpm-workspace.yaml

This file was deleted.

Loading

0 comments on commit 188280b

Please sign in to comment.