Skip to content

Commit 54b074d

Browse files
authored
Merge branch 'master' into task/1223-mutation-observer-observe-options-validation
2 parents 96b5ac4 + aa16292 commit 54b074d

File tree

138 files changed

+4309
-5573
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+4309
-5573
lines changed

.lintignore .eslintignore

File renamed without changes.

.eslintrc.cjs

+118-131
Original file line numberDiff line numberDiff line change
@@ -1,186 +1,173 @@
1-
const WARN = "warn";
2-
const ERROR = "error";
3-
const OFF = "off";
1+
const WARN = 'warn';
2+
const ERROR = 'error';
3+
const OFF = 'off';
44

55
const COMMON_CONFIG = {
6-
plugins: ["jsdoc", "filenames", "import", "prettier"],
7-
extends: ["prettier", "plugin:prettier/recommended"],
6+
plugins: ['jsdoc', 'filenames', 'import', 'prettier'],
7+
extends: ['prettier', 'plugin:prettier/recommended'],
88
rules: {
9-
"prettier/prettier": WARN,
10-
"no-underscore-dangle": OFF,
11-
"no-debugger": WARN,
12-
"space-infix-ops": ERROR,
13-
"no-console": WARN,
14-
"wrap-iife": OFF,
15-
"no-self-assign": ERROR,
16-
"no-self-compare": ERROR,
17-
"no-loop-func": OFF,
18-
"array-callback-return": ERROR,
9+
'prettier/prettier': WARN,
10+
'no-underscore-dangle': OFF,
11+
'no-debugger': WARN,
12+
'space-infix-ops': ERROR,
13+
'no-console': WARN,
14+
'wrap-iife': OFF,
15+
'no-self-assign': ERROR,
16+
'no-self-compare': ERROR,
17+
'no-loop-func': OFF,
18+
'array-callback-return': ERROR,
1919
curly: ERROR,
20-
"no-fallthrough": OFF,
21-
"dot-notation": OFF,
22-
"prefer-const": WARN,
23-
"no-empty-function": OFF,
24-
"no-with": ERROR,
25-
"one-var": [ERROR, "never"],
26-
camelcase: [WARN, { properties: "always", ignoreImports: true }],
27-
"spaced-comment": [WARN, "always"],
28-
"capitalized-comments": [WARN, "always", { ignorePattern: "prettier" }],
29-
"no-useless-rename": WARN,
30-
"jsdoc/check-alignment": WARN,
31-
"jsdoc/check-examples": OFF,
32-
"jsdoc/check-indentation": WARN,
33-
"jsdoc/check-syntax": WARN,
34-
"jsdoc/check-tag-names": WARN,
35-
"jsdoc/check-types": WARN,
36-
"jsdoc/implements-on-classes": WARN,
37-
"jsdoc/match-description": OFF,
38-
"jsdoc/newline-after-description": WARN,
39-
"jsdoc/no-types": OFF,
40-
"jsdoc/no-undefined-types": OFF,
41-
"jsdoc/require-description": OFF,
42-
"jsdoc/require-description-complete-sentence": OFF,
43-
"jsdoc/require-example": OFF,
44-
"jsdoc/require-hyphen-before-param-description": [WARN, "never"],
45-
"jsdoc/require-param": WARN,
46-
"jsdoc/require-param-name": WARN,
47-
"jsdoc/require-returns-check": WARN,
48-
"jsdoc/require-returns-description": WARN,
49-
"jsdoc/valid-types": WARN,
50-
"filenames/match-exported": WARN,
51-
"no-useless-constructor": WARN,
52-
"jsdoc/require-jsdoc": [
20+
'no-fallthrough': OFF,
21+
'dot-notation': OFF,
22+
'prefer-const': WARN,
23+
'no-empty-function': OFF,
24+
'no-with': ERROR,
25+
'one-var': [ERROR, 'never'],
26+
camelcase: [WARN, { properties: 'always', ignoreImports: true }],
27+
'spaced-comment': [WARN, 'always'],
28+
'capitalized-comments': OFF,
29+
'no-useless-rename': WARN,
30+
'jsdoc/check-alignment': WARN,
31+
'jsdoc/check-examples': OFF,
32+
'jsdoc/check-indentation': WARN,
33+
'jsdoc/check-syntax': WARN,
34+
'jsdoc/check-tag-names': WARN,
35+
'jsdoc/check-types': WARN,
36+
'jsdoc/implements-on-classes': WARN,
37+
'jsdoc/match-description': OFF,
38+
'jsdoc/newline-after-description': OFF,
39+
'jsdoc/no-types': OFF,
40+
'jsdoc/no-undefined-types': OFF,
41+
'jsdoc/require-description': OFF,
42+
'jsdoc/require-description-complete-sentence': OFF,
43+
'jsdoc/require-example': OFF,
44+
'jsdoc/require-hyphen-before-param-description': [WARN, 'never'],
45+
'jsdoc/require-param': WARN,
46+
'jsdoc/require-param-name': WARN,
47+
'jsdoc/require-returns-check': WARN,
48+
'jsdoc/require-returns-description': WARN,
49+
'jsdoc/valid-types': WARN,
50+
'filenames/match-exported': WARN,
51+
'no-useless-constructor': WARN,
52+
'jsdoc/require-jsdoc': [
5353
WARN,
5454
{
5555
require: {
5656
ArrowFunctionExpression: false,
5757
FunctionDeclaration: false,
5858
FunctionExpression: false,
5959
ClassDeclaration: true,
60-
MethodDefinition: true,
61-
},
62-
},
60+
MethodDefinition: true
61+
}
62+
}
6363
],
64-
"import/no-extraneous-dependencies": WARN,
65-
},
64+
'import/no-extraneous-dependencies': WARN
65+
}
6666
};
6767

