Skip to content

Commit

Permalink
Typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
tsov committed Sep 22, 2023
1 parent cffd3ef commit b3e34bc
Show file tree
Hide file tree
Showing 94 changed files with 2,254 additions and 1,371 deletions.
12 changes: 0 additions & 12 deletions .babelrc

This file was deleted.

24 changes: 18 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
const path = require('path');

module.exports = {
extends: ['plugin:@shopify/esnext', 'plugin:@shopify/jest', 'plugin:@shopify/prettier'],
extends: [
'plugin:@shopify/typescript',
'plugin:@shopify/jest',
'plugin:@shopify/prettier',
],
parser: '@typescript-eslint/parser',
env: {
browser: true,
node: true,
},
rules: {
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',
'class-methods-use-this': 'off',
'line-comment-position': 0,
'lines-around-comment': 'off',
'jest/valid-title': 'off',
},
settings: {
'import/resolver': {
node: {
paths: [
path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'test'),
],
},
},
},
};
6 changes: 6 additions & 0 deletions .github/workflows/tests.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@ jobs:
- name: Lint
run: yarn lint

- name: Library typecheck
run: yarn type-check

- name: Scripts typecheck
run: yarn type-check:scripts

- name: Test
run: yarn test
8 changes: 1 addition & 7 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
{
"trailingComma": "all",
"printWidth": 120,
"singleQuote": true,
"bracketSpacing": false,
"arrowParens": "always"
}
"@shopify/prettier-config"
11 changes: 3 additions & 8 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
{
"version": "0.2.0",
"version": "1.0.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest Tests",
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
"program": "${workspaceRoot}/node_modules/.bin/jest",
"console": "integratedTerminal",
"args": [
"--config",
"config.json",
"-i",
"--watchAll"
],
"internalConsoleOptions": "openOnSessionStart",
"outFiles": [
"${workspaceRoot}/dist/**/*"
],
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"**/node_modules": true,
"lib": true
},
"[typescript]": {
"editor.formatOnSave": false,
},
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
Expand Down
20 changes: 10 additions & 10 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ orientation.
Examples of behavior that contributes to creating a positive environment
include:

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

Examples of unacceptable behavior by participants include:

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

## Our Responsibilities
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ appreciated and encouraged.

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

## Code of Conduct

Expand Down
17 changes: 0 additions & 17 deletions config.json

This file was deleted.

Loading

0 comments on commit b3e34bc

Please sign in to comment.