-
Notifications
You must be signed in to change notification settings - Fork 1
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 latest best practices per declapract-typescri…
…pt-ehmpathy
- Loading branch information
1 parent
f756834
commit be703c1
Showing
60 changed files
with
22,530 additions
and
15,226 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,10 @@ | ||
ignores: | ||
- depcheck | ||
- declapract | ||
- declapract-typescript-ehmpathy | ||
- '@commitlint/config-conventional' | ||
- '@trivago/prettier-plugin-sort-imports' | ||
- '@tsconfig/node-lts-strictest' | ||
- core-js | ||
- ts-jest | ||
- husky |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: pr-release-on-main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
with: | ||
token: ${{ secrets.RELEASE_PLEASE_GITHUB_TOKEN }} | ||
release-type: node | ||
pull-request-title-pattern: 'chore(release): v${version} 🎉' | ||
changelog-path: changelog.md |
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,39 @@ | ||
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 | ||
env: | ||
FORCE_COLOR: true # ensure colors are saved in jest snapshots, to be consistent with local development | ||
|
||
- name: publish | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.