6868
const TS_PARSER_FIELDS = {
69-
parser: "@typescript-eslint/parser",
69+
parser: '@typescript-eslint/parser',
7070
parserOptions: {
71-
ecmaFeatures: {
72-
jsx: true,
73-
},
7471
ecmaVersion: 2020,
75-
sourceType: "module",
76-
},
72+
sourceType: 'module'
73+
}
7774
};
7875

7976
module.exports = {
8077
env: {
8178
es6: true,
82-
browser: true,
83-
node: true,
79+
node: true
80+
},
81+
parserOptions: {
82+
ecmaVersion: 2020
8483
},
8584
overrides: [
8685
{
87-
files: ["*.js", "*.jsx", "*.mjs"],
86+
files: ['*.js', '*.jsx', '*.mjs', '*.cjs'],
8887
...TS_PARSER_FIELDS,
8988
plugins: COMMON_CONFIG.plugins,
9089
extends: COMMON_CONFIG.extends,
9190
rules: {
9291
...COMMON_CONFIG.rules,
93-
"no-undef": ERROR,
94-
"jsdoc/check-param-names": WARN,
95-
"jsdoc/require-param-type": WARN,
96-
"jsdoc/require-returns": WARN,
97-
"jsdoc/require-param-description": WARN,
98-
"jsdoc/require-returns-type": WARN,
99-
"consistent-return": WARN,
100-
},
92+
'no-undef': ERROR,
93+
'jsdoc/check-param-names': WARN,
94+
'jsdoc/require-param-type': WARN,
95+
'jsdoc/require-returns': WARN,
96+
'jsdoc/require-param-description': WARN,
97+
'jsdoc/require-returns-type': WARN,
98+
'consistent-return': WARN
99+
}
101100
},
102101
{
103-
files: ["*.json"],
104-
plugins: ["json"],
105-
extends: ["eslint:recommended", "plugin:json/recommended"],
102+
files: ['*.json'],
103+
plugins: ['json'],
104+
extends: ['eslint:recommended', 'plugin:json/recommended']
106105
},
107106
{
108-
files: ["*.ts", "*.tsx"],
109-
plugins: [...COMMON_CONFIG.plugins, "@typescript-eslint"],
107+
files: ['*.ts', '*.tsx'],
108+
plugins: [...COMMON_CONFIG.plugins, '@typescript-eslint'],
110109
...TS_PARSER_FIELDS,
111-
extends: [
112-
...COMMON_CONFIG.extends,
113-
"plugin:@typescript-eslint/recommended",
114-
],
110+
extends: [...COMMON_CONFIG.extends, 'plugin:@typescript-eslint/recommended'],
115111
rules: {
116112
...COMMON_CONFIG.rules,
117-
"@typescript-eslint/explicit-member-accessibility": [
113+
'@typescript-eslint/explicit-member-accessibility': [
118114
ERROR,
119-
{ overrides: { constructors: "no-public" } },
115+
{ overrides: { constructors: 'no-public' } }
120116
],
121-
"@typescript-eslint/no-unused-vars": OFF, // TSC is already doing this
122-
"@typescript-eslint/ban-types": OFF, // TSC is already doing this
123-
"no-undef": OFF, // TSC is already doing this
124-
"@typescript-eslint/no-var-requires": OFF,
125-
"@typescript-eslint/explicit-module-boundary-types": OFF, // TSC is already doing this
126-
"@typescript-eslint/consistent-type-assertions": [
117+
'@typescript-eslint/no-unused-vars': OFF, // TSC is already doing this
118+
'@typescript-eslint/ban-types': OFF, // TSC is already doing this
119+
'no-undef': OFF, // TSC is already doing this
120+
'@typescript-eslint/no-var-requires': OFF,
121+
'@typescript-eslint/explicit-module-boundary-types': OFF, // TSC is already doing this
122+
'@typescript-eslint/consistent-type-assertions': [
127123
WARN,
128-
{ assertionStyle: "angle-bracket" },
124+
{ assertionStyle: 'angle-bracket' }
129125
],
130-
"@typescript-eslint/no-explicit-any": OFF,
131-
"@typescript-eslint/no-empty-function": OFF,
132-
"@typescript-eslint/no-use-before-define": OFF,
133-
"@typescript-eslint/no-this-alias": OFF,
134-
"@typescript-eslint/explicit-function-return-type": [
135-
ERROR,
136-
{ allowExpressions: true },
137-
],
138-
"@typescript-eslint/member-ordering": [
126+
'@typescript-eslint/no-explicit-any': OFF,
127+
'@typescript-eslint/no-empty-function': OFF,
128+
'@typescript-eslint/no-use-before-define': OFF,
129+
'@typescript-eslint/no-this-alias': OFF,
130+
'@typescript-eslint/explicit-function-return-type': [ERROR, { allowExpressions: true }],
131+
'@typescript-eslint/member-ordering': [
139132
WARN,
140133
{
141-
default: [
142-
"signature",
143-
"field",
144-
"constructor",
145-
["get", "set"],
146-
"method",
147-
],
148-
},
134+
default: ['signature', 'field', 'constructor', ['get', 'set'], 'method']
135+
}
149136
],
150-
"@typescript-eslint/ban-ts-comment": OFF,
151-
"jsdoc/no-types": WARN,
152-
"import/named": OFF,
153-
"import/no-named-as-default": WARN,
154-
"import/no-extraneous-dependencies": WARN,
155-
"import/no-absolute-path": WARN,
156-
"@typescript-eslint/naming-convention": [
137+
'@typescript-eslint/ban-ts-comment': OFF,
138+
'jsdoc/no-types': WARN,
139+
'import/named': OFF,
140+
'import/no-named-as-default': WARN,
141+
'import/no-extraneous-dependencies': WARN,
142+
'import/no-absolute-path': WARN,
143+
'@typescript-eslint/naming-convention': [
157144
WARN,
158145
{
159-
selector: "interface",
160-
format: ["PascalCase"],
161-
prefix: ["I"],
146+
selector: 'interface',
147+
format: ['PascalCase'],
148+
prefix: ['I']
162149
},
163150
{
164-
selector: "enum",
165-
format: ["PascalCase"],
166-
suffix: ["Enum"],
151+
selector: 'enum',
152+
format: ['PascalCase'],
153+
suffix: ['Enum']
167154
},
168155
{
169-
selector: "typeParameter",
170-
format: ["PascalCase"],
156+
selector: 'typeParameter',
157+
format: ['PascalCase']
171158
},
172159
{
173-
selector: "memberLike",
174-
modifiers: ["private"],
175-
leadingUnderscore: "allow",
176-
format: ["camelCase"],
160+
selector: 'memberLike',
161+
modifiers: ['private'],
162+
leadingUnderscore: 'allow',
163+
format: ['camelCase']
177164
},
178165
{
179-
selector: "class",
180-
format: ["PascalCase"],
181-
},
182-
],
183-
},
184-
},
185-
],
166+
selector: 'class',
167+
format: ['PascalCase']
168+
}
169+
]
170+
}
171+
}
172+
]
186173
};

