Skip to content

Commit f851f5f

Browse files
authored
update deps && use only js (important for students) (#68)
* update deps && use only js (important for students) * fix cov
1 parent 1bcece3 commit f851f5f

File tree

12 files changed

+5493
-4517
lines changed

12 files changed

+5493
-4517
lines changed

.github/workflows/nodejs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
strategy:
1919
# Node versions list
2020
matrix:
21-
node-version: [20.x]
21+
node-version: [20.x, 22.x, 24.x]
2222

2323
steps:
2424
# Check-out repository under GitHub workspace
2525
# https://github.com/actions/checkout
26-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v5
2727
# Step's name
2828
- name: Use Node.js ${{ matrix.node-version }}
2929
# Configures the node version used on GitHub-hosted runners

.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
; node-options=--no-warnings --experimental-vm-modules
1+
node-options=--no-warnings --experimental-vm-modules

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ test-coverage:
1919
lint:
2020
npx eslint .
2121

22+
lint-fix:
23+
npx eslint . --fix
24+
2225
publish:
2326
npx release-it
2427

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,3 @@ make test-coverage
3333
[![Hexlet Ltd. logo](https://raw.githubusercontent.com/Hexlet/assets/master/images/hexlet_logo128.png)](https://hexlet.io/?utm_source=github&utm_medium=link&utm_campaign=nodejs-package)
3434

3535
This repository is created and maintained by the team and the community of Hexlet, an educational project. [Read more about Hexlet](https://hexlet.io/?utm_source=github&utm_medium=link&utm_campaign=nodejs-package).
36-
37-
See most active contributors on [hexlet-friends](https://friends.hexlet.io/).

__tests__/half.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @ts-check
22

3-
import { expect, test } from 'vitest'
3+
import { expect, test } from '@jest/globals'
44
import half from '../index.js'
55

66
test('half', () => {

eslint.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import { defineConfig } from 'eslint/config'
4+
import stylistic from '@stylistic/eslint-plugin'
5+
6+
export default defineConfig([
7+
stylistic.configs.recommended,
8+
{
9+
files: ['**/*.{js,mjs,cjs}'],
10+
plugins: { js },
11+
extends: ['js/recommended'],
12+
languageOptions: { globals: globals.node },
13+
},
14+
])

eslint.config.ts

Lines changed: 0 additions & 32 deletions
This file was deleted.

jest.config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/** @type {import('jest').Config} */
2+
export default {
3+
testEnvironment: 'node',
4+
// Тестовые файлы
5+
testMatch: ['**/__tests__/**/*.test.js'],
6+
// Генерация покрытия кода
7+
collectCoverage: false,
8+
coverageDirectory: 'coverage', // папка для отчётов
9+
coverageReporters: ['json', 'lcov', 'text', 'clover'],
10+
11+
// Какие файлы включать в покрытие
12+
collectCoverageFrom: [
13+
'src/**/*.js',
14+
],
15+
transform: {},
16+
}

0 commit comments

Comments
 (0)