@pubinfo/config 2.0.0-beta.9 → 2.0.0-rc.1

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.
Files changed (57) hide show
  1. package/dist/eslint/index.d.ts +2 -6
  2. package/dist/eslint/index.js +3 -0
  3. package/dist/eslint-B0bQR0lJ.js +121 -0
  4. package/dist/index-BlfMIrXI.d.ts +6 -0
  5. package/dist/index-DFGyu9wF.d.ts +9 -0
  6. package/dist/{themes/index.d.mts → index-xzslCJW7.d.ts} +9 -10
  7. package/dist/index.d.ts +5 -6
  8. package/dist/index.js +6 -0
  9. package/dist/stylelint-9CMQiIxC.d.ts +107 -0
  10. package/dist/stylelint-QHUuft1u.js +114 -0
  11. package/dist/stylelint.d.ts +2 -106
  12. package/dist/stylelint.js +3 -0
  13. package/dist/themes/index.d.ts +2 -29
  14. package/dist/themes/index.js +3 -0
  15. package/dist/themes-CL2YKvqM.js +558 -0
  16. package/dist/unocss/index.d.ts +3 -5
  17. package/dist/unocss/index.js +4 -0
  18. package/dist/unocss-Be8qA77X.js +92 -0
  19. package/package.json +25 -25
  20. package/src/eslint/config/ignores.ts +10 -0
  21. package/src/eslint/config/stylistic.ts +21 -0
  22. package/src/eslint/config/vue.ts +54 -0
  23. package/src/eslint/factory.ts +20 -0
  24. package/src/eslint/globs.ts +86 -0
  25. package/src/eslint/index.ts +3 -0
  26. package/src/index.ts +4 -0
  27. package/src/stylelint.ts +134 -0
  28. package/src/themes/index.ts +3 -0
  29. package/src/themes/system/dark/dark.ts +47 -0
  30. package/src/themes/system/dark/dracula.ts +47 -0
  31. package/src/themes/system/dark/luxury.ts +47 -0
  32. package/src/themes/system/dark/night.ts +47 -0
  33. package/src/themes/system/dark/stone.ts +47 -0
  34. package/src/themes/system/dark/synthwave.ts +47 -0
  35. package/src/themes/system/light/barbie.ts +47 -0
  36. package/src/themes/system/light/classic.ts +47 -0
  37. package/src/themes/system/light/cyberpunk.ts +47 -0
  38. package/src/themes/system/light/light.ts +47 -0
  39. package/src/themes/system/light/naive.ts +47 -0
  40. package/src/themes/system/light/winter.ts +47 -0
  41. package/src/themes/theme.ts +18 -0
  42. package/src/themes/unocss-utils.ts +52 -0
  43. package/src/themes/utils.ts +81 -0
  44. package/src/unocss/index.ts +61 -0
  45. package/src/unocss/presetThemes.ts +57 -0
  46. package/dist/eslint/index.d.mts +0 -6
  47. package/dist/eslint/index.mjs +0 -6
  48. package/dist/index.d.mts +0 -6
  49. package/dist/index.mjs +0 -7
  50. package/dist/shared/config.CSqBb4YU.d.mts +0 -5
  51. package/dist/shared/config.CSqBb4YU.d.ts +0 -5
  52. package/dist/shared/config.DPEra-Xx.mjs +0 -141
  53. package/dist/stylelint.d.mts +0 -106
  54. package/dist/stylelint.mjs +0 -137
  55. package/dist/themes/index.mjs +0 -626
  56. package/dist/unocss/index.d.mts +0 -5
  57. package/dist/unocss/index.mjs +0 -99
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, globalTheme, mergeTheme, themeOptions, themes } 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.DPEra-Xx.mjs';
2
- export { default as stylelint } from './stylelint.mjs';
3
- export { customColorKey, defineTheme, mergeTheme, themes } 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,141 +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
- // files: [
66
- // '**/plop-templates/**/*.js',
67
- // ],
68
- rules: {
69
- "style/arrow-parens": ["off"]
70
- }
71
- }
72
- ];
73
- }
74
-
75
- async function vue() {
76
- return [
77
- {
78
- files: [
79
- "**/*.vue"
80
- ],
81
- rules: {
82
- "vue/block-order": ["error", {
83
- order: [
84
- "route",
85
- "i18n",
86
- "script",
87
- "template",
88
- "style"
89
- ]
90
- }],
91
- "vue/component-api-style": [
92
- "error",
93
- ["script-setup", "composition"]
94
- ],
95
- "vue/match-component-import-name": ["error"],
96
- "vue/new-line-between-multi-line-property": ["error"],
97
- "vue/no-empty-component-block": ["error"],
98
- "vue/no-potential-component-option-typo": ["error", {
99
- presets: ["all"]
100
- }],
101
- "vue/prefer-define-options": ["error"],
102
- "vue/valid-define-options": ["error"],
103
- "vue/require-macro-variable-name": ["error", {
104
- defineProps: "props",
105
- defineEmits: "emit",
106
- defineSlots: "slots",
107
- useSlots: "slots",
108
- useAttrs: "attrs"
109
- }],
110
- "vue/no-unused-emit-declarations": ["error"],
111
- "vue/attribute-hyphenation": [
112
- "warn",
113
- "always",
114
- {}
115
- ]
116
- }
117
- },
118
- {
119
- files: [
120
- "**/views/**/*.vue"
121
- ],
122
- rules: {
123
- "vue/no-multiple-template-root": ["error"]
124
- }
125
- }
126
- ];
127
- }
128
-
129
- async function pubinfo(...userConfigs) {
130
- return antfu(
131
- {
132
- unocss: false
133
- },
134
- vue(),
135
- stylistic(),
136
- ignores(),
137
- ...userConfigs
138
- );
139
- }
140
-
141
- 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 };