chore: add stylelint support
This commit is contained in:
parent
30ac4e3ac9
commit
5a96bacdec
7
.stylelintignore
Normal file
7
.stylelintignore
Normal file
@ -0,0 +1,7 @@
|
||||
node_modules
|
||||
|
||||
.cache
|
||||
.temp
|
||||
|
||||
lib
|
||||
dist
|
||||
9
.vscode/settings.json
vendored
9
.vscode/settings.json
vendored
@ -10,8 +10,10 @@
|
||||
},
|
||||
"css.validate": false,
|
||||
"scss.validate": false,
|
||||
"less.validate": false,
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"eslint.experimental.useFlatConfig": true,
|
||||
"stylelint.packageManager": "pnpm",
|
||||
"eslint.rules.customizations": [
|
||||
{ "rule": "style/*", "severity": "off" },
|
||||
{ "rule": "*-indent", "severity": "off" },
|
||||
@ -27,6 +29,7 @@
|
||||
"source.fixAll": "explicit",
|
||||
"source.fixAll.eslint": "explicit",
|
||||
"source.organizeImports": "never"
|
||||
// "source.fixAll.stylelint": "explicit"
|
||||
},
|
||||
"editor.formatOnPaste": true,
|
||||
"eslint.validate": [
|
||||
@ -41,6 +44,12 @@
|
||||
"jsonc",
|
||||
"yaml"
|
||||
],
|
||||
"stylelint.validate": [
|
||||
"css",
|
||||
"scss",
|
||||
"postcss",
|
||||
"vue"
|
||||
],
|
||||
"cSpell.words": [
|
||||
"bumpp",
|
||||
"caniuse",
|
||||
|
||||
@ -30,6 +30,6 @@ export const theme = themePlume({
|
||||
// apiKey: '111',
|
||||
// appId: '111',
|
||||
// indexName: '1234',
|
||||
// },
|
||||
// }
|
||||
},
|
||||
})
|
||||
|
||||
@ -86,9 +86,8 @@ H~2~O
|
||||
|
||||
[外部链接](https://github.com/pengzhanbo)
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
**Badge**
|
||||
|
||||
@ -220,6 +219,25 @@ const c = a + b
|
||||
```
|
||||
:::
|
||||
|
||||
**GFM alert**
|
||||
|
||||
> [!note]
|
||||
> note
|
||||
|
||||
> [!info]
|
||||
> info
|
||||
|
||||
> [!tip]
|
||||
> tip
|
||||
|
||||
> [!warning]
|
||||
> warning
|
||||
|
||||
> [!caution]
|
||||
> caution
|
||||
|
||||
> [!important]
|
||||
> important
|
||||
|
||||
**代码演示**
|
||||
|
||||
@ -243,3 +261,39 @@ span {
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
**选项卡**
|
||||
|
||||
::: tabs
|
||||
@tab 标题1
|
||||
内容区块
|
||||
|
||||
@tab 标题2
|
||||
内容区块
|
||||
:::
|
||||
|
||||
:::: warning
|
||||
::: tabs
|
||||
@tab 标题1
|
||||
内容区块
|
||||
|
||||
@tab 标题2
|
||||
内容区块
|
||||
:::
|
||||
::::
|
||||
|
||||
**脚注**
|
||||
|
||||
脚注 1 链接[^first]。
|
||||
|
||||
脚注 2 链接[^second]。
|
||||
|
||||
行内的脚注^[行内脚注文本] 定义。
|
||||
|
||||
重复的页脚定义[^second]。
|
||||
|
||||
[^first]: 脚注 **可以包含特殊标记**
|
||||
|
||||
也可以由多个段落组成
|
||||
|
||||
[^second]: 脚注文字。
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
import config from '@pengzhanbo/eslint-config-vue'
|
||||
|
||||
export default config({
|
||||
formatters: {
|
||||
css: true,
|
||||
},
|
||||
ignores: ['lib', 'docs/**/*.md'],
|
||||
globals: {
|
||||
__VUEPRESS_VERSION__: 'readonly',
|
||||
|
||||
39
package.json
39
package.json
@ -4,7 +4,7 @@
|
||||
"version": "1.0.0-rc.15",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@8.14.0",
|
||||
"author": "pengzhanbo",
|
||||
"author": "pengzhanbo <q942450674@outlook.com> (https://github.com/pengzhanbo/)",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"vuepress",
|
||||
@ -20,7 +20,6 @@
|
||||
"scripts": {
|
||||
"build": "pnpm run build:package",
|
||||
"build:package": "pnpm --filter=!vuepress-theme-plume-monorepo --filter=!docs --filter=!plugin-page-collection run -r --stream build",
|
||||
"commit": "cz",
|
||||
"dev": "concurrently \"pnpm run dev:package\" \"pnpm run docs\"",
|
||||
"dev:package": "pnpm --filter=!vuepress-theme-plume-monorepo --filter=!docs --parallel dev",
|
||||
"dev:theme": "concurrently \"pnpm --filter=vuepress-theme-plume dev\" \"pnpm run docs\"",
|
||||
@ -28,12 +27,13 @@
|
||||
"docs:build": "pnpm --filter=docs docs:build",
|
||||
"docs:clean": "pnpm --filter=docs docs:clean",
|
||||
"docs:serve": "pnpm --filter=docs docs:serve",
|
||||
"commit": "cz",
|
||||
"lint": "eslint .",
|
||||
"pkg": "node scripts/create/index.js",
|
||||
"lint:css": "stylelint **/*.{css,scss,vue}",
|
||||
"prepare": "husky install",
|
||||
"release": "pnpm release:check && pnpm release:version && pnpm release:publish",
|
||||
"release:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
||||
"release:check": "pnpm lint && pnpm build",
|
||||
"release:check": "pnpm lint && pnpm lint:css && pnpm build",
|
||||
"release:publish": "pnpm -r publish",
|
||||
"release:version": "bumpp package.json plugins/*/package.json theme/package.json --execute=\"pnpm release:changelog\" --commit \"build: publish v%s\" --all --tag --push"
|
||||
},
|
||||
@ -41,50 +41,25 @@
|
||||
"@commitlint/cli": "^18.4.4",
|
||||
"@commitlint/config-conventional": "^18.4.4",
|
||||
"@pengzhanbo/eslint-config-vue": "^1.5.1",
|
||||
"@types/minimist": "^1.2.5",
|
||||
"@pengzhanbo/stylelint-config": "^1.5.1",
|
||||
"@types/lodash.merge": "^4.6.9",
|
||||
"@types/node": "20.9.1",
|
||||
"@types/webpack-env": "^1.18.4",
|
||||
"bumpp": "^9.2.1",
|
||||
"chalk": "^5.3.0",
|
||||
"commitizen": "^4.3.0",
|
||||
"concurrently": "^8.2.2",
|
||||
"conventional-changelog-cli": "^4.1.0",
|
||||
"cpx2": "^7.0.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-plugin-format": "^0.1.0",
|
||||
"execa": "^8.0.1",
|
||||
"handlebars": "^4.7.8",
|
||||
"husky": "^8.0.3",
|
||||
"lint-staged": "^15.2.0",
|
||||
"minimist": "^1.2.8",
|
||||
"ora": "^8.0.1",
|
||||
"pnpm": "^8.14.0",
|
||||
"rimraf": "^5.0.5",
|
||||
"sort-package-json": "^2.6.0",
|
||||
"taze": "^0.13.1",
|
||||
"stylelint": "^16.1.0",
|
||||
"tsconfig-vuepress": "^4.5.0",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^5.0.11"
|
||||
},
|
||||
"pnpm": {
|
||||
"peerDependencyRules": {
|
||||
"ignoreMissing": [
|
||||
"@algolia/client-search",
|
||||
"@types/react",
|
||||
"eslint-plugin-import",
|
||||
"eslint-plugin-n",
|
||||
"eslint-plugin-promise",
|
||||
"react",
|
||||
"react-dom",
|
||||
"webpack",
|
||||
"cypress",
|
||||
"postcss",
|
||||
"jest"
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*": "eslint --fix"
|
||||
},
|
||||
|
||||
1651
pnpm-lock.yaml
generated
1651
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
19
stylelint.config.js
Normal file
19
stylelint.config.js
Normal file
@ -0,0 +1,19 @@
|
||||
import { stylelintConfig } from '@pengzhanbo/stylelint-config'
|
||||
|
||||
export default stylelintConfig({
|
||||
rules: {
|
||||
'selector-pseudo-element-no-unknown': [true, {
|
||||
ignorePseudoElements: ['input-placeholder'],
|
||||
}],
|
||||
'no-descending-specificity': null,
|
||||
'custom-property-empty-line-before': null,
|
||||
'property-no-vendor-prefix': null,
|
||||
'selector-no-vendor-prefix': null,
|
||||
'property-no-unknown': [true, {
|
||||
ignoreProperties: ['r', 'font-named-instance'],
|
||||
}],
|
||||
'declaration-block-no-redundant-longhand-properties': [true, {
|
||||
ignoreShorthands: ['inset'],
|
||||
}],
|
||||
},
|
||||
})
|
||||
@ -89,8 +89,5 @@
|
||||
"vuepress-plugin-reading-time2": "2.0.0-rc.10",
|
||||
"vuepress-plugin-seo2": "2.0.0-rc.10",
|
||||
"vuepress-plugin-sitemap2": "2.0.0-rc.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/lodash.merge": "^4.6.9"
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
"@internal/*": ["./docs/.vuepress/.temp/internal/*"],
|
||||
"@vuepress-plume/*": ["./plugins/*/src/node/index.ts"],
|
||||
"vuepress-theme-plume": ["./theme/src/node/index.ts"],
|
||||
"@vuepress-plume/*/client": ["./plugins/*/src/client/index.ts"],
|
||||
"vuepress-plugin-netlify-functions": [
|
||||
"./plugins/plugin-netlify-functions/src/node/index.ts"
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user