Skip to content

Commit

Permalink
Merge ecb5755 into 92598cd
Browse files Browse the repository at this point in the history
  • Loading branch information
homer0 committed Dec 28, 2022
2 parents 92598cd + ecb5755 commit 8d41251
Show file tree
Hide file tree
Showing 187 changed files with 22,587 additions and 22,271 deletions.
13 changes: 0 additions & 13 deletions .eslintrc

This file was deleted.

6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const preset = require('@homer0/eslint-plugin/presets/typescript');

module.exports = preset({
rootDir: __dirname,
configs: ['node-typescript-with-prettier'],
});
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
- name: Install dependencies
env:
HUSKY_SKIP_INSTALL: 1
run: yarn --frozen-lockfile
- run: yarn semantic-release
run: npm ci
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Generate documentation
run: yarn docs
run: npm run docs
- name: Deploy documentation
uses: JamesIves/github-pages-deploy-action@4.1.1
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '12', '14' ]
node: [ '14', '16' ]
name: Run jest and ESLint (Node ${{ matrix.node }})
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: yarn --frozen-lockfile
- run: yarn lint:all
- run: yarn test
- run: npm ci
- run: npm run lint:all
- run: npm test
- name: Coveralls
if: ${{ matrix.node == '12' }}
if: ${{ matrix.node == '14' }}
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 1 addition & 5 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

if hash yarn 2>/dev/null; then
yarn commitlint --edit $1
else
npx commitlint --edit $1
fi
npx commitlint --edit $1
6 changes: 1 addition & 5 deletions .husky/post-merge
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

if hash yarn 2>/dev/null; then
yarn
else
npm install
fi
npm install

6 changes: 1 addition & 5 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

if hash yarn 2>/dev/null; then
yarn run lint
else
npm run lint
fi
npm run lint
6 changes: 1 addition & 5 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

if hash yarn 2>/dev/null; then
yarn test
else
npm test
fi
npm run types:check && npm test
24 changes: 20 additions & 4 deletions .jestrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
const path = require('path');
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tests/tsconfig');

/**
* @type {import('ts-jest').InitialOptionsTsJest}
*/
module.exports = {
automock: true,
preset: 'ts-jest',
automock: false,
collectCoverage: true,
testPathIgnorePatterns: ['/node_modules/', '/utils/scripts/', '/mocks/'],
unmockedModulePathPatterns: ['/node_modules/', '/mocks/'],
coveragePathIgnorePatterns: ['/mocks/'],
testPathIgnorePatterns: ['/utils/scripts/', 'tests/mocks/'],
unmockedModulePathPatterns: ['/node_modules/', 'src/utils', 'tests/mocks/'],
coveragePathIgnorePatterns: ['/utils/scripts/', 'tests/mocks/'],
testEnvironment: 'node',
globals: {
'ts-jest': {
tsconfig: path.join(__dirname, 'tests', 'tsconfig.json'),
},
},
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/tests',
}),
};
54 changes: 0 additions & 54 deletions .jsdoc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12
14
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ module.exports = {

> **Important:** HTTPS MUST BE enabled in order to use HTTP/2.
Under the hood, Jimpex uses [Spdy](https://yarnpkg.com/package/spdy) for the HTTP/2 support, and Spdy has custom options you can send in order to define how it will work; you can send options to Spdy by adding a `spdy` key inside the `http2` object:
Under the hood, Jimpex uses [Spdy](https://npmjs.com/package/spdy) for the HTTP/2 support, and Spdy has custom options you can send in order to define how it will work; you can send options to Spdy by adding a `spdy` key inside the `http2` object:

```js
{
Expand Down Expand Up @@ -701,7 +701,7 @@ The service also implements a few other services from the [wootils](https://gith
## Development
### NPM/Yarn Tasks
### NPM Tasks
| Task | Description |
|------------|--------------------------------------|
Expand All @@ -713,7 +713,7 @@ The service also implements a few other services from the [wootils](https://gith
### Repository hooks
I use [`husky`](https://yarnpkg.com/package/husky) to automatically install the repository hooks so the code will be tested and linted before any commit, and the dependencies updated after every merge.
I use [`husky`](https://npmjs.com/package/husky) to automatically install the repository hooks so the code will be tested and linted before any commit, and the dependencies updated after every merge.
#### Commits convention
Expand All @@ -723,7 +723,7 @@ The configuration is on the `commitlint` property of the `package.json`.
### Releases
I use [`semantic-release`](https://yarnpkg.com/package/semantic-release) and a GitHub action to automatically release on NPM everything that gets merged to main.
I use [`semantic-release`](https://npmjs.com/package/semantic-release) and a GitHub action to automatically release on NPM everything that gets merged to main.
The configuration for `semantic-release` is on `./releaserc` and the workflow for the release is on `./.github/workflow/release.yml`.
Expand All @@ -735,9 +735,9 @@ The configuration file is on `./.jestrc.js`, the tests are on `./tests` and the
### Code linting and formatting
For linting, I use [ESlint](https://eslint.org) with [my own custom configuration](https://yarnpkg.com/package/@homer0/eslint-plugin); there are two configuration files, `./.eslintrc` for the source and the tooling, and `./tests/.eslintrc`, and there's also a `./.eslintignore` to exclude some files.
For linting, I use [ESlint](https://eslint.org) with [my own custom configuration](https://npmjs.com/package/@homer0/eslint-plugin); there are two configuration files, `./.eslintrc` for the source and the tooling, and `./tests/.eslintrc`, and there's also a `./.eslintignore` to exclude some files.
And for formatting, I use [Prettier](https://prettier.io) with [my JSDoc plugin](https://yarnpkg.com/package/@homer0/prettier-plugin-jsdoc) and [my own custom configuration](https://yarnpkg.com/package/@homer0/prettier-config). The configuration file is `./.prettierrc`.
And for formatting, I use [Prettier](https://prettier.io) with [my JSDoc plugin](https://npmjs.com/package/@homer0/prettier-plugin-jsdoc) and [my own custom configuration](https://npmjs.com/package/@homer0/prettier-config). The configuration file is `./.prettierrc`.
The script that runs them is `./utils/scripts/lint`; the script `lint-all` only runs ESLint, and runs it for the entire project.
Expand All @@ -749,7 +749,7 @@ The configuration file is `./.jsdoc.js` and the script that runs it is on `./uti
### To-Dos
I use `@todo` comments to write all the pending improvements and fixes, and [Leasot](https://yarnpkg.com/en/package/leasot) to generate a report. The script that runs it is on `./utils/scripts/todo`.
I use `@todo` comments to write all the pending improvements and fixes, and [Leasot](https://npmjs.com/package/leasot) to generate a report. The script that runs it is on `./utils/scripts/todo`.
## Motivation/Introduction
Expand Down

0 comments on commit 8d41251

Please sign in to comment.