Skip to content

Commit

Permalink
chore: fig tools config
Browse files Browse the repository at this point in the history
  • Loading branch information
AxyLm committed Jul 29, 2022
1 parent a43d70b commit 7bfb9ce
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 33 deletions.
16 changes: 0 additions & 16 deletions .editorconfig

This file was deleted.

18 changes: 14 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
"plugins": ["vue", "@typescript-eslint", "prettier", "tailwindcss", "import"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:vue/vue3-essential",
"plugin:vue/vue3-strongly-recommended",
"plugin:vue/vue3-recommended",
"plugin:tailwindcss/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier"
],
Expand All @@ -21,6 +23,14 @@
"sourceType": "module"
},
"rules": {
"no-debugger": "error",
"no-unused-vars": [
"warn",
{
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"quotes": [
"warn",
"single",
Expand All @@ -30,14 +40,14 @@
], // 使用单引号
"vue/multi-word-component-names": 0,
"prettier/prettier": "off",
"@typescript-eslint/no-unused-vars": "off",
"vue/script-setup-uses-vars": "off",
"tailwindcss/classnames-order": "off",
"tailwindcss/enforces-negative-arbitrary-values": "warn",
"tailwindcss/enforces-shorthand": "warn",
"tailwindcss/migration-from-tailwind-2": "warn",
"tailwindcss/no-arbitrary-value": "off",
"tailwindcss/no-custom-classname": "off",
"tailwindcss/no-contradicting-classname": "error",
"no-unused-vars": "warn",
"@typescript-eslint/no-unused-vars": "warn"
"tailwindcss/no-contradicting-classname": "error"
}
}
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@
"prebuild": "lint-staged && vue-tsc --noEmit ",
"build": "vite build",
"dev": "vite",
"eslint": "eslint 'src/**/*.{ts,tsx,vue,less,css,json,js}' --fix",
"eslint": "eslint 'src/**/*.{ {j,t}s?(x),vue,{le,c,sa}ss }' --fix",
"format": "prettier '{src/**/*.{js,ts,tsx,md,html,less,css,json,vue},package.json,*.config.js,locales/*.yml}' --write",
"lint": "lint-staged",
"lint:prettier": "pretty-quick --verbose",
"prepare": "husky install",
"prettier": "prettier '{src/**/*.{js,ts,tsx,md,html,less,css,json,vue},package.json,tailwind.config.js,locales/*.yml}' --write",
"preview": "vite preview"
},
"lint-staged": {
"src/**/*.{js,ts,tsx,md,html,less,css,json,vue}": "prettier --write",
"src/**/*.{ts,tsx,vue}": "eslint --fix",
"src/**/*.{{j,t}s?(x),vue,{le,c,sa}ss}": [
"eslint --fix",
"prettier --write"
],
"src/**/*.{md,html,json}": "prettier --write",
"{!(package)*.json,*.code-snippets,.!(browserslist)*rc}": [
"prettier --write--parser json"
],
Expand Down
7 changes: 0 additions & 7 deletions postcss.config.js

This file was deleted.

1 change: 1 addition & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const colors = require('tailwindcss/colors');

module.exports = {
Expand Down
8 changes: 6 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ import IconsResolver from 'unplugin-icons/resolver';

// https://vitejs.dev/config/
export default defineConfig({
css: {
postcss: {
plugins: [require('postcss-import'), require('tailwindcss'), require('autoprefixer')],
},
},
resolve: {
alias: {
'~/': `${path.resolve(__dirname, './src')}/`,
'/~/': `${path.resolve(__dirname, 'src')}/`,
},
},
server: {
host: '0.0.0.0',
port: 3000,
port: 5173,
proxy: {},
cors: true,
},
Expand Down

0 comments on commit 7bfb9ce

Please sign in to comment.