130 changed files with 6445 additions and 2905 deletions
@ -1,76 +1,4 @@ |
|||||
module.exports = { |
module.exports = { |
||||
root: true, |
root: true, |
||||
env: { |
extends: ['@vben'], |
||||
browser: true, |
|
||||
node: true, |
|
||||
es6: true, |
|
||||
}, |
|
||||
parser: 'vue-eslint-parser', |
|
||||
parserOptions: { |
|
||||
parser: '@typescript-eslint/parser', |
|
||||
ecmaVersion: 2020, |
|
||||
sourceType: 'module', |
|
||||
jsxPragma: 'React', |
|
||||
ecmaFeatures: { |
|
||||
jsx: true, |
|
||||
}, |
|
||||
}, |
|
||||
extends: [ |
|
||||
'plugin:vue/vue3-recommended', |
|
||||
'plugin:@typescript-eslint/recommended', |
|
||||
'plugin:prettier/recommended', |
|
||||
], |
|
||||
rules: { |
|
||||
'vue/script-setup-uses-vars': 'error', |
|
||||
'@typescript-eslint/ban-ts-ignore': 'off', |
|
||||
'@typescript-eslint/explicit-function-return-type': 'off', |
|
||||
'@typescript-eslint/no-explicit-any': 'off', |
|
||||
'@typescript-eslint/no-var-requires': 'off', |
|
||||
'@typescript-eslint/no-empty-function': 'off', |
|
||||
'vue/custom-event-name-casing': 'off', |
|
||||
'no-use-before-define': 'off', |
|
||||
'@typescript-eslint/no-use-before-define': 'off', |
|
||||
'@typescript-eslint/ban-ts-comment': 'off', |
|
||||
'@typescript-eslint/ban-types': 'off', |
|
||||
'@typescript-eslint/no-non-null-assertion': 'off', |
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off', |
|
||||
'@typescript-eslint/no-unused-vars': [ |
|
||||
'error', |
|
||||
{ |
|
||||
argsIgnorePattern: '^_', |
|
||||
varsIgnorePattern: '^_', |
|
||||
}, |
|
||||
], |
|
||||
'no-unused-vars': [ |
|
||||
'error', |
|
||||
{ |
|
||||
argsIgnorePattern: '^_', |
|
||||
varsIgnorePattern: '^_', |
|
||||
}, |
|
||||
], |
|
||||
'space-before-function-paren': 'off', |
|
||||
|
|
||||
'vue/attributes-order': 'off', |
|
||||
'vue/one-component-per-file': 'off', |
|
||||
'vue/html-closing-bracket-newline': 'off', |
|
||||
'vue/max-attributes-per-line': 'off', |
|
||||
'vue/multiline-html-element-content-newline': 'off', |
|
||||
'vue/singleline-html-element-content-newline': 'off', |
|
||||
'vue/attribute-hyphenation': 'off', |
|
||||
'vue/require-default-prop': 'off', |
|
||||
'vue/require-explicit-emits': 'off', |
|
||||
'vue/html-self-closing': [ |
|
||||
'error', |
|
||||
{ |
|
||||
html: { |
|
||||
void: 'always', |
|
||||
normal: 'never', |
|
||||
component: 'always', |
|
||||
}, |
|
||||
svg: 'always', |
|
||||
math: 'always', |
|
||||
}, |
|
||||
], |
|
||||
'vue/multi-word-component-names': 'off', |
|
||||
}, |
|
||||
}; |
}; |
||||
|
|||||
@ -0,0 +1,7 @@ |
|||||
|
public-hoist-pattern[]=husky |
||||
|
public-hoist-pattern[]=*eslint* |
||||
|
public-hoist-pattern[]=*prettier* |
||||
|
public-hoist-pattern[]=lint-staged |
||||
|
public-hoist-pattern[]=*stylelint* |
||||
|
public-hoist-pattern[]=@commitlint/cli |
||||
|
public-hoist-pattern[]=@vben/eslint-config |
||||
@ -1,9 +1,10 @@ |
|||||
/dist/* |
dist |
||||
.local |
.local |
||||
.output.js |
.output.js |
||||
/node_modules/** |
node_modules |
||||
|
|
||||
**/*.svg |
**/*.svg |
||||
**/*.sh |
**/*.sh |
||||
|
|
||||
/public/* |
public |
||||
|
.npmrc |
||||
|
|||||
@ -1,3 +1,2 @@ |
|||||
/dist/* |
dist |
||||
/public/* |
public |
||||
public/* |
|
||||
|
|||||
@ -1,100 +1,4 @@ |
|||||
module.exports = { |
module.exports = { |
||||
root: true, |
root: true, |
||||
plugins: ['stylelint-order'], |
extends: ['@vben/stylelint-config'], |
||||
extends: ['stylelint-config-standard'], |
|
||||
customSyntax: 'postcss-html', |
|
||||
rules: { |
|
||||
'function-no-unknown': null, |
|
||||
'selector-class-pattern': null, |
|
||||
'selector-pseudo-class-no-unknown': [ |
|
||||
true, |
|
||||
{ |
|
||||
ignorePseudoClasses: ['global', 'deep'], |
|
||||
}, |
|
||||
], |
|
||||
'selector-pseudo-element-no-unknown': [ |
|
||||
true, |
|
||||
{ |
|
||||
ignorePseudoElements: ['v-deep'], |
|
||||
}, |
|
||||
], |
|
||||
'at-rule-no-unknown': [ |
|
||||
true, |
|
||||
{ |
|
||||
ignoreAtRules: [ |
|
||||
'tailwind', |
|
||||
'apply', |
|
||||
'variants', |
|
||||
'responsive', |
|
||||
'screen', |
|
||||
'function', |
|
||||
'if', |
|
||||
'each', |
|
||||
'include', |
|
||||
'mixin', |
|
||||
], |
|
||||
}, |
|
||||
], |
|
||||
'no-empty-source': null, |
|
||||
'string-quotes': null, |
|
||||
'named-grid-areas-no-invalid': null, |
|
||||
'unicode-bom': 'never', |
|
||||
'no-descending-specificity': null, |
|
||||
'font-family-no-missing-generic-family-keyword': null, |
|
||||
'declaration-colon-space-after': 'always-single-line', |
|
||||
'declaration-colon-space-before': 'never', |
|
||||
// 'declaration-block-trailing-semicolon': 'always',
|
|
||||
'rule-empty-line-before': [ |
|
||||
'always', |
|
||||
{ |
|
||||
ignore: ['after-comment', 'first-nested'], |
|
||||
}, |
|
||||
], |
|
||||
'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }], |
|
||||
'order/order': [ |
|
||||
[ |
|
||||
'dollar-variables', |
|
||||
'custom-properties', |
|
||||
'at-rules', |
|
||||
'declarations', |
|
||||
{ |
|
||||
type: 'at-rule', |
|
||||
name: 'supports', |
|
||||
}, |
|
||||
{ |
|
||||
type: 'at-rule', |
|
||||
name: 'media', |
|
||||
}, |
|
||||
'rules', |
|
||||
], |
|
||||
{ severity: 'warning' }, |
|
||||
], |
|
||||
}, |
|
||||
ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'], |
|
||||
overrides: [ |
|
||||
{ |
|
||||
files: ['*.vue', '**/*.vue', '*.html', '**/*.html'], |
|
||||
extends: ['stylelint-config-recommended'], |
|
||||
rules: { |
|
||||
'keyframes-name-pattern': null, |
|
||||
'selector-pseudo-class-no-unknown': [ |
|
||||
true, |
|
||||
{ |
|
||||
ignorePseudoClasses: ['deep', 'global'], |
|
||||
}, |
|
||||
], |
|
||||
'selector-pseudo-element-no-unknown': [ |
|
||||
true, |
|
||||
{ |
|
||||
ignorePseudoElements: ['v-deep', 'v-global', 'v-slotted'], |
|
||||
}, |
|
||||
], |
|
||||
}, |
|
||||
}, |
|
||||
{ |
|
||||
files: ['*.less', '**/*.less'], |
|
||||
customSyntax: 'postcss-less', |
|
||||
extends: ['stylelint-config-standard', 'stylelint-config-recommended-vue'], |
|
||||
}, |
|
||||
], |
|
||||
}; |
}; |
||||
|
|||||
@ -0,0 +1,10 @@ |
|||||
|
import { defineBuildConfig } from 'unbuild'; |
||||
|
|
||||
|
export default defineBuildConfig({ |
||||
|
clean: true, |
||||
|
entries: ['src/index'], |
||||
|
declaration: true, |
||||
|
rollup: { |
||||
|
emitCJS: true, |
||||
|
}, |
||||
|
}); |
||||
@ -0,0 +1,32 @@ |
|||||
|
{ |
||||
|
"name": "@vben/eslint-config", |
||||
|
"version": "1.0.0", |
||||
|
"private": true, |
||||
|
"license": "MIT", |
||||
|
"exports": { |
||||
|
".": { |
||||
|
"types": "./dist/index.d.ts", |
||||
|
"import": "./dist/index.mjs", |
||||
|
"require": "./dist/index.cjs" |
||||
|
} |
||||
|
}, |
||||
|
"main": "./dist/index.cjs", |
||||
|
"module": "./dist/index.mjs", |
||||
|
"types": "./dist/index.d.ts", |
||||
|
"files": [ |
||||
|
"dist" |
||||
|
], |
||||
|
"scripts": { |
||||
|
"clean": "pnpm rimraf .turbo node_modules dist", |
||||
|
"stub": "pnpm unbuild --stub" |
||||
|
}, |
||||
|
"devDependencies": { |
||||
|
"@typescript-eslint/eslint-plugin": "^5.57.0", |
||||
|
"@typescript-eslint/parser": "^5.57.0", |
||||
|
"eslint": "^8.37.0", |
||||
|
"eslint-config-prettier": "^8.8.0", |
||||
|
"eslint-plugin-prettier": "^4.2.1", |
||||
|
"eslint-plugin-vue": "^9.10.0", |
||||
|
"vue-eslint-parser": "^9.1.1" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,82 @@ |
|||||
|
export default { |
||||
|
env: { |
||||
|
browser: true, |
||||
|
node: true, |
||||
|
es6: true, |
||||
|
}, |
||||
|
parser: 'vue-eslint-parser', |
||||
|
parserOptions: { |
||||
|
parser: '@typescript-eslint/parser', |
||||
|
ecmaVersion: 2020, |
||||
|
sourceType: 'module', |
||||
|
jsxPragma: 'React', |
||||
|
ecmaFeatures: { |
||||
|
jsx: true, |
||||
|
}, |
||||
|
project: './tsconfig.*?.json', |
||||
|
createDefaultProgram: false, |
||||
|
extraFileExtensions: ['.vue'], |
||||
|
}, |
||||
|
plugins: ['vue', '@typescript-eslint'], |
||||
|
extends: [ |
||||
|
'eslint:recommended', |
||||
|
'plugin:vue/vue3-recommended', |
||||
|
'plugin:@typescript-eslint/recommended', |
||||
|
'plugin:prettier/recommended', |
||||
|
], |
||||
|
rules: { |
||||
|
'no-case-declarations': 'off', |
||||
|
'vue/script-setup-uses-vars': 'error', |
||||
|
'vue/no-reserved-component-names': 'off', |
||||
|
'@typescript-eslint/ban-ts-ignore': 'off', |
||||
|
'@typescript-eslint/explicit-function-return-type': 'off', |
||||
|
'@typescript-eslint/no-explicit-any': 'off', |
||||
|
'@typescript-eslint/no-var-requires': 'off', |
||||
|
'@typescript-eslint/no-empty-function': 'off', |
||||
|
'vue/custom-event-name-casing': 'off', |
||||
|
'no-use-before-define': 'off', |
||||
|
'@typescript-eslint/no-use-before-define': 'off', |
||||
|
'@typescript-eslint/ban-ts-comment': 'off', |
||||
|
'@typescript-eslint/ban-types': 'off', |
||||
|
'@typescript-eslint/no-non-null-assertion': 'off', |
||||
|
'@typescript-eslint/explicit-module-boundary-types': 'off', |
||||
|
'@typescript-eslint/no-unused-vars': [ |
||||
|
'error', |
||||
|
{ |
||||
|
argsIgnorePattern: '^_', |
||||
|
varsIgnorePattern: '^_', |
||||
|
}, |
||||
|
], |
||||
|
'no-unused-vars': [ |
||||
|
'error', |
||||
|
{ |
||||
|
argsIgnorePattern: '^_', |
||||
|
varsIgnorePattern: '^_', |
||||
|
}, |
||||
|
], |
||||
|
'space-before-function-paren': 'off', |
||||
|
|
||||
|
'vue/attributes-order': 'off', |
||||
|
'vue/one-component-per-file': 'off', |
||||
|
'vue/html-closing-bracket-newline': 'off', |
||||
|
'vue/max-attributes-per-line': 'off', |
||||
|
'vue/multiline-html-element-content-newline': 'off', |
||||
|
'vue/singleline-html-element-content-newline': 'off', |
||||
|
'vue/attribute-hyphenation': 'off', |
||||
|
'vue/require-default-prop': 'off', |
||||
|
'vue/require-explicit-emits': 'off', |
||||
|
'vue/html-self-closing': [ |
||||
|
'error', |
||||
|
{ |
||||
|
html: { |
||||
|
void: 'always', |
||||
|
normal: 'never', |
||||
|
component: 'always', |
||||
|
}, |
||||
|
svg: 'always', |
||||
|
math: 'always', |
||||
|
}, |
||||
|
], |
||||
|
'vue/multi-word-component-names': 'off', |
||||
|
}, |
||||
|
}; |
||||
@ -0,0 +1,10 @@ |
|||||
|
import { defineBuildConfig } from 'unbuild'; |
||||
|
|
||||
|
export default defineBuildConfig({ |
||||
|
clean: true, |
||||
|
entries: ['src/index'], |
||||
|
declaration: true, |
||||
|
rollup: { |
||||
|
emitCJS: true, |
||||
|
}, |
||||
|
}); |
||||
@ -0,0 +1,39 @@ |
|||||
|
{ |
||||
|
"name": "@vben/stylelint-config", |
||||
|
"version": "1.0.0", |
||||
|
"private": true, |
||||
|
"license": "MIT", |
||||
|
"exports": { |
||||
|
".": { |
||||
|
"types": "./dist/index.d.ts", |
||||
|
"import": "./dist/index.mjs", |
||||
|
"require": "./dist/index.cjs" |
||||
|
} |
||||
|
}, |
||||
|
"main": "./dist/index.cjs", |
||||
|
"module": "./dist/index.mjs", |
||||
|
"types": "./dist/index.d.ts", |
||||
|
"files": [ |
||||
|
"dist" |
||||
|
], |
||||
|
"scripts": { |
||||
|
"clean": "pnpm rimraf .turbo node_modules dist", |
||||
|
"stub": "pnpm unbuild --stub" |
||||
|
}, |
||||
|
"devDependencies": { |
||||
|
"postcss": "^8.4.21", |
||||
|
"postcss-html": "^1.5.0", |
||||
|
"postcss-less": "^6.0.0", |
||||
|
"postcss-scss": "^4.0.6", |
||||
|
"prettier": "^2.8.7", |
||||
|
"stylelint": "^15.4.0", |
||||
|
"stylelint-config-property-sort-order-smacss": "^9.1.0", |
||||
|
"stylelint-config-recommended": "^11.0.0", |
||||
|
"stylelint-config-recommended-scss": "^9.0.1", |
||||
|
"stylelint-config-recommended-vue": "^1.4.0", |
||||
|
"stylelint-config-standard": "^32.0.0", |
||||
|
"stylelint-config-standard-scss": "^7.0.1", |
||||
|
"stylelint-order": "^6.0.3", |
||||
|
"stylelint-prettier": "^3.0.0" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,89 @@ |
|||||
|
export default { |
||||
|
extends: ['stylelint-config-standard', 'stylelint-config-property-sort-order-smacss'], |
||||
|
plugins: ['stylelint-order', 'stylelint-prettier'], |
||||
|
// customSyntax: 'postcss-html',
|
||||
|
overrides: [ |
||||
|
{ |
||||
|
files: ['**/*.(css|html|vue)'], |
||||
|
customSyntax: 'postcss-html', |
||||
|
}, |
||||
|
{ |
||||
|
files: ['*.less', '**/*.less'], |
||||
|
customSyntax: 'postcss-less', |
||||
|
extends: ['stylelint-config-standard', 'stylelint-config-recommended-vue'], |
||||
|
}, |
||||
|
{ |
||||
|
files: ['*.scss', '**/*.scss'], |
||||
|
customSyntax: 'postcss-scss', |
||||
|
extends: ['stylelint-config-standard-scss', 'stylelint-config-recommended-vue/scss'], |
||||
|
rule: { |
||||
|
'scss/percent-placeholder-pattern': null, |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
rules: { |
||||
|
'function-no-unknown': null, |
||||
|
'selector-class-pattern': null, |
||||
|
'selector-pseudo-class-no-unknown': [ |
||||
|
true, |
||||
|
{ |
||||
|
ignorePseudoClasses: ['global', 'deep'], |
||||
|
}, |
||||
|
], |
||||
|
'selector-pseudo-element-no-unknown': [ |
||||
|
true, |
||||
|
{ |
||||
|
ignorePseudoElements: ['v-deep'], |
||||
|
}, |
||||
|
], |
||||
|
'at-rule-no-unknown': [ |
||||
|
true, |
||||
|
{ |
||||
|
ignoreAtRules: [ |
||||
|
'tailwind', |
||||
|
'apply', |
||||
|
'variants', |
||||
|
'responsive', |
||||
|
'screen', |
||||
|
'function', |
||||
|
'if', |
||||
|
'each', |
||||
|
'include', |
||||
|
'mixin', |
||||
|
'extend', |
||||
|
], |
||||
|
}, |
||||
|
], |
||||
|
'no-empty-source': null, |
||||
|
'string-quotes': null, |
||||
|
'named-grid-areas-no-invalid': null, |
||||
|
'no-descending-specificity': null, |
||||
|
'font-family-no-missing-generic-family-keyword': null, |
||||
|
'rule-empty-line-before': [ |
||||
|
'always', |
||||
|
{ |
||||
|
ignore: ['after-comment', 'first-nested'], |
||||
|
}, |
||||
|
], |
||||
|
'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }], |
||||
|
'order/order': [ |
||||
|
[ |
||||
|
'dollar-variables', |
||||
|
'custom-properties', |
||||
|
'at-rules', |
||||
|
'declarations', |
||||
|
{ |
||||
|
type: 'at-rule', |
||||
|
name: 'supports', |
||||
|
}, |
||||
|
{ |
||||
|
type: 'at-rule', |
||||
|
name: 'media', |
||||
|
}, |
||||
|
'rules', |
||||
|
], |
||||
|
{ severity: 'error' }, |
||||
|
], |
||||
|
}, |
||||
|
ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'], |
||||
|
}; |
||||
@ -0,0 +1,7 @@ |
|||||
|
{ |
||||
|
"name": "@vben/ts-config", |
||||
|
"version": "1.0.0", |
||||
|
"private": true, |
||||
|
"license": "MIT", |
||||
|
"devDependencies": {} |
||||
|
} |
||||
File diff suppressed because it is too large
@ -1,2 +1,3 @@ |
|||||
packages: |
packages: |
||||
- '_internal/*' |
- 'internal/*' |
||||
|
- 'packages/*' |
||||
|
|||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue