Skip to content

Commit 89a5b36

Browse files
committed
chore: yarn build is working
1 parent 22cefd7 commit 89a5b36

File tree

81 files changed

+884
-89
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+884
-89
lines changed

.prettierrc.js

-7
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

package.json

+75-10
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
{
22
"name": "@carbon/vue-3",
3+
"license": "Apache-2.0",
34
"version": "0.5.0",
5+
"description": "A collection of components for the Carbon Design System built using Vue.js",
46
"private": true,
57
"packageManager": "[email protected]",
68
"scripts": {
7-
"serve": "start-storybook -p 6006",
89
"build": "vue-cli-service build --target lib --name carbon-vue-3 ./src/index.js --no-clean",
10+
"lint": "vue-cli-service lint",
11+
"build-storybook": "build-storybook",
12+
"serve": "start-storybook -p 6006",
13+
"ci-check": "yarn format:diff && yarn test --maxWorkers=5 && yarn build && yarn build-storybook --quiet",
914
"format": "prettier --write '**/*.{scss,css,js,md,vue}' '!**/{build,es,lib,storybook,ts,umd,.coverage}/**'",
1015
"format:diff": "prettier --list-different '**/*.{scss,css,js,md,vue}' '!**/{dist,storybook-static,.coverage}/**'",
1116
"format:staged": "prettier --write '**/*.{scss,css,js,md,vue}' '!**/{dist,storybook-static,.coverage}/**'",
1217
"lint:css": "stylelint '{packages,storybook}/**/*.{vue,scss}'",
1318
"lint:es": "eslint {packages,storybook}/**/*.{js,vue}",
1419
"lint:style": "vue-cli-service lint:style",
15-
"test:unit": "vue-cli-service test:unit",
16-
"lint": "vue-cli-service lint",
17-
"storybook": "start-storybook -p 6006 --no-manager-cache",
18-
"build-storybook": "build-storybook"
20+
"test": "vue-cli-service test:unit",
21+
"a11test": "node -v",
22+
"storybook": "start-storybook -p 6006 --no-manager-cache"
1923
},
2024
"dependencies": {
2125
"@carbon/icons-vue": "^10",
@@ -33,6 +37,9 @@
3337
},
3438
"devDependencies": {
3539
"@babel/core": "^7.17.10",
40+
"@babel/eslint-parser": "^7.17.0",
41+
"@commitlint/cli": "^16.2.4",
42+
"@commitlint/config-conventional": "^16.2.4",
3643
"@storybook/addon-actions": "^6.4.22",
3744
"@storybook/addon-essentials": "^6.4.22",
3845
"@storybook/addon-links": "^6.4.22",
@@ -45,13 +52,14 @@
4552
"@vue/eslint-config-prettier": "^7.0.0",
4653
"@vue/test-utils": "next",
4754
"babel-core": "^6.26.3",
48-
"babel-eslint": "^10.1.0",
4955
"babel-jest": "^28.0.3",
5056
"babel-loader": "^8.2.5",
5157
"copy-webpack-plugin": "^10.2.4",
5258
"eslint": "^8.14.0",
5359
"eslint-plugin-prettier": "^4.0.0",
5460
"eslint-plugin-vue": "^8.7.1",
61+
"husky": "^7.0.4",
62+
"lint-staged": "^12.4.1",
5563
"postcss": "^8.4.13",
5664
"postcss-loader": "^6.2.1",
5765
"prettier": "^2.6.2",
@@ -73,10 +81,40 @@
7381
"eslint:recommended",
7482
"@vue/prettier"
7583
],
84+
"rules": {
85+
"no-console": [
86+
"error",
87+
{
88+
"allow": [
89+
"warn",
90+
"error"
91+
]
92+
}
93+
],
94+
"no-debugger": "warn",
95+
"no-unused-vars": [
96+
"warn",
97+
{
98+
"ignoreRestSiblings": true
99+
}
100+
],
101+
"no-plusplus": "off",
102+
"no-undef": "off",
103+
"no-var": "error",
104+
"semi": [
105+
"error",
106+
"always"
107+
],
108+
"no-param-reassign": [
109+
"error",
110+
{
111+
"props": false
112+
}
113+
]
114+
},
76115
"parserOptions": {
77-
"parser": "babel-eslint"
116+
"parser": "@babel/eslint-parser"
78117
},
79-
"rules": {},
80118
"overrides": [
81119
{
82120
"files": [
@@ -89,6 +127,13 @@
89127
}
90128
]
91129
},
130+
"prettier": {
131+
"trailingComma": "es5",
132+
"tabWidth": 2,
133+
"semi": true,
134+
"singleQuote": true,
135+
"arrowParens": "avoid"
136+
},
92137
"browserslist": [
93138
"> 1%",
94139
"last 2 versions",
@@ -127,6 +172,26 @@
127172
"/dist",
128173
"/src"
129174
],
130-
"sideEffects": true,
131-
175+
"commitlint": {
176+
"extends": [
177+
"@commitlint/config-conventional"
178+
]
179+
},
180+
"husky": {
181+
"hooks": {
182+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
183+
"pre-commit": "lint-staged"
184+
}
185+
},
186+
"lint-staged": {
187+
"*.{scss,css,js,md,vue}": [
188+
"yarn format:staged",
189+
"git add"
190+
]
191+
},
192+
"repository": {
193+
"type": "git",
194+
"url": "git+https://github.com/carbon-design-system/carbon-components-vue.git"
195+
},
196+
"sideEffects": true
132197
}

src/components/CvCodeSnippet/_CviCodeSnippetOneline.vue

+2-3
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ export default {
8888
const text = ref(null);
8989
const container = ref(null);
9090
91-
const { hasOverflowLeft, hasOverflowRight } = useElementHasOverflow(
92-
container
93-
);
91+
const { hasOverflowLeft, hasOverflowRight } =
92+
useElementHasOverflow(container);
9493
9594
const handleCopy = () => emit('copy', text.value?.innerText);
9695
+11-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
const error = message => console.error(`[@carbon/vue] ${message}`);
22

3-
export const includesOrError = (
4-
haystack,
5-
componentName,
6-
propName
7-
) => needle => {
8-
if (!haystack.includes(needle)) {
9-
error(
10-
`Invalid ${componentName} ${propName} specified "${needle}". Valid values are: ${JSON.stringify(
11-
haystack
12-
)}`
13-
);
14-
}
3+
export const includesOrError =
4+
(haystack, componentName, propName) => needle => {
5+
if (!haystack.includes(needle)) {
6+
error(
7+
`Invalid ${componentName} ${propName} specified "${needle}". Valid values are: ${JSON.stringify(
8+
haystack
9+
)}`
10+
);
11+
}
1512

16-
return true;
17-
};
13+
return true;
14+
};

vue.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ module.exports = {
55
resolve: {
66
extensions: ['.js', '.vue', '.json', '.jsonl'],
77
},
8+
performance: {
9+
maxEntrypointSize: 768000,
10+
maxAssetSize: 768000,
11+
},
812
// plugins: [
913
// new CopyWebpackPlugin({
1014
// patterns: [{ from: "public", to: "wibble", toType: "dir" }]

0 commit comments

Comments
 (0)