mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
feat: 升级 eslint 配置及版本
This commit is contained in:
parent
14d7f6eaad
commit
2bb6903bb3
13
.vscode/settings.json
vendored
13
.vscode/settings.json
vendored
@ -12,19 +12,6 @@
|
|||||||
"source.organizeImports": "never"
|
"source.organizeImports": "never"
|
||||||
},
|
},
|
||||||
|
|
||||||
// Silent the stylistic rules in you IDE, but still auto fix them
|
|
||||||
"eslint.rules.customizations": [
|
|
||||||
{ "rule": "style/*", "severity": "off" },
|
|
||||||
{ "rule": "*-indent", "severity": "off" },
|
|
||||||
{ "rule": "*-spacing", "severity": "off" },
|
|
||||||
{ "rule": "*-spaces", "severity": "off" },
|
|
||||||
{ "rule": "*-order", "severity": "off" },
|
|
||||||
{ "rule": "*-dangle", "severity": "off" },
|
|
||||||
{ "rule": "*-newline", "severity": "off" },
|
|
||||||
{ "rule": "*quotes", "severity": "off" },
|
|
||||||
{ "rule": "*semi", "severity": "off" }
|
|
||||||
],
|
|
||||||
|
|
||||||
// Enable eslint for all supported languages
|
// Enable eslint for all supported languages
|
||||||
"eslint.validate": [
|
"eslint.validate": [
|
||||||
"javascript",
|
"javascript",
|
||||||
|
@ -2,19 +2,36 @@
|
|||||||
import antfu from '@antfu/eslint-config';
|
import antfu from '@antfu/eslint-config';
|
||||||
|
|
||||||
export default await antfu({
|
export default await antfu({
|
||||||
|
files: ['**/*.js', '**/*.jsx', '**/*.vue', '**/*.ts'],
|
||||||
|
// TODO: 使用 ignore 代替 cli 命令中的配置
|
||||||
stylistic: {
|
stylistic: {
|
||||||
indent: 4, // 4, or 'tab'
|
indent: 4,
|
||||||
quotes: 'single', // or 'double'
|
quotes: 'single',
|
||||||
semi: 'always',
|
semi: 'always',
|
||||||
},
|
},
|
||||||
typescript: true,
|
typescript: true,
|
||||||
vue: true,
|
vue: true,
|
||||||
rules: {
|
rules: {
|
||||||
|
'curly': ['error', 'multi-line'],
|
||||||
'vue/block-order': [
|
'vue/block-order': [
|
||||||
'error',
|
'error',
|
||||||
{
|
{
|
||||||
order: ['template', 'script', 'style'],
|
order: ['template', 'script', 'style'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
'style/member-delimiter-style': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
multiline: {
|
||||||
|
delimiter: 'semi',
|
||||||
|
requireLast: true,
|
||||||
|
},
|
||||||
|
singleline: {
|
||||||
|
delimiter: 'semi',
|
||||||
|
requireLast: false,
|
||||||
|
},
|
||||||
|
multilineDetection: 'brackets',
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
37
package.json
37
package.json
@ -1,13 +1,21 @@
|
|||||||
{
|
{
|
||||||
"name": "fes.js",
|
"name": "fes.js",
|
||||||
|
"type": "module",
|
||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
|
"private": true,
|
||||||
"description": "一个好用的前端管理台快速开发框架",
|
"description": "一个好用的前端管理台快速开发框架",
|
||||||
"preferGlobal": true,
|
"preferGlobal": true,
|
||||||
"private": true,
|
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"license": "MIT",
|
||||||
|
"keywords": [
|
||||||
|
"管理端",
|
||||||
|
"fes",
|
||||||
|
"fast",
|
||||||
|
"easy",
|
||||||
|
"strong"
|
||||||
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bootstrap": "pnpm i",
|
"bootstrap": "pnpm i",
|
||||||
"dev": "node scripts/build.mjs --watch",
|
"dev": "node scripts/build.mjs --watch",
|
||||||
@ -18,17 +26,10 @@
|
|||||||
"docs:build": "vitepress build docs",
|
"docs:build": "vitepress build docs",
|
||||||
"docs:build-pages": "BASE=fes.js vitepress build docs",
|
"docs:build-pages": "BASE=fes.js vitepress build docs",
|
||||||
"test": "fes test",
|
"test": "fes test",
|
||||||
"lint": "eslint -c ./.eslintrc.js --ignore-pattern='templates' --ext .js,.jsx,.vue,.ts",
|
"lint": "eslint --ignore-pattern='templates'",
|
||||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
||||||
|
"hooks:sync": "simple-git-hooks"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
|
||||||
"keywords": [
|
|
||||||
"管理端",
|
|
||||||
"fes",
|
|
||||||
"fast",
|
|
||||||
"easy",
|
|
||||||
"strong"
|
|
||||||
],
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": "^5.0.1",
|
"chalk": "^5.0.1",
|
||||||
"conventional-changelog-cli": "^4.1.0",
|
"conventional-changelog-cli": "^4.1.0",
|
||||||
@ -38,14 +39,14 @@
|
|||||||
"semver": "^7.3.6"
|
"semver": "^7.3.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^2.1.1",
|
"@antfu/eslint-config": "^2.6.2",
|
||||||
"@commitlint/cli": "^11.0.0",
|
"@commitlint/cli": "^11.0.0",
|
||||||
"@commitlint/config-conventional": "^11.0.0",
|
"@commitlint/config-conventional": "^11.0.0",
|
||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.5.3",
|
||||||
"commitizen": "^4.3.0",
|
"commitizen": "^4.3.0",
|
||||||
"cz-conventional-changelog": "^3.3.0",
|
"cz-conventional-changelog": "^3.3.0",
|
||||||
"deepmerge": "^4.2.2",
|
"deepmerge": "^4.2.2",
|
||||||
"eslint": "^8.54.0",
|
"eslint": "^8.56.0",
|
||||||
"fs-extra": "^11.1.1",
|
"fs-extra": "^11.1.1",
|
||||||
"lint-staged": "^13.2.0",
|
"lint-staged": "^13.2.0",
|
||||||
"simple-git-hooks": "^2.9.0",
|
"simple-git-hooks": "^2.9.0",
|
||||||
@ -54,15 +55,15 @@
|
|||||||
"vue": "^3.3.4",
|
"vue": "^3.3.4",
|
||||||
"yargs-parser": "^21.1.1"
|
"yargs-parser": "^21.1.1"
|
||||||
},
|
},
|
||||||
|
"simple-git-hooks": {
|
||||||
|
"pre-commit": "lint-staged",
|
||||||
|
"commit-msg": "commitlint"
|
||||||
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{js,jsx,vue,ts}": [
|
"*.{js,jsx,vue,ts}": [
|
||||||
"npm run lint"
|
"npm run lint"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"simple-git-hooks": {
|
|
||||||
"pre-commit": "lint-staged",
|
|
||||||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
||||||
},
|
|
||||||
"config": {
|
"config": {
|
||||||
"commitizen": {
|
"commitizen": {
|
||||||
"path": "./node_modules/cz-conventional-changelog"
|
"path": "./node_modules/cz-conventional-changelog"
|
||||||
|
583
pnpm-lock.yaml
generated
583
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user