Skip to content

Commit

Permalink
Merge pull request #8 from hammzj/dev/v2-ts
Browse files Browse the repository at this point in the history
version 2: typescript conversion
  • Loading branch information
hammzj authored Apr 12, 2024
2 parents 7d2849e + a0f543d commit 01317b3
Show file tree
Hide file tree
Showing 26 changed files with 1,893 additions and 1,326 deletions.
36 changes: 0 additions & 36 deletions .eslintrc.js

This file was deleted.

65 changes: 65 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"ecmaFeatures": {
"modules": true,
"spread": true,
"restParams": true
},
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:mocha/recommended",
"plugin:chai-friendly/recommended"
],
"globals": {
"chai": "readonly",
"Cypress": "readonly",
"cy": "readonly",
"expect": "readonly",
"before": "readonly",
"beforeEach": "readonly",
"after": "readonly",
"afterEach": "readonly"
},
"ignorePatterns": [
"build",
"cypress",
"dist",
"node_modules",
"**/*.js",
"**/*.jsx",
"tests/example_website/**/*"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"chai-friendly",
"mocha"
],
"rules": {
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/default-param-last": "error",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/consistent-generic-constructors": [
"error",
"type-annotation"
],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/ban-ts-comment": "off",
"no-console": "off",
"no-case-declarations": "warn",
"no-prototype-builtins": "off",
"no-extra-semi": "off"
}
}
19 changes: 19 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@ on:
pull_request:

jobs:
tsc:
name: Check TypeScript
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18.x ]

steps:
- name: Checkout
uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: |
yarn install
yarn run dev:tsc
lint:
name: Run eslint
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"arrowParens": "always",
"bracketSameLine": true,
"bracketSpacing": true,
"experimentalTernaries": true,
"embeddedLanguageFormatting": "auto",
"htmlWhitespaceSensitivity": "css",
"jsxSingleQuote": true,
Expand Down
Loading

0 comments on commit 01317b3

Please sign in to comment.