Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,40 @@ permissions:

jobs:
build:
name: Build and Test
name: Build and Test (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ['20.19.0', '22.13.0', 'lts/*']
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Install Node
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: lts/*
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: package-lock.json

- name: Install dependencies
run: npm ci

- name: Run ESlint
- name: Run Oxlint
run: npm run lint

- name: Run Build
- name: Run TypeScript typecheck
run: npm run typecheck

- name: Build package
run: npm run build

- name: Run Tests
- name: Run Vitest with coverage
run: npm run test:ci

- name: Upload coverage reports to Codecov
if: matrix.node-version == 'lts/*'
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
166 changes: 166 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["eslint", "typescript", "oxc", "vitest"],
"categories": {
"correctness": "error"
},
"jsPlugins": ["eslint-plugin-perfectionist", "eslint-plugin-prettier"],
"env": {
"node": true,
"vitest": true
},
"ignorePatterns": ["node_modules/", "**/*.js", "**/*.d.ts"],
"options": {
"typeAware": true
},
"rules": {
"typescript/no-misused-promises": [
"error",
{
"checksVoidReturn": false,
"checksConditionals": false
}
],
"perfectionist/sort-classes": "off",
"perfectionist/sort-interfaces": "off",
"perfectionist/sort-modules": "off",
"perfectionist/sort-named-imports": "off",
"perfectionist/sort-objects": "off",
"perfectionist/sort-object-types": "off",
"perfectionist/sort-switch-case": "off",
"perfectionist/sort-union-types": "off",
"eslint/constructor-super": "error",
"eslint/for-direction": "error",
"eslint/getter-return": "error",
"eslint/no-async-promise-executor": "error",
"eslint/no-case-declarations": "error",
"eslint/no-class-assign": "error",
"eslint/no-compare-neg-zero": "error",
"eslint/no-cond-assign": "error",
"eslint/no-const-assign": "error",
"eslint/no-constant-binary-expression": "error",
"eslint/no-constant-condition": "error",
"eslint/no-control-regex": "error",
"eslint/no-debugger": "error",
"eslint/no-delete-var": "error",
"eslint/no-dupe-class-members": "error",
"eslint/no-dupe-else-if": "error",
"eslint/no-dupe-keys": "error",
"eslint/no-duplicate-case": "error",
"eslint/no-empty": "error",
"eslint/no-empty-character-class": "error",
"eslint/no-empty-pattern": "error",
"eslint/no-empty-static-block": "error",
"eslint/no-ex-assign": "error",
"eslint/no-extra-boolean-cast": "error",
"eslint/no-fallthrough": "error",
"eslint/no-func-assign": "error",
"eslint/no-global-assign": "error",
"eslint/no-import-assign": "error",
"eslint/no-invalid-regexp": "error",
"eslint/no-irregular-whitespace": "error",
"eslint/no-loss-of-precision": "error",
"eslint/no-misleading-character-class": "error",
"eslint/no-new-native-nonconstructor": "error",
"eslint/no-nonoctal-decimal-escape": "error",
"eslint/no-obj-calls": "error",
"eslint/no-prototype-builtins": "error",
"eslint/no-redeclare": "error",
"eslint/no-regex-spaces": "error",
"eslint/no-self-assign": "error",
"eslint/no-setter-return": "error",
"eslint/no-shadow-restricted-names": "error",
"eslint/no-sparse-arrays": "error",
"eslint/no-this-before-super": "error",
"eslint/no-unassigned-vars": "error",
"eslint/no-undef": "error",
"eslint/no-unexpected-multiline": "error",
"eslint/no-unreachable": "error",
"eslint/no-unsafe-finally": "error",
"eslint/no-unsafe-negation": "error",
"eslint/no-unsafe-optional-chaining": "error",
"eslint/no-unused-labels": "error",
"eslint/no-unused-private-class-members": "error",
"eslint/no-useless-assignment": "error",
"eslint/no-useless-backreference": "error",
"eslint/no-useless-catch": "error",
"eslint/no-useless-escape": "error",
"eslint/no-with": "error",
"eslint/preserve-caught-error": "error",
"eslint/require-yield": "error",
"eslint/use-isnan": "error",
"eslint/valid-typeof": "error",
"typescript/ban-ts-comment": "error",
"typescript/await-thenable": "error",
"typescript/no-array-delete": "error",
"typescript/no-array-constructor": "error",
"typescript/no-duplicate-enum-values": "error",
"typescript/no-duplicate-type-constituents": "error",
"typescript/no-empty-object-type": "error",
"typescript/no-extra-non-null-assertion": "error",
"typescript/no-floating-promises": "error",
"typescript/no-for-in-array": "error",
"typescript/no-implied-eval": "error",
"typescript/no-misused-new": "error",
"typescript/no-namespace": "error",
"typescript/no-non-null-asserted-optional-chain": "error",
"typescript/no-redundant-type-constituents": "error",
"typescript/no-this-alias": "error",
"typescript/no-unnecessary-type-assertion": "error",
"typescript/no-unnecessary-type-constraint": "error",
"typescript/no-unsafe-declaration-merging": "error",
"typescript/no-unsafe-enum-comparison": "error",
"typescript/no-unsafe-unary-minus": "error",
"typescript/no-wrapper-object-types": "error",
"typescript/prefer-as-const": "error",
"typescript/prefer-namespace-keyword": "error",
"typescript/restrict-plus-operands": "error",
"typescript/restrict-template-expressions": "error",
"typescript/triple-slash-reference": "error",
"eslint/no-var": "error",
"eslint/prefer-const": "error",
"eslint/prefer-rest-params": "error",
"eslint/prefer-spread": "error",
"perfectionist/sort-variable-declarations": ["error", { "type": "alphabetical", "order": "asc" }],
"perfectionist/sort-intersection-types": ["error", { "type": "alphabetical", "order": "asc" }],
"perfectionist/sort-import-attributes": ["error", { "type": "alphabetical", "order": "asc" }],
"perfectionist/sort-export-attributes": ["error", { "type": "alphabetical", "order": "asc" }],
"perfectionist/sort-heritage-clauses": ["error", { "type": "alphabetical", "order": "asc" }],
"perfectionist/sort-array-includes": ["error", { "type": "alphabetical", "order": "asc" }],
"perfectionist/sort-named-exports": ["error", { "type": "alphabetical", "order": "asc" }],
"perfectionist/sort-decorators": ["error", { "type": "alphabetical", "order": "asc" }],
"perfectionist/sort-jsx-props": ["error", { "type": "alphabetical", "order": "asc" }],
"perfectionist/sort-imports": [
"error",
{
"type": "line-length",
"order": "desc",
"ignoreCase": true,
"specialCharacters": "keep",
"internalPattern": ["^~/.+"],
"partitionByComment": false,
"partitionByNewLine": false,
"newlinesBetween": 1,
"tsconfig": {
"rootDir": "."
},
"groups": [
"type-import",
["builtin", "value-external"],
"type-internal",
"value-internal",
{ "newlinesBetween": 0 },
["type-parent", "type-sibling", "type-index"],
"ts-equals-import",
"unknown"
],
"environment": "node"
}
],
"perfectionist/sort-exports": ["error", { "type": "alphabetical", "order": "asc" }],
"perfectionist/sort-enums": ["error", { "type": "alphabetical", "order": "asc" }],
"perfectionist/sort-sets": ["error", { "type": "alphabetical", "order": "asc" }],
"perfectionist/sort-maps": ["error", { "type": "alphabetical", "order": "asc" }],
"prettier/prettier": "error"
}
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ This is a template for creating a new open source project in NestJS.

## Features
* [TypeScript](https://www.typescriptlang.org/)
* [Jest](https://jestjs.io/)
* [ESLint](https://eslint.org/)
* [Vitest](https://vitest.dev/)
* [Oxlint](https://oxc.rs/docs/guide/usage/linter.html)
* [Prettier](https://prettier.io/)
* GitHub Actions
* [Dependabot](https://dependabot.com/)
Expand Down
94 changes: 0 additions & 94 deletions eslint.config.mjs

This file was deleted.

16 changes: 0 additions & 16 deletions jest.config.json

This file was deleted.

Loading
Loading