Skip to content

Commit

Permalink
Merge branch 'typescript'
Browse files Browse the repository at this point in the history
  • Loading branch information
enniel committed Jul 27, 2022
2 parents 629f287 + d14eac3 commit 83093b7
Show file tree
Hide file tree
Showing 51 changed files with 4,661 additions and 547 deletions.
13 changes: 13 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"presets": [
"@babel/typescript",
[
"@babel/env",
{
"exclude": ["transform-async-to-generator", "transform-regenerator"],
"modules": false,
"loose": true
}
]
]
}
15 changes: 0 additions & 15 deletions .babelrc.js

This file was deleted.

7 changes: 4 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
es/*.js
lib/*.js
dist/*.js
es/**
lib/**
dist/**
geojson-validation.d.ts
214 changes: 0 additions & 214 deletions .eslintrc

This file was deleted.

44 changes: 44 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
const typescriptConfig = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
project: './tsconfig.json',
},
extends: [
'airbnb-typescript/base',
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts'],
},
'import/resolver': {
// use <root>/tsconfig.json
typescript: {},
},
},
};

module.exports = {
root: true,
extends: [
'airbnb-base',
],
rules: {
'import/prefer-default-export': 'off',
},
overrides: [
{
...typescriptConfig,
files: ['src/**/*.ts', 'tests/*.ts'],
},
{
...typescriptConfig,
files: ['demo/*.ts'],
rules: {
...typescriptConfig.rules,
'no-console': 'off',
'import/no-extraneous-dependencies': 'off',
},
},
],
};
30 changes: 30 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Tests

on: [push, pull_request]

jobs:
build:
name: Test Suite
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Check types
run: yarn check:types

- name: Lint code
run: yarn lint

- name: Run test suite
run: yarn test
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
.DS_Store
node_modules
npm-debug.log
npm-error.log
package-lock.json
yarn-debug.log
yarn-error.log
yarn.lock
dist
es
lib
types
coverage
*.tgz
19 changes: 14 additions & 5 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
.github
coverage
demo
node_modules
src
tests
.babelrc.js
.eslintignore
.eslintrc.js
.gitignore
.npmignore
lefthook.yml
rollup.config.js
tsconfig.demo.json
tsconfig.json
package-lock.json
npm-debug.log
npm-error.log
package-lock.json
yarn-debug.log
yarn-error.log
yarn.lock
.editorconfig
dist
es
lib
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017-present Evgenij Razumov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 83093b7

Please sign in to comment.