-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(practs): upgrade to declapract-typescript-ehmpathy best practices
- Loading branch information
1 parent
6f06110
commit 7ac460c
Showing
135 changed files
with
33,236 additions
and
19,311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', // Specifies the ESLint parser | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin | ||
'plugin:import/recommended', // specifies good import rules | ||
'airbnb-typescript/base', // uses the airbnb recommended rules | ||
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. | ||
], | ||
parserOptions: { | ||
project: './tsconfig.json', | ||
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features | ||
sourceType: 'module', // Allows for the use of imports | ||
}, | ||
rules: { | ||
'@typescript-eslint/explicit-function-return-type': 'off', // this can be figured out implicitly, and that is better | ||
'sort-imports': 'off', | ||
'import/prefer-default-export': 'off', // default export = bad | ||
'import/no-default-export': 'error', // require named exports - they make it easier to refactor, enforce consistency, and increase constraints | ||
'@typescript-eslint/no-non-null-assertion': 'off', // we use these to help typescript out when we know something it doesnt, and cant easily express that | ||
'import/no-extraneous-dependencies': [ | ||
'error', | ||
{ | ||
devDependencies: [ | ||
'**/*.test.ts', | ||
'**/*.test.integration.ts', | ||
'**/*.test.acceptance.ts', | ||
'acceptance/**/*.ts', | ||
'**/__test_utils__/**/*.ts', | ||
'provision/**/*.ts', | ||
], | ||
}, | ||
], | ||
'@typescript-eslint/no-explicit-any': 'off', // sometimes this is a valid definition | ||
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], | ||
'import/no-cycle': 'off', | ||
'max-classes-per-file': 'off', | ||
'@typescript-eslint/no-use-before-define': 'off', | ||
'@typescript-eslint/no-floating-promises': 'error', | ||
'prefer-destructuring': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'lines-between-class-members': 'off', | ||
'@typescript-eslint/lines-between-class-members': 'off', | ||
'no-return-await': 'off', // this does not help anything and actually leads to bugs if we subsequently wrap the return in a try catch without remembering to _then_ add await | ||
'@typescript-eslint/return-await': 'off', | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: deploy_on_tag | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
test_and_deploy: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # we need all commits to test:commits | ||
|
||
- name: read nvmrc | ||
id: nvmrc | ||
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }} | ||
registry-url: 'https://registry.npmjs.org' | ||
cache: 'npm' | ||
|
||
- name: install | ||
run: npm ci | ||
|
||
- name: tests | ||
run: npm run test | ||
|
||
- name: publish | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.