Skip to content

Commit

Permalink
Upgrade to v9 test (#418)
Browse files Browse the repository at this point in the history
* Upgrade to v9 test

* Finish

* Update lint-pr.yml

---------

Co-authored-by: Geovanni Perez <[email protected]>
  • Loading branch information
oscarfgq and geoperez authored Apr 24, 2024
1 parent 6084371 commit 1ed9aed
Show file tree
Hide file tree
Showing 9 changed files with 545 additions and 734 deletions.
18 changes: 0 additions & 18 deletions .eslintrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ on:

jobs:
build:
uses: unosquare/bump-npm-version/.github/workflows/lint.yml@master
uses: unosquare/bump-npm-version/.github/workflows/lint-pnpm.yml@master
secrets:
github-token: ${{ secrets.GPR_ACCESS_TOKEN }}
github-token: ${{ secrets.GPR_ACCESS_TOKEN }}
17 changes: 17 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
{
files: ['src/*.ts'],
rules: {
'@typescript-eslint/consistent-type-definitions': 'off',
'arrow-body-style': ['error', 'as-needed'],
},
},
);
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "3.94.0",
"description": "JS/TS common used functions, zero dependencies",
"main": "dist/index.js",
"type": "module",
"scripts": {
"test": "jest --runInBand",
"cest": "jest --collectCoverage --runInBand",
Expand Down Expand Up @@ -69,15 +70,13 @@
},
"homepage": "https://github.com/unosquare/uno-js#readme",
"devDependencies": {
"@eslint/js": "^9.1.1",
"@types/jest": "^29.5.12",
"@typescript-eslint/eslint-plugin": "^7.7.0",
"eslint": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-config-prettier": "^9.1.0",
"eslint": "^9.1.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"prettier": "^3.2.5",
"ts-jest": "^29.1.2",
"typescript": "^5.4.5"
"typescript": "^5.4.5",
"typescript-eslint": "^7.7.1"
}
}
1,222 changes: 518 additions & 704 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/SimpleObservable.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default class {
private readonly observers: Array<(change?: string) => void> = [];
private readonly observers: ((change?: string) => void)[] = [];

public subscribe(observer: (change?: string) => void): () => void {
this.observers.push(observer);
Expand Down
2 changes: 1 addition & 1 deletion src/createCsv.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type csvRow = string | Array<string>;
type csvRow = string | string[];

const escapeValuesWithQuotes = (str: string): string =>
str.match(/\$-?(\d{1,3},+)?(\d{1,3},\d{3}(\.\d)*)/g) ? str.replace(/,\$/g, '","$') : str.replace(/,/g, '","');
Expand Down
1 change: 0 additions & 1 deletion src/debounce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export type Procedure = (...args: unknown[]) => void;
export function debounce<F extends Procedure>(func: F, waitMilliseconds = 500): F {
let timeoutId: number | undefined;

// tslint:disable-next-line: only-arrow-functions
return function (t: unknown, ...args: unknown[]) {
const context = t;

Expand Down
2 changes: 1 addition & 1 deletion src/trimText.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default (text: string | Array<string>) =>
export default (text: string | string[]) =>
text.constructor === Array
? text
.map((x: string, i: number) => (i === 0 ? x : ` ${x}`))
Expand Down

0 comments on commit 1ed9aed

Please sign in to comment.