Skip to content

Commit 18e3442

Browse files
authored
fix: project lint and type-check commands now work locally (#1346)
1 parent 71512e4 commit 18e3442

File tree

8 files changed

+90
-201
lines changed

8 files changed

+90
-201
lines changed

.eslintignore

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
/node_modules/**
2-
/bower_components/**
3-
/packages/**/node_modules/**
4-
**/lib/**
5-
**/dist/**
6-
**/paste-icons/react/
7-
rollup.config.js
8-
**/tsconfig.build.tsbuildinfo
1+
node_modules
2+
bower_components
3+
lib
4+
dist
5+
bin
6+
__testfixtures__
7+
8+
packages/paste-icons/cjs
9+
packages/paste-icons/esm
10+
packages/paste-icons/json
11+
packages/paste-website/public
12+
packages/paste-theme-designer/public/
13+
.cache
14+
.next
15+
.yarn
16+
17+
tsconfig.build.tsbuildinfo
918
**/*.d.ts
10-
/packages/paste-website/public/
11-
/packages/paste-theme-designer/public/
12-
__testfixtures__/

.prettierignore

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
*.json
2-
docs
3-
lib/
4-
dist/
5-
public/
6-
__IconList.tsx
7-
build.icon-list.js
8-
*.d.ts
9-
.yarn/
1+
node_modules
2+
bower_components
3+
lib
4+
dist
5+
bin
106
__testfixtures__
7+
8+
packages/paste-icons/cjs
9+
packages/paste-icons/esm
10+
packages/paste-icons/json
11+
packages/paste-website/public
12+
packages/paste-theme-designer/public/
13+
.cache
14+
.next
15+
.yarn
16+
17+
tsconfig.build.tsbuildinfo
18+
**/*.d.ts

package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"build:js": "yarn prebuild && lerna run build:js --ignore @twilio-paste/website --ignore @twilio-paste/theme-designer",
2727
"build:tokens": "yarn workspace @twilio-paste/design-tokens tokens",
2828
"build:icons": "yarn workspace @twilio-paste/icons build",
29-
"build:storybook": "build-storybook -c .storybook -o ./docs",
29+
"build:storybook": "build-storybook -c .storybook -o ./docs -s .storybook/static",
3030
"build:website": "yarn workspace @twilio-paste/website build",
3131
"build:theme-designer": "yarn workspace @twilio-paste/theme-designer build",
3232
"build:nextjs-template": "yarn workspace @twilio-paste/nextjs-template build",
@@ -51,7 +51,7 @@
5151
"prettier": "prettier --list-different '{.storybook,packages}/**/*.{ts,tsx}'",
5252
"prettier-clean": "prettier --write '{.storybook,packages}/**/*.{ts,tsx}'",
5353
"lint": "yarn pre-test && eslint --ext .tsx,.ts ./packages/** --no-error-on-unmatched-pattern",
54-
"type-check": "lerna run type-check",
54+
"type-check": "lerna run tsc",
5555
"chromatic": "chromatic",
5656
"packages:check": "manypkg check",
5757
"packages:fix": "manypkg fix",
@@ -76,8 +76,6 @@
7676
"@emotion/babel-preset-css-prop": "^10.0.14",
7777
"@expo/spawn-async": "^1.5.0",
7878
"@manypkg/cli": "0.17.0",
79-
"@rollup/plugin-commonjs": "^11.0.2",
80-
"@rollup/plugin-node-resolve": "^7.1.1",
8179
"@storybook/addon-a11y": "^6.1.14",
8280
"@storybook/addon-actions": "^6.1.14",
8381
"@storybook/addon-essentials": "^6.1.14",
@@ -163,10 +161,6 @@
163161
"react-dom": "^16.8.6",
164162
"react-test-renderer": "^16.8.6",
165163
"regenerator-runtime": "^0.13.3",
166-
"rollup": "^1.16.2",
167-
"rollup-plugin-babel": "^4.3.3",
168-
"rollup-plugin-terser": "^5.0.0",
169-
"rollup-plugin-typescript2": "^0.29.0",
170164
"shelljs": "^0.8.3",
171165
"start-server-and-test": "^1.11.5",
172166
"storybook-addon-performance": "^0.14.0",

packages/paste-core/components/avatar/stories/index.stories.tsx

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
import * as React from 'react';
22
import {Stack} from '@twilio-paste/stack';
33
import {UserIcon} from '@twilio-paste/icons/esm/UserIcon';
4-
import Avatar10 from '../../../../../.storybook/static/avatars/avatar-sizeIcon10.png';
5-
import Avatar20 from '../../../../../.storybook/static/avatars/avatar-sizeIcon20.png';
6-
import Avatar30 from '../../../../../.storybook/static/avatars/avatar-sizeIcon30.png';
7-
import Avatar40 from '../../../../../.storybook/static/avatars/avatar-sizeIcon40.png';
8-
import Avatar50 from '../../../../../.storybook/static/avatars/avatar-sizeIcon50.png';
9-
import Avatar60 from '../../../../../.storybook/static/avatars/avatar-sizeIcon60.png';
10-
import Avatar70 from '../../../../../.storybook/static/avatars/avatar-sizeIcon70.png';
11-
import Avatar80 from '../../../../../.storybook/static/avatars/avatar-sizeIcon80.png';
12-
import Avatar90 from '../../../../../.storybook/static/avatars/avatar-sizeIcon90.png';
13-
import Avatar100 from '../../../../../.storybook/static/avatars/avatar-sizeIcon100.png';
14-
import Avatar110 from '../../../../../.storybook/static/avatars/avatar-sizeIcon110.png';
154
import {Avatar} from '../src';
165

176
// eslint-disable-next-line import/no-default-export
@@ -58,17 +47,17 @@ export const Initials = (): React.ReactNode => {
5847
export const Image = (): React.ReactNode => {
5948
return (
6049
<Stack orientation="horizontal" spacing="space40">
61-
<Avatar size="sizeIcon10" name="avatar example" src={Avatar10} />
62-
<Avatar size="sizeIcon20" name="avatar example" src={Avatar20} />
63-
<Avatar size="sizeIcon30" name="avatar example" src={Avatar30} />
64-
<Avatar size="sizeIcon40" name="avatar example" src={Avatar40} />
65-
<Avatar size="sizeIcon50" name="avatar example" src={Avatar50} />
66-
<Avatar size="sizeIcon60" name="avatar example" src={Avatar60} />
67-
<Avatar size="sizeIcon70" name="avatar example" src={Avatar70} />
68-
<Avatar size="sizeIcon80" name="avatar example" src={Avatar80} />
69-
<Avatar size="sizeIcon90" name="avatar example" src={Avatar90} />
70-
<Avatar size="sizeIcon100" name="avatar example" src={Avatar100} />
71-
<Avatar size="sizeIcon110" name="avatar example" src={Avatar110} />
50+
<Avatar size="sizeIcon10" name="avatar example" src="./avatars/avatar-sizeIcon10.png" />
51+
<Avatar size="sizeIcon20" name="avatar example" src="./avatars/avatar-sizeIcon20.png" />
52+
<Avatar size="sizeIcon30" name="avatar example" src="./avatars/avatar-sizeIcon30.png" />
53+
<Avatar size="sizeIcon40" name="avatar example" src="./avatars/avatar-sizeIcon40.png" />
54+
<Avatar size="sizeIcon50" name="avatar example" src="./avatars/avatar-sizeIcon50.png" />
55+
<Avatar size="sizeIcon60" name="avatar example" src="./avatars/avatar-sizeIcon60.png" />
56+
<Avatar size="sizeIcon70" name="avatar example" src="./avatars/avatar-sizeIcon70.png" />
57+
<Avatar size="sizeIcon80" name="avatar example" src="./avatars/avatar-sizeIcon80.png" />
58+
<Avatar size="sizeIcon90" name="avatar example" src="./avatars/avatar-sizeIcon90.png" />
59+
<Avatar size="sizeIcon100" name="avatar example" src="./avatars/avatar-sizeIcon100.png" />
60+
<Avatar size="sizeIcon110" name="avatar example" src="./avatars/avatar-sizeIcon110.png" />
7261
</Stack>
7362
);
7463
};
@@ -106,7 +95,11 @@ export const ResponsiveInitials = (): React.ReactNode => {
10695
export const ResponsiveImage = (): React.ReactNode => {
10796
return (
10897
<Stack orientation="horizontal" spacing="space40">
109-
<Avatar size={['sizeIcon10', 'sizeIcon50', 'sizeIcon110']} name="avatar example" src={Avatar50} />
98+
<Avatar
99+
size={['sizeIcon10', 'sizeIcon50', 'sizeIcon110']}
100+
name="avatar example"
101+
src="./avatars/avatar-sizeIcon50.png"
102+
/>
110103
</Stack>
111104
);
112105
};

packages/paste-nextjs-template/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"dev": "next dev",
77
"build": "next build",
88
"start": "next start",
9-
"type-check": "tsc --noEmit"
9+
"tsc": "tsc --noEmit"
1010
},
1111
"dependencies": {
1212
"@twilio-paste/core": "^9.0.0",

packages/paste-website/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"build": "GATSBY_TELEMETRY_DISABLED=1 gatsby build",
1111
"serve": "GATSBY_TELEMETRY_DISABLED=1 gatsby serve",
1212
"format": "prettier --write src/**/*.{js,jsx}",
13-
"type-check": "tsc --noEmit",
14-
"type-check:watch": "yarn type-check -- --watch",
13+
"tsc": "tsc --noEmit",
14+
"tsc:watch": "yarn type-check -- --watch",
1515
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\"",
1616
"setup-env": "vercel env pull"
1717
},

tsconfig.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,20 @@
2727
"noUnusedParameters": true,
2828
"strict": true
2929
},
30-
"exclude": ["node_modules", "docs", "dist", "__testfixtures__"]
30+
"include": ["packages/**/*"],
31+
"exclude": [
32+
"node_modules",
33+
"docs",
34+
"**/*.js",
35+
"dist",
36+
"lib",
37+
"bin",
38+
"public",
39+
".cache",
40+
".next",
41+
".yarn",
42+
"cjs",
43+
"esm",
44+
"__testfixtures__"
45+
]
3146
}

0 commit comments

Comments
 (0)