Skip to content

Commit

Permalink
Refactor (#7)
Browse files Browse the repository at this point in the history
* refactored the source code

* modified lint settings

* added CI for build, lint and test
  • Loading branch information
Jin Igarashi authored Jun 26, 2021
1 parent 2e01105 commit 109be7c
Show file tree
Hide file tree
Showing 12 changed files with 9,462 additions and 241 deletions.
25 changes: 0 additions & 25 deletions .eslintrc.js

This file was deleted.

31 changes: 31 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"airbnb-base"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"class-methods-use-this":"off",
"no-console":"off",
"import/extensions": "off",
"no-unused-vars": "warn"
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".ts"]
}
}
}
}
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: build

on:
push:
branches: [ main ]
paths:
- "src/**"
- "tests/**"

pull_request:
paths:
- "src/**"
- "tests/**"

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- run: npm ci
- name: build
run: |
npm run lint
npm run build
- name: test
run: npm run test
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# terrain-rgb
![](https://github.com/watergis/terrain-rgb/workflows/build/badge.svg)
![](https://github.com/watergis/terrain-rgb/workflows/Node.js%20Package/badge.svg)
![GitHub](https://img.shields.io/github/license/watergis/terrain-rgb)

Expand Down
Loading

0 comments on commit 109be7c

Please sign in to comment.