Skip to content

Commit

Permalink
TypeScript version
Browse files Browse the repository at this point in the history
  • Loading branch information
corrideat committed May 18, 2023
0 parents commit bd4e926
Show file tree
Hide file tree
Showing 30 changed files with 8,810 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Dockerfile
.git
**/.gitignore
**/node_modules
**/obj
**/bin
**/dist
**/build
typings/schema
**/*.schema.d.ts
**/*.proto.d.ts
**/*.proto.js
11 changes: 11 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# don't ever lint node_modules
node_modules
# don't lint build output (make sure it's set to your correct build folder name)
dist
build
# don't lint nyc coverage output
coverage
package-lock.json
*.proto.js
*.proto.d.ts
*.schema.d.ts
67 changes: 67 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/* Copyright © 2023 Exact Realty Limited. All rights reserved.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/

module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
env: { node: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended',
],
rules: {
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'typeParameter',
format: ['PascalCase'],
prefix: ['T'],
},
{
selector: 'interface',
format: ['PascalCase'],
prefix: ['I'],
},
{
selector: 'enumMember',
format: ['UPPER_CASE'],
trailingUnderscore: 'require',
},
{
selector: 'variable',
modifiers: ['exported'],
format: ['camelCase', 'PascalCase'],
trailingUnderscore: 'require',
},
{
selector: 'typeProperty',
format: ['camelCase'],
trailingUnderscore: 'require',
},
{
selector: 'method',
format: ['camelCase'],
trailingUnderscore: 'require',
},
],
},
overrides: [
{
files: ['*.js', '*.schema.json', 'package.json', '*.d.ts'],
rules: {
'@typescript-eslint/naming-convention': 'off',
},
},
],
};
22 changes: 22 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 19
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
Loading

0 comments on commit bd4e926

Please sign in to comment.