Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library structure #1

Merged
merged 15 commits into from
Nov 25, 2020
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
# editorconfig.org
root = true

# all files
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
max_line_length = 80

[*.{js,ts}]
quote_type = single
curly_bracket_next_line = false

# HTML
[*.html]
quote_type = double
41 changes: 41 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"max-len": [
"warn",
120
lomchik marked this conversation as resolved.
Show resolved Hide resolved
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
]
}
}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*.log
*.tmp
*.tmp.*
.idea
.DS_Store
.cache
node_modules

dist
coverage
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: node_js
node_js: 14.15.1
cache: npm
notifications:
slack:
secure: XcMOhiXe8KGF+l80cUdpdjNQe3xUM00Cj1qOM3Td8BubpwNIm0HzksbY0dQbtREw4vGY6OgA09J9EjbYGqykheNJ8DToy1VhGnC1WB6l1y96MnefHhL3TEKDEp3o67DDEwF9UIQTAzqHg5T57+IbhQ+ceYMJAvuDLCD2y6dTaxzSCt65J4nTprWx2WQ28hmXband0973VQ7Iy/oVFC7FDmOppr1E4E7MsmheBu91Sp1doTq9mD+VdJ6Hn9NxeEBYZq14WJn01w6WkIKDVYYkpzlBWSi6nXK6K4zhahKhFXa33egqnXRnyN3Am8QXqJHvOrjs3sLicTac8PQsIXfCEVDPgjnQRo28TekIACCMpS/hD226HEGJO+67V06LtZhoxk2V+OWyWGNt33pY5YYUtqsfSigJgXoCDUM/mFfEH0CRwVyMctHgu6liVo/l7V/5lgRJGjg86XMVOxiUvX8MkNFg5D8OsLEwq4wy0Mq3kKSsOERAuwbztYwcnLV3pXEXn2+RyW/gXPu3tIpLslHf1kqRcgSWt9RAnCub3CKIRTKYqf4jDi3Y6tX/5Ub1AevfyWr5ibaG/4x40Vka3NTJRvUoEOXWn6+bruPgowivLwehk8CAM6P5O7e8Zb3S1s41k1ZoSqzxQuHXYgGIojgOA9gIByaE4vE7XAkqzoBs3lU=
email: false
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Place your settings in this file to overwrite default and user settings.
{
"editor.tabSize": 2,
lomchik marked this conversation as resolved.
Show resolved Hide resolved
"editor.rulers": [
120
lomchik marked this conversation as resolved.
Show resolved Hide resolved
]
}
15 changes: 15 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Config } from '@jest/types';

const config: Config.InitialOptions = {
coverageThreshold: {
global: {
functions: 90,
lines: 90,
statements: 90,
},
},
preset: 'ts-jest',
testEnvironment: 'jsdom', // TODO: run tests through both 'node' and 'jsdom'
verbose: true
};
export default config;
Loading