Skip to content

Commit 8fb7c99

Browse files
Merge pull request #229 from wimpyprogrammer/feature/scope-test-workflows
Upgrade to Yarn Modern
2 parents 7a58730 + 0149898 commit 8fb7c99

File tree

16 files changed

+81
-51
lines changed

16 files changed

+81
-51
lines changed

.eslintrc.json

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2+
"root": true,
23
"parser": "@typescript-eslint/parser",
34
"extends": [
45
"airbnb-base",
5-
"plugin:jest/recommended",
66
"plugin:@typescript-eslint/eslint-recommended",
77
"plugin:@typescript-eslint/recommended",
88
"prettier"
@@ -11,47 +11,25 @@
1111
"ecmaVersion": 2018,
1212
"project": ["./**/tsconfig.json", "./**/tsconfig.test.json"]
1313
},
14+
"ignorePatterns": ["coverage/", "lib/"],
1415
"rules": {
1516
"import/extensions": [
1617
"error",
1718
{
1819
"ts": "never"
1920
}
2021
],
21-
"import/no-cycle": "off",
22-
"import/no-extraneous-dependencies": [
23-
"error",
24-
{
25-
"devDependencies": ["**/*.spec.{js,ts}", "**/*.config.js"]
26-
}
27-
],
28-
"import/no-unresolved": [
29-
"error",
30-
{
31-
"ignore": [
32-
"history",
33-
"lodash",
34-
// Workaround for alexgorbatchev/eslint-import-resolver-typescript#17
35-
"regexp-tree/ast",
36-
"RegexColorizer"
37-
]
38-
}
39-
],
4022
"import/prefer-default-export": "off",
41-
"no-else-return": "off",
4223
"no-plusplus": "off",
43-
// This rule excludes too many escape sequences we need, like \p
44-
"no-useless-escape": "off",
4524
// Allow ForOfStatement, preserve the rest of Airbnb's restrictions
4625
"no-restricted-syntax": [
4726
"error",
4827
"ForInStatement",
4928
"LabeledStatement",
5029
"WithStatement"
51-
],
52-
"@typescript-eslint/explicit-function-return-type": "off",
53-
"@typescript-eslint/explicit-module-boundary-types": "off"
30+
]
5431
},
32+
"reportUnusedDisableDirectives": true,
5533
"settings": {
5634
"import/parsers": {
5735
"@typescript-eslint/parser": [".ts"]

.github/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../packages/regex-to-strings/README.md
1+
../packages/regex-to-strings/README.md

.github/workflows/tests.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,33 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
node-version: [18.x]
22-
require-successful-testpack: [true]
2322
include:
2423
- node-version: 20.x
25-
require-successful-testpack: false
2624
- node-version: lts/*
27-
require-successful-testpack: false
2825

2926
steps:
3027
- name: Checkout repository
3128
uses: actions/checkout@v5
3229
with:
3330
fetch-depth: '2'
3431

32+
- name: Enable Corepack
33+
run: corepack enable
34+
3535
- name: Test on Node ${{ matrix.node-version }}
3636
uses: actions/setup-node@v4
3737
with:
3838
node-version: ${{ matrix.node-version }}
3939

40-
- run: yarn
40+
- run: YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install
4141
- run: npx prettier --check .
42+
working-directory: ./
4243
- run: yarn run build
4344
- run: yarn run lint
4445
- run: yarn run test
4546

4647
- run: npx testpack-cli --keep=@types/*,ts-jest,typescript jest.config.js tsconfig.test.json src/e2e.spec.ts
4748
working-directory: ./packages/regex-to-strings
48-
# Workaround for #66
49-
continue-on-error: ${{ !matrix.require-successful-testpack }}
5049

5150
- name: Upload test coverage report to Codecov
5251
uses: codecov/codecov-action@v5.5.0

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.pnp.cjs
2+
.pnp.loader.mjs
13
package-lock.json
24
package.json
35

demo/.eslintrc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"rules": {
3+
"import/no-extraneous-dependencies": [
4+
"error",
5+
{
6+
"devDependencies": ["**/*.config.js"]
7+
}
8+
],
9+
"import/no-unresolved": [
10+
"error",
11+
{
12+
"ignore": ["history", "lodash", "RegexColorizer"]
13+
}
14+
]
15+
}
16+
}

demo/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />

demo/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
"private": true,
55
"scripts": {
66
"build": "wp --config webpack.config.js",
7+
"lint": "tsc -b ./tsconfig.lint.json && eslint .",
78
"test": "exit 0"
89
},
910
"devDependencies": {
1011
"@types/lodash": "^4.14.140",
12+
"@types/node": "^24.8.1",
1113
"clean-webpack-plugin": "^4.0.0",
1214
"css-loader": "^7.1.1",
1315
"node-sass": "^9.0.0",

demo/src/utils/auto-expand-field.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ type anyFn = (...args: unknown[]) => void;
1010
function debounce<F extends anyFn>(func: F, wait: number): F {
1111
let timeoutID: number;
1212

13-
return (function debounced(this: any, ...args: any[]) {
13+
return function debounced(this: any, ...args: any[]) {
1414
clearTimeout(timeoutID);
1515
timeoutID = window.setTimeout(() => func.apply(this, args), wait);
16-
} as any) as F;
16+
} as any as F;
1717
}
1818
/* eslint-enable @typescript-eslint/no-explicit-any */
1919

demo/src/worker/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function takeNIterations(
3131
}
3232

3333
// eslint-disable-next-line no-restricted-globals
34-
const ctx: Worker = (self as unknown) as Worker;
34+
const ctx: Worker = self as unknown as Worker;
3535

3636
function* processRequest(
3737
message: MessageEvent

0 commit comments

Comments
 (0)