Skip to content

Commit 9c1e298

Browse files
authored
Ts part 2 (#38)
Convert website to typescript Use next babel plugins Update to latest next
1 parent d934b95 commit 9c1e298

Some content is hidden

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

58 files changed

+1633
-12543
lines changed

.changeset/2b172da0/changes.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"releases": [{ "name": "@brisk-docs/website", "type": "patch" }],
3+
"dependents": []
4+
}

.changeset/2b172da0/changes.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Convert website code to use typescript

.circleci/config.yml

+5-9
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ job-setup: &job-setup
77

88
restore-cache: &restore-cache
99
keys:
10-
- v1-dependencies-{{ checksum "package.json" }}
10+
- v3-dependencies-{{ checksum "yarn.lock" }}
1111
# fallback to using the latest cache if no exact match is found
12-
- v1-dependencies-
12+
- v3-dependencies-
1313

1414
save-cache: &save-cache
1515
paths:
1616
- node_modules
1717
- ~/.cache
18-
key: v1-dependencies-{{ checksum "package.json" }}
18+
key: v3-dependencies-{{ checksum "yarn.lock" }}
1919

2020
install-bolt: &install-bolt
2121
name: Install Bolt
@@ -54,7 +54,6 @@ jobs:
5454
name: Lint Files
5555
command: bolt lint
5656

57-
5857
unit_tests:
5958
<<: *job-setup
6059
steps:
@@ -73,8 +72,6 @@ jobs:
7372
- store_test_results:
7473
path: test-reports/junit
7574

76-
77-
7875
integration_tests:
7976
<<: *job-setup
8077
steps:
@@ -90,14 +87,13 @@ jobs:
9087

9188
- run:
9289
name: Start up website
93-
command: bolt start
90+
command: bolt start:website
9491
background: true
9592

9693
- run:
9794
name: Cypress Suite
9895
command: node_modules/.bin/wait-on http://localhost:8080 && bolt cypress
9996

100-
10197
workflows:
10298
version: 2
10399
build:
@@ -111,4 +107,4 @@ workflows:
111107
- install
112108
- integration_tests:
113109
requires:
114-
- install
110+
- install

.eslintrc

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
],
1010
"plugins": ["emotion"],
1111
"rules": {
12+
"import/no-unresolved": "off",
1213
"emotion/jsx-import": "error",
1314
"react/jsx-filename-extension": "off",
1415
"react/require-default-props": "off",

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.next
22
*.json
3+
dist

babel.config.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
module.exports = {
2-
presets: [
3-
'@babel/preset-env',
4-
'@babel/preset-react',
5-
'@babel/preset-typescript',
6-
],
2+
presets: ['next/babel', '@zeit/next-typescript/babel'],
73
plugins: [
84
'emotion',
95
[
@@ -14,7 +10,6 @@ module.exports = {
1410
preprocess: false,
1511
},
1612
],
17-
'transform-flow-strip-types',
1813
'@babel/proposal-class-properties',
1914
'@babel/proposal-object-rest-spread',
2015
'@babel/transform-runtime',

jest.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
const preconstruct = require('preconstruct');
2+
13
module.exports = {
24
setupFiles: ['./jest-setup.js'],
5+
moduleNameMapper: preconstruct.aliases.jest(__dirname),
36
testPathIgnorePatterns: ['./cypress/', '__fixtures__'],
47
transformIgnorePatterns: ['node_modules/(?!(@atlaskit)/)'],
58
};

0 commit comments

Comments
 (0)