Last active
May 2, 2021 20:07
-
-
Save AlexZeitler/0c400fe38e06fd2a42b93d540ff568fd to your computer and use it in GitHub Desktop.
TypeScript + React + Tailwind + VS Code Project settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root = false | |
[**/**.{yml,ts,tsx,js,json,jsx,html}] | |
indent_style = space | |
indent_size = 2 | |
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
extends: [ | |
'eslint:recommended', | |
'plugin:@typescript-eslint/recommended', | |
'prettier/@typescript-eslint', | |
'plugin:prettier/recommended' | |
], | |
env: { | |
node: true, | |
mocha: true, | |
es6: true | |
}, | |
plugins: ['@typescript-eslint', 'prettier'], | |
parserOptions: { | |
parser: '@typescript-eslint/parser' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
printWidth: 80, | |
tabWidth: 2, | |
singleQuote: true, | |
quoteProps: 'as-needed', | |
trailingComma: 'none', | |
bracketSpacing: true, | |
semi: false, | |
useTabs: false, | |
jsxBracketSameLine: false, | |
proseWrap: 'never' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@tailwind base; | |
@tailwind components; | |
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
extends: ['@commitlint/config-conventional'] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Usage: ./install.sh <TARGET_PATH> (without trailing /) | |
TARGET=$1 | |
echo "Installing files to ${TARGET}" | |
read -p "Are you sure? " -n 1 -r | |
echo | |
if [[ $REPLY =~ ^[Yy]$ ]]; then | |
echo "OK" | |
cp .editorconfig .eslintrc.js .prettierrc.js .nvmrc commitlint.config.js postcss.config.js tailwind.config.js "${TARGET}" | |
cp App.css "${TARGET}/src/" | |
mkdir "${TARGET}/.vscode" && cp settings.json "${TARGET}/.vscode/" | |
cd "${TARGET}" | |
yarn add --dev typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier eslint-plugin-import eslint-plugin-prettier prettier eslint-watch @commitlint/cli @commitlint/config-conventional @types/node@14 jest @types/jest tailwindcss@latest @tailwindcss/forms postcss@latest autoprefixer@latest | |
git ignore node,jetbrains+all,visualstudiocode,macos >>.gitignore | |
npx husky-init && yarn | |
rm .husky/pre-commit | |
npx husky add .husky/commit-msg 'npx --no-install commitlint --edit $1' | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
plugins: { | |
tailwindcss: {}, | |
autoprefixer: {} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.formatOnSave": true, | |
"editor.formatOnPaste": true, | |
"[typescript]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"[typescriptreact]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"[json]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"[javascript]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"[html]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
purge: [], | |
darkMode: false, // or 'media' or 'class' | |
plugins: [require('@tailwindcss/forms')], | |
variants: { | |
extend: { | |
opacity: ['disabled'] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment