@pubinfo/config 2.0.0-beta.31 → 2.0.0-beta.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,61 +1,60 @@
1
1
  {
2
2
  "name": "@pubinfo/config",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.31",
4
+ "version": "2.0.0-beta.32",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
8
- "default": "./dist/index.mjs"
8
+ "default": "./dist/index.js"
9
9
  },
10
10
  "./eslint": {
11
11
  "types": "./dist/eslint/index.d.ts",
12
- "default": "./dist/eslint/index.mjs"
12
+ "default": "./dist/eslint/index.js"
13
13
  },
14
14
  "./themes": {
15
15
  "types": "./dist/themes/index.d.ts",
16
- "default": "./dist/themes/index.mjs"
16
+ "default": "./dist/themes/index.js"
17
17
  },
18
18
  "./stylelint": {
19
19
  "types": "./dist/stylelint.d.ts",
20
- "default": "./dist/stylelint.mjs"
20
+ "default": "./dist/stylelint.js"
21
21
  },
22
22
  "./unocss": {
23
23
  "types": "./dist/unocss/index.d.ts",
24
- "default": "./dist/unocss/index.mjs"
24
+ "default": "./dist/unocss/index.js"
25
25
  }
26
26
  },
27
- "main": "./dist/index.mjs",
28
- "module": "./dist/index.mjs",
27
+ "main": "./dist/index.js",
28
+ "module": "./dist/index.js",
29
29
  "types": "./dist/index.d.ts",
30
30
  "files": [
31
31
  "dist",
32
32
  "src"
33
33
  ],
34
34
  "peerDependencies": {
35
- "eslint": "^9.27.0",
36
- "stylelint": "^16.20.0",
35
+ "eslint": "^9.30.1",
36
+ "stylelint": "^16.21.0",
37
37
  "unocss": "^65.5.0"
38
38
  },
39
39
  "dependencies": {
40
- "@antfu/eslint-config": "^3.16.0",
41
- "@stylistic/stylelint-plugin": "^2.1.3",
40
+ "@antfu/eslint-config": "^4.16.2",
41
+ "@stylistic/stylelint-plugin": "^3.1.3",
42
42
  "@unocss/core": "^65.5.0",
43
43
  "postcss-html": "^1.8.0",
44
- "postcss-preset-env": "^10.2.0",
45
- "stylelint-config-recess-order": "^5.1.1",
44
+ "postcss-preset-env": "^10.2.4",
45
+ "stylelint-config-recess-order": "^7.1.0",
46
46
  "stylelint-config-standard-less": "^3.0.1",
47
- "stylelint-config-standard-scss": "^13.1.0",
47
+ "stylelint-config-standard-scss": "^15.0.1",
48
48
  "stylelint-config-standard-vue": "^1.0.0",
49
- "stylelint-scss": "^6.12.0"
49
+ "stylelint-scss": "^6.12.1"
50
50
  },
51
51
  "devDependencies": {
52
- "eslint": "^9.27.0",
53
- "stylelint": "^16.20.0",
54
- "unbuild": "^3.5.0",
52
+ "eslint": "^9.30.1",
53
+ "stylelint": "^16.21.0",
55
54
  "unocss": "^65.5.0"
56
55
  },
57
56
  "scripts": {
58
- "stub": "unbuild --stub",
59
- "build": "unbuild"
57
+ "stub": "tsdown --watch",
58
+ "build": "tsdown"
60
59
  }
61
60
  }
@@ -1,44 +1,44 @@
1
1
  import { hex2rgba } from './unocss-utils';
2
2
 
3
3
  type CSSColorValue = string;
4
- type manColor =
5
- | 'bg'
6
- | 'container-bg'
7
- | 'border-color';
4
+ type manColor
5
+ = | 'bg'
6
+ | 'container-bg'
7
+ | 'border-color';
8
8
 
9
- type headerColor =
10
- | 'header-bg'
11
- | 'header-color'
12
- | 'header-menu-color'
13
- | 'header-menu-hover-bg'
14
- | 'header-menu-hover-color'
15
- | 'header-menu-active-bg'
16
- | 'header-menu-active-color';
9
+ type headerColor
10
+ = | 'header-bg'
11
+ | 'header-color'
12
+ | 'header-menu-color'
13
+ | 'header-menu-hover-bg'
14
+ | 'header-menu-hover-color'
15
+ | 'header-menu-active-bg'
16
+ | 'header-menu-active-color';
17
17
 
18
- type mainSidebarColor =
19
- | 'main-sidebar-bg'
20
- | 'main-sidebar-menu-color'
21
- | 'main-sidebar-menu-hover-bg'
22
- | 'main-sidebar-menu-hover-color'
23
- | 'main-sidebar-menu-active-bg'
24
- | 'main-sidebar-menu-active-color';
18
+ type mainSidebarColor
19
+ = | 'main-sidebar-bg'
20
+ | 'main-sidebar-menu-color'
21
+ | 'main-sidebar-menu-hover-bg'
22
+ | 'main-sidebar-menu-hover-color'
23
+ | 'main-sidebar-menu-active-bg'
24
+ | 'main-sidebar-menu-active-color';
25
25
 
26
- type subSidebarColor =
27
- | 'sub-sidebar-bg'
28
- | 'sub-sidebar-logo-bg'
29
- | 'sub-sidebar-logo-color'
30
- | 'sub-sidebar-menu-color'
31
- | 'sub-sidebar-menu-hover-bg'
32
- | 'sub-sidebar-menu-hover-color'
33
- | 'sub-sidebar-menu-active-bg'
34
- | 'sub-sidebar-menu-active-color';
26
+ type subSidebarColor
27
+ = | 'sub-sidebar-bg'
28
+ | 'sub-sidebar-logo-bg'
29
+ | 'sub-sidebar-logo-color'
30
+ | 'sub-sidebar-menu-color'
31
+ | 'sub-sidebar-menu-hover-bg'
32
+ | 'sub-sidebar-menu-hover-color'
33
+ | 'sub-sidebar-menu-active-bg'
34
+ | 'sub-sidebar-menu-active-color';
35
35
 
36
- type tabbarColor =
37
- | 'tabbar-dividers-bg'
38
- | 'tabbar-tab-color'
39
- | 'tabbar-tab-hover-bg'
40
- | 'tabbar-tab-hover-color'
41
- | 'tabbar-tab-active-color';
36
+ type tabbarColor
37
+ = | 'tabbar-dividers-bg'
38
+ | 'tabbar-tab-color'
39
+ | 'tabbar-tab-hover-bg'
40
+ | 'tabbar-tab-hover-color'
41
+ | 'tabbar-tab-active-color';
42
42
 
43
43
  type themeScheme = 'light' | 'dark';
44
44
  type customColor = typeof customColorKey[number];