.github/workflows/auto-assign.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Auto Assign
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
jobs:
7+
auto-assign:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Set build URL to commit status
11+
run: |
12+
curl \
13+
--request POST \
14+
--url https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }} \
15+
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
16+
--header 'content-type: application/json' \
17+
--data "{
18+
\"assignees\": [\"${{ github.actor }}\"]
19+
}"

.github/workflows/pull_request.yml

+14-11
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ on: pull_request
33
jobs:
44
build:
55
runs-on: ubuntu-latest
6-
continue-on-error: true
76
strategy:
87
matrix:
98
node-version: [16, 18, 20]
@@ -14,12 +13,13 @@ jobs:
1413
fetch-depth: 0
1514

1615
- name: Use Node.js ${{ matrix.node-version }}
17-
uses: actions/setup-node@v3
16+
uses: actions/setup-node@v4
1817
with:
1918
node-version: ${{ matrix.node-version }}
19+
cache: 'npm'
2020

2121
- name: Cache node modules
22-
uses: actions/cache@v3
22+
uses: actions/cache@v4
2323
id: cache-node-modules
2424
env:
2525
cache-name: cache-node-modules
@@ -30,7 +30,7 @@ jobs:
3030
key: ${{ runner.os }}-${{ matrix.node-version }}-build-${{ env.cache-name }}-${{ hashFiles('./packages/*/package-lock.json') }}-${{ hashFiles('./package-lock.json') }}
3131

3232
- name: Cache turbo
33-
uses: actions/cache@v3
33+
uses: actions/cache@v4
3434
id: cache-turbo
3535
with:
3636
path: .turbo
@@ -45,12 +45,15 @@ jobs:
4545
path: .turbo
4646
key: turbo-master
4747

48-
- name: Install Dependencies
48+
- name: Install dependencies
4949
if: steps.cache-node-modules.outputs.cache-hit != 'true'
50-
run: |
51-
npm ci
50+
run: npm ci --ignore-scripts
5251

53-
- run: node ./bin/validate-commit-messages.js
54-
- run: npm run compile
55-
- run: npm run lint
56-
- run: npm run test
52+
- name: Compile package
53+
run: npm run compile
54+
55+
- name: Lint
56+
run: npm run lint
57+
58+
- name: Test
59+
run: npm run test

0 commit comments

Comments
 (0)