Skip to content

Commit

Permalink
✨ feat: react template
Browse files Browse the repository at this point in the history
  • Loading branch information
liliphoenix committed May 15, 2024
1 parent eac926b commit d2760c0
Show file tree
Hide file tree
Showing 16 changed files with 1,334 additions and 275 deletions.
167 changes: 83 additions & 84 deletions packages/cli/template/vite-react-tailwind-ali/.commitlintrc.js
Original file line number Diff line number Diff line change
@@ -1,85 +1,84 @@
export default {
extends: ['./node_modules/commitlint-config-gitmoji', 'cz'],
rules: {
'type-empty': [
2,
'never',
[
':art:',
':newspaper:',
':pencil:',
':memo:',
':zap:',
':fire:',
':books:',
':bug:',
':ambulance:',
':penguin:',
':apple:',
':checkered_flag:',
':robot:',
':green_ale:',
':tractor:',
':recycle:',
':white_check_mark:',
':microscope:',
':green_heart:',
':lock:',
':arrow_up:',
':arrow_down:',
':fast_forward:',
':rewind:',
':rotating_light:',
':lipstick:',
':wheelchair:',
':globe_with_meridians:',
':construction:',
':gem:',
':bookmark:',
':tada:',
':loud_sound:',
':mute:',
':sparkles:',
':speech_balloon:',
':bulb:',
':construction_worker:',
':chart_with_upwards_trend:',
':ribbon:',
':rocket:',
':heavy_minus_sign:',
':heavy_plus_sign:',
':wrench:',
':hankey:',
':leaves:',
':bank:',
':whale:',
':twisted_rightwards_arrows:',
':pushpin:',
':busts_in_silhouette:',
':children_crossing:',
':iphone:',
':clown_face:',
':ok_hand:',
':boom:',
':bento:',
':pencil2:',
':package:',
':alien:',
':truck:',
':age_facing_up:',
':busts_in_silhouette:',
':card_file_box:',
':loud-sound:',
':mute:',
':egg:',
':see-no-evil:',
':camera-flash:',
':alembic:',
':mag:',
':wheel-of-dharma:',
':label:'
]
],
'subject-empty': [2, 'never']
}
}
extends: ["./node_modules/commitlint-config-gitmoji", "cz"],
rules: {
"type-empty": [
2,
"never",
[
":art:",
":newspaper:",
":pencil:",
":memo:",
":zap:",
":fire:",
":books:",
":bug:",
":ambulance:",
":penguin:",
":apple:",
":checkered_flag:",
":robot:",
":green_ale:",
":tractor:",
":recycle:",
":white_check_mark:",
":microscope:",
":green_heart:",
":lock:",
":arrow_up:",
":arrow_down:",
":fast_forward:",
":rewind:",
":rotating_light:",
":lipstick:",
":wheelchair:",
":globe_with_meridians:",
":construction:",
":gem:",
":bookmark:",
":tada:",
":loud_sound:",
":mute:",
":sparkles:",
":speech_balloon:",
":bulb:",
":construction_worker:",
":chart_with_upwards_trend:",
":ribbon:",
":rocket:",
":heavy_minus_sign:",
":heavy_plus_sign:",
":wrench:",
":hankey:",
":leaves:",
":bank:",
":whale:",
":twisted_rightwards_arrows:",
":pushpin:",
":busts_in_silhouette:",
":children_crossing:",
":iphone:",
":clown_face:",
":ok_hand:",
":boom:",
":bento:",
":pencil2:",
":package:",
":alien:",
":truck:",
":age_facing_up:",
":busts_in_silhouette:",
":card_file_box:",
":loud-sound:",
":mute:",
":egg:",
":see-no-evil:",
":camera-flash:",
":alembic:",
":mag:",
":wheel-of-dharma:",
":label:",
],
],
"subject-empty": [2, "never"],
}}
20 changes: 20 additions & 0 deletions packages/cli/template/vite-react-tailwind-ali/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"no-console": "off"
},
// set eslint env
"env": {
"node": true
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npm run lint && npm run format
4 changes: 4 additions & 0 deletions packages/cli/template/vite-react-tailwind-ali/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

.history/
node_modules
dist
16 changes: 16 additions & 0 deletions packages/cli/template/vite-react-tailwind-ali/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export default {
// 一行的字符数,如果超过会进行换行,默认为80
printWidth: 80,
// 一个tab代表几个空格数,默认为2
tabWidth: 2,
// 是否使用tab进行缩进,默认为false,表示用空格进行缩减
useTabs: false,
// 字符串是否使用单引号,默认为false,使用双引号
singleQuote: true,
// 行位是否使用分号,默认为true
semi: false,
// 是否使用尾逗号,有三个可选值"<none|es5|all>"
trailingComma: 'none',
// 对象大括号直接是否有空格,默认为true,效果:{ foo: bar }
bracketSpacing: true
}
Loading

0 comments on commit d2760c0

Please sign in to comment.