@@ -1,6 +0,0 @@
1
- import { p as pubinfo } from '../shared/config.CSqBb4YU.mjs';
2
- import '@antfu/eslint-config';
3
-
4
-
5
-
6
- export { pubinfo as default };
@@ -1,6 +0,0 @@
1
- import { p as pubinfo } from '../shared/config.D4FYsBnQ.mjs';
2
- import '@antfu/eslint-config';
3
-
4
-
5
-
6
- export { pubinfo as default };
package/dist/index.d.mts DELETED
@@ -1,6 +0,0 @@
1
- export { p as eslint } from './shared/config.CSqBb4YU.mjs';
2
- export { default as stylelint } from './stylelint.mjs';
3
- export { colorScheme, cssVarKey, customColorKey, defineTheme, getThemes, globalTheme, themeOptions } from './themes/index.mjs';
4
- export { default as presetPubinfo } from './unocss/index.mjs';
5
- import '@antfu/eslint-config';
6
- import 'unocss';
package/dist/index.mjs DELETED
@@ -1,7 +0,0 @@
1
- export { p as eslint } from './shared/config.D4FYsBnQ.mjs';
2
- export { default as stylelint } from './stylelint.mjs';
3
- export { customColorKey, defineTheme, getThemes } from './themes/index.mjs';
4
- export { default as presetPubinfo } from './unocss/index.mjs';
5
- import '@antfu/eslint-config';
6
- import 'unocss';
7
- import '@unocss/core';
@@ -1,5 +0,0 @@
1
- import antfu, { TypedFlatConfigItem } from '@antfu/eslint-config';
2
-
3
- declare function pubinfo(...userConfigs: Parameters<typeof antfu>[1][]): Promise<TypedFlatConfigItem[]>;
4
-
5
- export { pubinfo as p };
@@ -1,5 +0,0 @@
1
- import antfu, { TypedFlatConfigItem } from '@antfu/eslint-config';
2
-
3
- declare function pubinfo(...userConfigs: Parameters<typeof antfu>[1][]): Promise<TypedFlatConfigItem[]>;
4
-
5
- export { pubinfo as p };
@@ -1,133 +0,0 @@
1
- import antfu from '@antfu/eslint-config';
2
-
3
- const GLOB_EXCLUDE = [
4
- "**/node_modules",
5
- "**/dist",
6
- "**/package-lock.json",
7
- "**/yarn.lock",
8
- "**/pnpm-lock.yaml",
9
- "**/bun.lockb",
10
- "**/output",
11
- "**/coverage",
12
- "**/temp",
13
- "**/.temp",
14
- "**/tmp",
15
- "**/.tmp",
16
- "**/.history",
17
- "**/.vitepress/cache",
18
- "**/.nuxt",
19
- "**/.next",
20
- "**/.vercel",
21
- "**/.changeset",
22
- "**/.idea",
23
- "**/.cache",
24
- "**/.output",
25
- "**/.vite-inspect",
26
- "**/es",
27
- "**/lib",
28
- "**/CHANGELOG*.md",
29
- "**/*.min.*",
30
- "**/LICENSE*",
31
- "**/__snapshots__",
32
- "**/auto-import?(s).d.ts",
33
- "**/components.d.ts",
34
- "**/*.cjs",
35
- "**/*.mjs",
36
- "**/assets/**/*.json"
37
- ];
38
-
39
- async function ignores() {
40
- return [
41
- {
42
- ignores: GLOB_EXCLUDE
43
- }
44
- ];
45
- }
46
-
47
- async function stylistic() {
48
- return [
49
- {
50
- rules: {
51
- "eslint-comments/no-unlimited-disable": "off",
52
- "curly": ["error", "all"],
53
- "antfu/consistent-list-newline": "off",
54
- "regexp/no-unused-capturing-group": "off",
55
- "unused-imports/no-unused-vars": "off",
56
- "unicorn/consistent-function-scoping": "off"
57
- }
58
- },
59
- {
60
- rules: {
61
- "style/semi": ["error", "always"]
62
- }
63
- }
64
- ];
65
- }
66
-
67
- async function vue() {
68
- return [
69
- {
70
- files: [
71
- "**/*.vue"
72
- ],
73
- rules: {
74
- "vue/block-order": ["error", {
75
- order: [
76
- "route",
77
- "i18n",
78
- "script",
79
- "template",
80
- "style"
81
- ]
82
- }],
83
- "vue/component-api-style": [
84
- "error",
85
- ["script-setup", "composition"]
86
- ],
87
- "vue/match-component-import-name": ["error"],
88
- "vue/new-line-between-multi-line-property": ["error"],
89
- "vue/no-empty-component-block": ["error"],
90
- "vue/no-potential-component-option-typo": ["error", {
91
- presets: ["all"]
92
- }],
93
- "vue/prefer-define-options": ["error"],
94
- "vue/valid-define-options": ["error"],
95
- "vue/require-macro-variable-name": ["error", {
96
- defineProps: "props",
97
- defineEmits: "emit",
98
- defineSlots: "slots",
99
- useSlots: "slots",
100
- useAttrs: "attrs"
101
- }],
102
- "vue/no-unused-emit-declarations": ["error"],
103
- "vue/attribute-hyphenation": [
104
- "warn",
105
- "always",
106
- {}
107
- ]
108
- }
109
- },
110
- {
111
- files: [
112
- "**/views/**/*.vue"
113
- ],
114
- rules: {
115
- "vue/no-multiple-template-root": ["error"]
116
- }
117
- }
118
- ];
119
- }
120
-
121
- async function pubinfo(...userConfigs) {
122
- return antfu(
123
- {
124
- unocss: false
125
- },
126
- vue(),
127
- stylistic(),
128
- ignores(),
129
- ...userConfigs
130
- );
131
- }
132
-
133
- export { pubinfo as p };
@@ -1,106 +0,0 @@
1
- declare const _default: {
2
- extends: string[];
3
- plugins: string[];
4
- overrides: ({
5
- files: string[];
6
- customSyntax: string;
7
- extends?: undefined;
8
- rule?: undefined;
9
- } | {
10
- files: string[];
11
- customSyntax: string;
12
- extends: string[];
13
- rule?: undefined;
14
- } | {
15
- files: string[];
16
- customSyntax: string;
17
- extends: string[];
18
- rule: {
19
- 'scss/double-slash-comment-empty-line-before': null;
20
- 'scss/no-global-function-names': null;
21
- };
22
- })[];
23
- rules: {
24
- 'at-rule-no-unknown': null;
25
- 'no-descending-specificity': null;
26
- 'property-no-unknown': null;
27
- 'font-family-no-missing-generic-family-keyword': null;
28
- 'selector-class-pattern': null;
29
- 'function-no-unknown': (boolean | {
30
- ignoreFunctions: string[];
31
- })[];
32
- 'selector-pseudo-element-no-unknown': (boolean | {
33
- ignorePseudoElements: string[];
34
- })[];
35
- '@stylistic/at-rule-name-case': string;
36
- '@stylistic/at-rule-name-space-after': string;
37
- '@stylistic/at-rule-semicolon-newline-after': string;
38
- '@stylistic/block-closing-brace-empty-line-before': string;
39
- '@stylistic/block-closing-brace-newline-before': string;
40
- '@stylistic/block-closing-brace-space-before': string;
41
- '@stylistic/block-opening-brace-newline-after': string;
42
- '@stylistic/block-opening-brace-space-after': string;
43
- '@stylistic/block-opening-brace-space-before': string;
44
- '@stylistic/color-hex-case': string;
45
- '@stylistic/declaration-bang-space-after': string;
46
- '@stylistic/declaration-bang-space-before': string;
47
- '@stylistic/declaration-block-semicolon-newline-after': string;
48
- '@stylistic/declaration-block-semicolon-space-after': string;
49
- '@stylistic/declaration-block-semicolon-space-before': string;
50
- '@stylistic/declaration-block-trailing-semicolon': string;
51
- '@stylistic/declaration-colon-newline-after': string;
52
- '@stylistic/declaration-colon-space-after': string;
53
- '@stylistic/declaration-colon-space-before': string;
54
- '@stylistic/function-comma-newline-after': string;
55
- '@stylistic/function-comma-space-after': string;
56
- '@stylistic/function-comma-space-before': string;
57
- '@stylistic/function-max-empty-lines': number;
58
- '@stylistic/function-parentheses-newline-inside': string;
59
- '@stylistic/function-parentheses-space-inside': string;
60
- '@stylistic/function-whitespace-after': string;
61
- '@stylistic/indentation': number;
62
- '@stylistic/max-empty-lines': number;
63
- '@stylistic/media-feature-colon-space-after': string;
64
- '@stylistic/media-feature-colon-space-before': string;
65
- '@stylistic/media-feature-name-case': string;
66
- '@stylistic/media-feature-parentheses-space-inside': string;
67
- '@stylistic/media-feature-range-operator-space-after': string;
68
- '@stylistic/media-feature-range-operator-space-before': string;
69
- '@stylistic/media-query-list-comma-newline-after': string;
70
- '@stylistic/media-query-list-comma-space-after': string;
71
- '@stylistic/media-query-list-comma-space-before': string;
72
- '@stylistic/no-empty-first-line': boolean;
73
- '@stylistic/no-eol-whitespace': boolean;
74
- '@stylistic/no-extra-semicolons': boolean;
75
- '@stylistic/no-missing-end-of-source-newline': boolean;
76
- '@stylistic/number-leading-zero': string;
77
- '@stylistic/number-no-trailing-zeros': boolean;
78
- '@stylistic/property-case': string;
79
- '@stylistic/selector-attribute-brackets-space-inside': string;
80
- '@stylistic/selector-attribute-operator-space-after': string;
81
- '@stylistic/selector-attribute-operator-space-before': string;
82
- '@stylistic/selector-combinator-space-after': string;
83
- '@stylistic/selector-combinator-space-before': string;
84
- '@stylistic/selector-descendant-combinator-no-non-space': boolean;
85
- '@stylistic/selector-list-comma-newline-after': string;
86
- '@stylistic/selector-list-comma-space-before': string;
87
- '@stylistic/selector-max-empty-lines': number;
88
- '@stylistic/selector-pseudo-class-case': string;
89
- '@stylistic/selector-pseudo-class-parentheses-space-inside': string;
90
- '@stylistic/selector-pseudo-element-case': string;
91
- '@stylistic/string-quotes': string;
92
- '@stylistic/unit-case': string;
93
- '@stylistic/value-list-comma-newline-after': string;
94
- '@stylistic/value-list-comma-space-after': string;
95
- '@stylistic/value-list-comma-space-before': string;
96
- '@stylistic/value-list-max-empty-lines': number;
97
- '@stylistic/max-line-length': null;
98
- '@stylistic/block-closing-brace-newline-after': (string | {
99
- ignoreAtRules: string[];
100
- })[];
101
- };
102
- allowEmptyInput: boolean;
103
- ignoreFiles: string[];
104
- };
105
-
106
- export { _default as default };
@@ -1,137 +0,0 @@
1
- const stylelint = {
2
- extends: [
3
- "stylelint-config-recess-order"
4
- ],
5
- plugins: [
6
- "stylelint-scss",
7
- "@stylistic/stylelint-plugin"
8
- ],
9
- overrides: [
10
- {
11
- files: ["**/*.(css|html|vue)"],
12
- customSyntax: "postcss-html"
13
- },
14
- {
15
- files: ["*.less", "**/*.less"],
16
- customSyntax: "postcss-less",
17
- extends: ["stylelint-config-standard-less", "stylelint-config-standard-vue"]
18
- },
19
- {
20
- files: ["*.scss", "**/*.scss"],
21
- customSyntax: "postcss-scss",
22
- extends: ["stylelint-config-standard-scss", "stylelint-config-standard-vue/scss"],
23
- rule: {
24
- "scss/double-slash-comment-empty-line-before": null,
25
- "scss/no-global-function-names": null
26
- }
27
- }
28
- ],
29
- rules: {
30
- "at-rule-no-unknown": null,
31
- "no-descending-specificity": null,
32
- "property-no-unknown": null,
33
- "font-family-no-missing-generic-family-keyword": null,
34
- "selector-class-pattern": null,
35
- "function-no-unknown": [
36
- true,
37
- {
38
- ignoreFunctions: [
39
- "v-bind",
40
- "map-get",
41
- "lighten",
42
- "darken"
43
- ]
44
- }
45
- ],
46
- "selector-pseudo-element-no-unknown": [
47
- true,
48
- {
49
- ignorePseudoElements: [
50
- "/^view-transition/"
51
- ]
52
- }
53
- ],
54
- // 提取自 https://github.com/elirasza/stylelint-stylistic/blob/main/config/index.js
55
- "@stylistic/at-rule-name-case": "lower",
56
- "@stylistic/at-rule-name-space-after": "always-single-line",
57
- "@stylistic/at-rule-semicolon-newline-after": "always",
58
- "@stylistic/block-closing-brace-empty-line-before": "never",
59
- "@stylistic/block-closing-brace-newline-before": "always-multi-line",
60
- "@stylistic/block-closing-brace-space-before": "always-single-line",
61
- "@stylistic/block-opening-brace-newline-after": "always-multi-line",
62
- "@stylistic/block-opening-brace-space-after": "always-single-line",
63
- "@stylistic/block-opening-brace-space-before": "always",
64
- "@stylistic/color-hex-case": "lower",
65
- "@stylistic/declaration-bang-space-after": "never",
66
- "@stylistic/declaration-bang-space-before": "always",
67
- "@stylistic/declaration-block-semicolon-newline-after": "always-multi-line",
68
- "@stylistic/declaration-block-semicolon-space-after": "always-single-line",
69
- "@stylistic/declaration-block-semicolon-space-before": "never",
70
- "@stylistic/declaration-block-trailing-semicolon": "always",
71
- "@stylistic/declaration-colon-newline-after": "always-multi-line",
72
- "@stylistic/declaration-colon-space-after": "always-single-line",
73
- "@stylistic/declaration-colon-space-before": "never",
74
- "@stylistic/function-comma-newline-after": "always-multi-line",
75
- "@stylistic/function-comma-space-after": "always-single-line",
76
- "@stylistic/function-comma-space-before": "never",
77
- "@stylistic/function-max-empty-lines": 0,
78
- "@stylistic/function-parentheses-newline-inside": "always-multi-line",
79
- "@stylistic/function-parentheses-space-inside": "never-single-line",
80
- "@stylistic/function-whitespace-after": "always",
81
- "@stylistic/indentation": 2,
82
- "@stylistic/max-empty-lines": 1,
83
- "@stylistic/media-feature-colon-space-after": "always",
84
- "@stylistic/media-feature-colon-space-before": "never",
85
- "@stylistic/media-feature-name-case": "lower",
86
- "@stylistic/media-feature-parentheses-space-inside": "never",
87
- "@stylistic/media-feature-range-operator-space-after": "always",
88
- "@stylistic/media-feature-range-operator-space-before": "always",
89
- "@stylistic/media-query-list-comma-newline-after": "always-multi-line",
90
- "@stylistic/media-query-list-comma-space-after": "always-single-line",
91
- "@stylistic/media-query-list-comma-space-before": "never",
92
- "@stylistic/no-empty-first-line": true,
93
- "@stylistic/no-eol-whitespace": true,
94
- "@stylistic/no-extra-semicolons": true,
95
- "@stylistic/no-missing-end-of-source-newline": true,
96
- "@stylistic/number-leading-zero": "always",
97
- "@stylistic/number-no-trailing-zeros": true,
98
- "@stylistic/property-case": "lower",
99
- "@stylistic/selector-attribute-brackets-space-inside": "never",
100
- "@stylistic/selector-attribute-operator-space-after": "never",
101
- "@stylistic/selector-attribute-operator-space-before": "never",
102
- "@stylistic/selector-combinator-space-after": "always",
103
- "@stylistic/selector-combinator-space-before": "always",
104
- "@stylistic/selector-descendant-combinator-no-non-space": true,
105
- "@stylistic/selector-list-comma-newline-after": "always",
106
- "@stylistic/selector-list-comma-space-before": "never",
107
- "@stylistic/selector-max-empty-lines": 0,
108
- "@stylistic/selector-pseudo-class-case": "lower",
109
- "@stylistic/selector-pseudo-class-parentheses-space-inside": "never",
110
- "@stylistic/selector-pseudo-element-case": "lower",
111
- "@stylistic/string-quotes": "double",
112
- "@stylistic/unit-case": "lower",
113
- "@stylistic/value-list-comma-newline-after": "always-multi-line",
114
- "@stylistic/value-list-comma-space-after": "always-single-line",
115
- "@stylistic/value-list-comma-space-before": "never",
116
- "@stylistic/value-list-max-empty-lines": 0,
117
- // 根据需要覆盖部分规则
118
- "@stylistic/max-line-length": null,
119
- "@stylistic/block-closing-brace-newline-after": [
120
- "always",
121
- {
122
- ignoreAtRules: ["if", "else"]
123
- }
124
- ]
125
- },
126
- allowEmptyInput: true,
127
- ignoreFiles: [
128
- "**/node_modules/**/*",
129
- "**/dist*/**/*",
130
- "**/src/assets/fonts/**/*",
131
- "**/*.cjs",
132
- "**/*.ejs",
133
- "**/.pubinfo/**/*"
134
- ]
135
- };
136
-
137
- export { stylelint as default };