Skip to content

Commit b3e34bc

Browse files
committed
Typescript
1 parent cffd3ef commit b3e34bc

File tree

94 files changed

+2254
-1371
lines changed

Some content is hidden

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

94 files changed

+2254
-1371
lines changed

.babelrc

-12
This file was deleted.

.eslintrc.js

+18-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
1+
const path = require('path');
2+
13
module.exports = {
2-
extends: ['plugin:@shopify/esnext', 'plugin:@shopify/jest', 'plugin:@shopify/prettier'],
4+
extends: [
5+
'plugin:@shopify/typescript',
6+
'plugin:@shopify/jest',
7+
'plugin:@shopify/prettier',
8+
],
9+
parser: '@typescript-eslint/parser',
310
env: {
411
browser: true,
512
node: true,
613
},
714
rules: {
8-
'import/no-unresolved': 'off',
9-
'import/no-extraneous-dependencies': 'off',
10-
'class-methods-use-this': 'off',
11-
'line-comment-position': 0,
12-
'lines-around-comment': 'off',
1315
'jest/valid-title': 'off',
1416
},
17+
settings: {
18+
'import/resolver': {
19+
node: {
20+
paths: [
21+
path.resolve(__dirname, 'src'),
22+
path.resolve(__dirname, 'test'),
23+
],
24+
},
25+
},
26+
},
1527
};

.github/workflows/tests.yml renamed to .github/workflows/ci.yml

+6
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,11 @@ jobs:
2525
- name: Lint
2626
run: yarn lint
2727

28+
- name: Library typecheck
29+
run: yarn type-check
30+
31+
- name: Scripts typecheck
32+
run: yarn type-check:scripts
33+
2834
- name: Test
2935
run: yarn test

.prettierrc

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
{
2-
"trailingComma": "all",
3-
"printWidth": 120,
4-
"singleQuote": true,
5-
"bracketSpacing": false,
6-
"arrowParens": "always"
7-
}
1+
"@shopify/prettier-config"

.vscode/launch.json

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
{
2-
"version": "0.2.0",
2+
"version": "1.0.0",
33
"configurations": [
44
{
55
"type": "node",
66
"request": "launch",
77
"name": "Jest Tests",
8-
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
8+
"program": "${workspaceRoot}/node_modules/.bin/jest",
9+
"console": "integratedTerminal",
910
"args": [
10-
"--config",
11-
"config.json",
1211
"-i",
1312
"--watchAll"
1413
],
15-
"internalConsoleOptions": "openOnSessionStart",
16-
"outFiles": [
17-
"${workspaceRoot}/dist/**/*"
18-
],
1914
}
2015
]
2116
}

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
"**/node_modules": true,
1010
"lib": true
1111
},
12+
"[typescript]": {
13+
"editor.formatOnSave": false,
14+
},
1215
"editor.formatOnSave": true,
1316
"editor.codeActionsOnSave": {
1417
"source.fixAll.eslint": true

CODE_OF_CONDUCT.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ orientation.
1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
2222

2323
Examples of unacceptable behavior by participants include:
2424

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
2626
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
3030
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
31+
- Other conduct which could reasonably be considered inappropriate in a
3232
professional setting
3333

3434
## Our Responsibilities

CONTRIBUTING.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ appreciated and encouraged.
77

88
1. [Code of Conduct](#code-of-conduct)
99
2. [How to contribute](#how-to-contribute)
10-
1. [Creating issues](#creating-issues)
11-
2. [Opening pull requests](#opening-pull-requests)
12-
3. [JS Docblocks](#js-docblocks)
13-
4. [How to run locally](#how-to-run-locally)
10+
1. [Creating issues](#creating-issues)
11+
2. [Opening pull requests](#opening-pull-requests)
12+
3. [JS Docblocks](#js-docblocks)
13+
3. [How to run locally](#how-to-run-locally)
1414

1515
## Code of Conduct
1616

config.json

-17
This file was deleted.

0 commit comments

Comments
 (0)