Skip to content

Commit

Permalink
chore: 重构项目结构-集成Stylus和Stylelint
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Mar 11, 2023
1 parent 76c6fa7 commit a9db188
Show file tree
Hide file tree
Showing 20 changed files with 2,941 additions and 19 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# JetBrains
.idea

# vscode
.vscode

# Mac
.DS_Store

# Vercel
.vercel

# Backup
backup
backup

# Node
node_modules
15 changes: 15 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": ["stylelint-config-standard", "stylelint-stylus/standard"],
"rules": {
"import-notation": "string",
"string-quotes": "double",
"selector-combinator-space-after": "always",
"value-list-comma-space-before": "never",
"value-list-comma-space-after": "always",
"stylus/declaration-colon": "never",
"stylus/pythonic": "always",
"stylus/selector-list-comma": "never",
"stylus/semicolon": "never",
"stylus/single-line-comment": "always"
}
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"python.formatting.provider": "black",
"stylelint.validate": ["stylus"]
}
8 changes: 2 additions & 6 deletions apps/blog/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,12 @@ module.exports = {

plugins: ["@typescript-eslint", "prettier"],

extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],

rules: {
// Note: you must disable the base rule as it can report incorrect errors
semi: "off",
quotes: "off",
"prettier/prettier": "error"
"prettier/prettier": "error",
},
}
15 changes: 15 additions & 0 deletions apps/blog/.stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": ["stylelint-config-standard", "stylelint-stylus/standard"],
"rules": {
"import-notation": "string",
"string-quotes": "double",
"selector-combinator-space-after": "always",
"value-list-comma-space-before": "never",
"value-list-comma-space-after": "always",
"stylus/declaration-colon": "never",
"stylus/pythonic": "always",
"stylus/selector-list-comma": "never",
"stylus/semicolon": "never",
"stylus/single-line-comment": "always"
}
}
2 changes: 2 additions & 0 deletions apps/blog/app.styl
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ body
background blue
font-size 14px



2 changes: 1 addition & 1 deletion apps/blog/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ export default defineNuxtConfig({
app: {
baseURL: appBase,
},
})
})
5 changes: 5 additions & 0 deletions apps/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"postinstall": "nuxt prepare",
"lint": "eslint --ext .ts .",
"lint:fix": "eslint --fix --ext .ts .",
"lintcss": "stylelint *.styl --fix",
"lintcss:fix": "stylelint *.styl --fix",
"prettier": "prettier --write ."
},
"dependencies": {
Expand All @@ -25,6 +27,9 @@
"eslint-plugin-prettier": "^4.2.1",
"nuxt": "^3.2.3",
"prettier": "^2.8.4",
"stylelint": "^15.2.0",
"stylelint-config-standard": "^30.0.1",
"stylelint-stylus": "^0.18.0",
"stylus": "^0.59.0",
"typescript": "^4.9.5",
"vite-plugin-eslint": "^1.8.1",
Expand Down
Loading

0 comments on commit a9db188

Please sign in to comment.