Skip to content

Commit

Permalink
Update/rewrite in TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
awlayton committed Apr 6, 2022
1 parent 70f575e commit d2c3a60
Show file tree
Hide file tree
Showing 33 changed files with 8,941 additions and 4,285 deletions.
26 changes: 8 additions & 18 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Project wide settings
[**]
end_of_line = lf
insert_final_newline = false
trim_trailing_whitespace = true
[*]
indent_style = space
indent_size = 4
max_line_length = 80

# Markdown nonsense
[**.md]
indent_size = 2

# Go with how NPM indents package.json
[package.json]
indent_size = 2

# Go with how travis indents .travis.yml
[.travis.yml]
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
.test
coverage
130 changes: 130 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
root: true

extends:
- plugin:node/recommended
- plugin:github/recommended
- plugin:promise/recommended
- plugin:regexp/recommended
- plugin:array-func/recommended
- plugin:optimize-regex/recommended
- plugin:import/recommended
- plugin:unicorn/recommended
- plugin:security/recommended
- plugin:sonarjs/recommended
- plugin:ava/recommended
- xo
- prettier

plugins:
- node
- github
- promise
- regexp
- array-func
- optimize-regex
- no-constructor-bind
- import
- unicorn
- security
- no-secrets
- sonarjs
- ava
- notice

parser: '@typescript-eslint/parser'

parserOptions:
ecmaVersion: 2020
project: './tsconfig.eslint.json'

overrides:
- files: '*.ts'
extends:
- plugin:github/typescript
- plugin:import/typescript
- xo-typescript
- prettier
parserOptions:
ecmaVersion: 2020
project:
- './test/tsconfig.json'
- './tsconfig.eslint.json'
rules:
'@typescript-eslint/naming-convention':
[
error,
{ selector: default, format: [camelCase] },
{ selector: objectLiteralProperty, format: null },
{ selector: enumMember, format: [PascalCase] },
{ selector: typeProperty, format: null },

{
selector: variableLike,
format: [camelCase, UPPER_CASE],
leadingUnderscore: allow,
},
{
selector: parameter,
format: [camelCase],
leadingUnderscore: allow,
},

{
selector: memberLike,
modifiers: [private],
format: [camelCase],
leadingUnderscore: require,
},

{ selector: typeLike, format: [PascalCase] },
]
'@typescript-eslint/restrict-template-expressions': off
'@typescript-eslint/no-shadow': warn

rules:
notice/notice:
- error
- template: |
/**
* @license
* Copyright <%= YEAR %> Open Ag Data Alliance
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
onNonMatchingHeader: append
nonMatchingTolerance: 0.7
unicorn/prefer-node-protocol: off
sonarjs/no-duplicate-string: [warn, 5]
sonarjs/cognitive-complexity: warn
eslint-comments/no-unused-disable: off
import/extensions: off
node/no-unpublished-import: off
spaced-comment: [error, always, markers: [/, //]]
filenames/match-regex: off
unicorn/filename-case: off
i18n-text/no-en: off
eslint-comments/no-use: off
no-secrets/no-secrets: error
no-empty-label: off
no-return-await: off
no-warning-comments: off
node/no-missing-import: off
import/no-unresolved: off
unicorn/prefer-spread: off
no-constructor-bind/no-constructor-bind: error
no-constructor-bind/no-constructor-state: error
sort-imports: [warn, { allowSeparatedGroups: true }]
ava/no-ignored-test-files: off
ava/no-import-test-files: off
ava/no-skip-test: warn
ava/no-skip-assert: warn
147 changes: 134 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,36 +1,157 @@
# Use yarn not npm
package.lock

# Mac nonsense
.DS_Store

# vscode stuff
.dccache
.history

# vim/nvim stuff
.nvimlog

# Build output
dist
.test

# Docker overrides
docker-compose.override.yml

# Ignore act stuff
.actrc
act/

# ignore sdk stuff
.vim

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
.coveralls.yml
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage
# (http://gruntjs.com/creating-plugins#storing-task-files)
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Compiled binary addons (http://nodejs.org/api/addons.html)
# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# Commenting this out is preferred by some people, see
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
node_modules
# Dependency directories
node_modules/
jspm_packages/

# Users Environment Variables
.lock-wscript
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# "Compiled" stuff
# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Local yeoman stuff
.yo-rc.json
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/*
!.yarn/releases
!.yarn/plugins
!.yarn/versions
.pnp.*
11 changes: 0 additions & 11 deletions .istanbul.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
dist
.test
coverage
node_modules
yarn-cache
services-available

LICENSE

tags*
.history

**/yarn.lock
**/yarn-error.log
**/.yarn/*
**/.pnp.*

act
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"quoteProps": "consistent",
"overrides": [{ "files": ".yarnrc.yml", "options": { "singleQuote": false } }]
}
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"arcanis.vscode-zipfs",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
Loading

0 comments on commit d2c3a60

Please sign in to comment.