Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
IRONM00N committed Jun 19, 2023
1 parent 2167cfb commit 7ac641b
Show file tree
Hide file tree
Showing 8 changed files with 385 additions and 54 deletions.
6 changes: 1 addition & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parserOptions": {
"ecmaVersion": 2022
},
Expand Down
31 changes: 20 additions & 11 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,25 @@ jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Checkout repository
uses: actions/checkout@v3

- name: Install node.js v20
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
env:
CI: true
node-version: 20
cache: "yarn"
cache-dependency-path: yarn.lock

- name: Install dependencies
run: yarn --immutable

- name: ESLint
run: yarn lint

- name: TSC
run: yarn build

- name: Unit Tests
run: yarn test
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist
node_modules
.idea
.vscode
.yarn
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
"devDependencies": {
"@types/ms": "^0.7.31",
"@types/node": "^20.3.1",
"@typescript-eslint/eslint-plugin": "^5.60.0",
"@typescript-eslint/parser": "^5.60.0",
"csv-parse": "^5.4.0",
"eslint": "^8.43.0",
"ms": "^2.1.3",
Expand Down
3 changes: 2 additions & 1 deletion src/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ export const LANGUAGES: Languages = {
for (let i = 0; i < characters.length; i++) {
const character = characters[i];
if (character in replacements) {
characters[i] = replacements[<any>character];
// eslint-disable-next-line @typescript-eslint/no-explicit-any
characters[i] = replacements[character as any];
}
}
return characters.join("");
Expand Down
12 changes: 0 additions & 12 deletions test/.eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion test/humanizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ describe("humanizer", () => {
});

it('can do rounding with the "maxDecimalPoints" option', () => {
var h = humanizer({ maxDecimalPoints: 2 });
const h = humanizer({ maxDecimalPoints: 2 });

strictEqual(h(8123.456789), "8.12 seconds");
h.maxDecimalPoints = 3;
Expand Down
Loading

0 comments on commit 7ac641b

Please sign in to comment.