Skip to content

Commit

Permalink
Merge pull request #96 from josex2r/feature/typescript
Browse files Browse the repository at this point in the history
Feature/typescript
  • Loading branch information
josex2r authored Oct 18, 2022
2 parents 8efdd18 + c5abbd8 commit 4283b26
Show file tree
Hide file tree
Showing 77 changed files with 11,769 additions and 10,277 deletions.
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{yml,yaml}]
insert_final_newline = false

[*.{diff,md}]
trim_trailing_whitespace = false
9 changes: 9 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
dist
commitlint.config.js
gulpfile.js
.eslintrc.js
tests
webpack.config.js
jest.config.js
coverage
53 changes: 46 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,50 @@
module.exports = {
extends: 'standard',
root: true,
env: {
jquery: true,
browser: true
browser: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
project: './tsconfig.json',
},
plugins: ['@typescript-eslint'],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: ['tsconfig.json'],
},
},
},
rules: {
semi: 0,
'no-unused-expressions': 1
}
}
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
},
overrides: [
{
files: ['tests/**/*.ts'],
parserOptions: {
sourceType: 'module',
project: './tsconfig.test.json',
},
env: {
browser: true,
node: true,
mocha: true,
},
globals: {
chai: true,
expect: true,
},
},
],
};
65 changes: 65 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use latest Node.js
uses: actions/setup-node@v3
with:
node-version: 'latest'
cache: 'yarn'

- name: Install dependencies
run: yarn install

- name: Run linters
run: yarn lint

- name: Run tests
run: yarn test:cov

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v2

- name: Release dry-run
run: yarn release:test
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

release:
if: github.ref == 'refs/heads/master'
needs: [test]
runs-on: ubuntu-latest
name: Release
steps:
- uses: actions/checkout@v3

- name: Use latest Node.js
uses: actions/setup-node@v3
with:
node-version: 'latest'
cache: 'yarn'

- name: Install dependencies
run: yarn install

- name: Configure CI Git User
run: |
git config --global user.email [email protected]
git config --global user.name josex2r
- name: Release
run: yarn release
env:
HUSKY: 0
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
tags.lock
tags.temp
tags
coverage
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx commitlint --edit
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn test
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"endOfLine": "lf",
"printWidth": 100,
"quoteProps": "consistent",
"singleQuote": true,
"trailingComma": "all"
}
10 changes: 10 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git",
"@semantic-release/github"
]
}
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 4283b26

Please sign in to comment.