Skip to content

[pull] master from jsx-eslint:master #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 177 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
30bb5f4
[Fix] `function-component-definition`, `boolean-prop-naming`, `jsx-fi…
HenryBrown0 Sep 4, 2023
88f7f09
[Fix] `prop-types`: handle nested forwardRef + memo
developer-bandi Jan 14, 2024
c4fcff9
[Tests] add `@typescript-eslint/parser` v6, v7, v8
HenryBrown0 Nov 27, 2023
d4e58aa
[Docs] `hook-use-state`: fix an undefined variable
chentsulin Aug 28, 2023
4edc1f0
[Docs] `iframe-missing-sandbox`: fix link to iframe attribute on mdn
nnmrts Feb 17, 2024
b9292b4
[New] add `checked-requires-onchange-or-readonly` rule
jaesoekjjang Jan 20, 2024
b8a0580
[Dev Deps] update `@babel/core`, `@babel/eslint-parser`, `eslint-doc-…
ljharb Feb 19, 2024
36e791d
[Deps] update `array.prototype.findlast`, `array.prototype.tosorted`,…
ljharb Feb 19, 2024
6cb0f00
[Fix] `jsx-boolean-value`: make error messages clearer
developer-bandi Feb 18, 2024
e880213
[Fix] `no-unknown-property`: add `fetchPriority`
SevereCloud Feb 26, 2024
83a26dd
[Fix] `forbid-elements`: prevent a crash on `createElement()`
ljharb Mar 3, 2024
bd55ca2
[Docs] update URLs
ljharb Mar 3, 2024
2124d13
[Fix] add a few jsdoc type annotations to work around TS inference fo…
bradzacher Feb 21, 2024
24d21ac
[Dev Deps] update `@babel/core`, `@babel/plugin-syntax-decorators`, `…
ljharb Mar 3, 2024
2e6b557
Update CHANGELOG and bump version
ljharb Mar 4, 2024
b7780ce
[meta] fix CHANGELOG
ljharb Mar 4, 2024
730bac9
[Fix] `jsx-no-leaked-render`: prevent wrongly adding parens
developer-bandi Mar 4, 2024
8c2bdb2
[actions] update workflows
ljharb Mar 4, 2024
901c794
[Fix] `boolean-prop-naming`: detect TS interfaces
developer-bandi Mar 5, 2024
0abebc6
[Fix] `boolean-prop-naming`: literalType error fix
developer-bandi Mar 7, 2024
48291e8
[Fix] `boolean-prop-naming`: allow TSIntersectionType
developer-bandi Mar 8, 2024
a920463
[Fix] `boolean-prop-naming`: improve error message
ljharb Mar 8, 2024
c3275a4
[Fix] `no-unknown-property`: support `popover`, `popovertarget`, `pop…
ljharb Mar 12, 2024
da1013c
[Docs] `jsx-no-constructed-context-values`: fix some typos
cuithon Mar 12, 2024
69de42e
[Fix] `no-unknown-property`: only match `data-*` attributes containin…
silverwind Mar 15, 2024
e4ecbcf
[Fix] `checked-requires-onchange-or-readonly`: correct options that w…
jaesoekjjang Mar 15, 2024
eea45bf
Update CHANGELOG and bump version
ljharb Mar 15, 2024
a762b25
[New] add `jsx-props-no-spread-multi`
Apr 3, 2024
f435df9
[Tests] `button-has-type`: add test case with spread
y-hsgw Apr 9, 2024
d50d886
[types] add type annotations
y-hsgw Apr 9, 2024
4467db5
[Fix] `boolean-prop-naming`: avoid a crash with a non-TSTypeReference…
developer-bandi Mar 16, 2024
6be3329
[Refactor] create `getAncestors` util, since `context.getAncestors` i…
MatiPl01 Apr 28, 2024
90068a4
[Refactor] create `markVariableAsUsed` util, `context.markVariableAsU…
MatiPl01 Apr 28, 2024
03cd4b5
Merge tag 'v7.34.1' into HEAD
ljharb Apr 28, 2024
d97e3ed
[Fix] `jsx-no-leaked-render`: invalid report if left side is boolean
akulsr0 May 3, 2024
26765f9
[Refactor] create `getSourceCode` helper, since `context.getSourceCod…
MatiPl01 Apr 28, 2024
0c804bb
[Refactor] context comes first
ljharb May 16, 2024
65f10f9
[Refactor] `getFirstTokens`: context -> sourceCode
ljharb May 18, 2024
d6e9059
[Refactor] `context.getSource` -> `sourceCode.getText`
ljharb May 19, 2024
8e1a94b
[Refactor] create getScope util; `context.getScope` is deprecated
MatiPl01 Apr 28, 2024
fbb1e0f
[Tests] `jsx-no-useless-fragment`, `jsx-fragments`, `function-compone…
mdjermanovic May 20, 2024
e621e30
add `tests/helpers/getRuleDefiner.js`
mdjermanovic May 20, 2024
4e3f2ae
[New] support eslint v9
mdjermanovic May 20, 2024
23b0a49
[Fix] `jsx-closing-bracket-location`: message shows `{{details}}` whe…
mdjermanovic May 20, 2024
0effd62
[Tests] test rules with ESLint v9
mdjermanovic May 19, 2024
014ee05
[Fix] `no-invalid-html-attribute`: ensure error messages are correct
mdjermanovic May 20, 2024
917240b
[Fix] `no-invalid-html-attribute`: substitute placeholders in suggest…
mdjermanovic May 20, 2024
c9b60a6
[Tests] remove duplicate tests
mdjermanovic May 20, 2024
84781c7
[Tests] `hook-use-state`: test suggestions with `messageId` instead o…
mdjermanovic May 20, 2024
6c4b6fb
[meta] consistently indent .eslintrc with tabs
ljharb May 21, 2024
3533e26
[Refactor] `jsx-no-constructed-context-values`: set `schema: false`
mdjermanovic May 20, 2024
ec86001
[Dev Deps] update `@babel/core`, `@babel/eslint-parser`, `@babel/plug…
ljharb May 24, 2024
d79605a
[Deps] update `array-includes`, `array.prototype.findlast`, `es-itera…
ljharb May 24, 2024
417e1ca
Update CHANGELOG and bump version
ljharb May 28, 2024
e27ef81
[Fix] `prop-types`: null-check rootNode before calling getScope
crnhrv May 30, 2024
9cd7904
[actions] Don't install with `--legacy-peer-deps` in pretest check
mdjermanovic May 30, 2024
a79beb3
[Fix] `boolean-prop-naming`: avoid a crash with a spread prop
ljharb May 31, 2024
a944aa5
[Fix] `jsx-boolean-value`: `assumeUndefinedIsFalse` with `never` must…
6uliver May 14, 2024
393bfa2
[Fix] `no-object-type-as-default-prop`: enable rule for components wi…
JulienR1 Jun 13, 2024
6dc7803
[Fix] `jsx-key`: incorrect behavior for checkKeyMustBeforeSpread with…
akulsr0 Jun 18, 2024
7d16666
[Dev Deps] update `@babel/core`, `@babel/eslint-parser`, `@babel/plug…
ljharb Jun 18, 2024
eb56061
[Deps] update `array.prototype.tosorted`
ljharb Jun 18, 2024
cef8123
Update CHANGELOG and bump version
ljharb Jun 18, 2024
b747450
[Fix] `prop-types`: fix `className` missing in prop validation false …
akulsr0 May 6, 2024
3c1d520
[Dev Deps] downgrade `eslint-remote-tester-repositories`
ljharb Jun 24, 2024
6a83d67
[New] `jsx-handler-names`: support ignoring component names
akulsr0 Jun 21, 2024
c58f04b
[New] `jsx-closing-tag-location`: add `line-aligned` option
kimtaejin3 Jul 3, 2024
597553d
[New] `no-danger`: add `customComponentNames` option
akulsr0 May 6, 2024
eda77f3
[Refactor] avoid making a holey array
ljharb Jul 4, 2024
bcb987a
[Refactor] use `hasown` instead of the larger `object.hasown`
ljharb Jul 4, 2024
f1ae6ed
[Refactor] `sort-comp`: use Object.entries instead of for-in
ljharb Jul 4, 2024
51d342b
[patch] make TS happy
ljharb Jul 4, 2024
67d73aa
[Fix] `sort-prop-types`: Check for undefined before accessing `node.t…
tylerlaprade Jul 8, 2024
7a7b756
Update CHANGELOG and bump version
ljharb Jul 13, 2024
e64e260
[New] export flat configs from plugin root and fix flat config crash
bradzacher Feb 21, 2024
9bf81af
[New] support eslint v9
ljharb Jul 15, 2024
6ce58e5
[New] `forbid-component-props`: add `propNamePattern` to allow / disa…
akulsr0 Jun 27, 2024
4d2fd86
[Refactor] `variableUtil`: Avoid creating a single flat variable scop…
DanielRosenwasser Jul 15, 2024
00b89fe
[New] version settings: Allow react defaultVersion to be configurable
onlywei Jun 20, 2024
ca8b11e
[Dev Deps] update `@babel/core`, `@babel/eslint-parser`
ljharb Jul 16, 2024
4b3209b
[meta] no point in supporting eslint 9.0 - 9.6 initially
ljharb Jul 16, 2024
a08cb93
[Fix] `sort-prop-types`: single line type ending without semicolon
akulsr0 Jul 18, 2024
a4b0bbc
[Fix] `require-default-props`: report when required props have defaul…
akulsr0 Jul 18, 2024
c6fdccd
Update CHANGELOG and bump version
ljharb Jul 20, 2024
e9272a5
[Refactor] prefer non-iterator-protocol iteration when possible
ljharb Jul 22, 2024
a90aa6a
[Refactor] `jsx-no-literals`: avoid unnecessary `arguments` usage
ljharb Jul 22, 2024
6421386
[Refactor] use `!!` over `Boolean()`
ljharb Jul 22, 2024
1b4037f
[Refactor] `jsx-sort-props`, `sort-prop-types`: consolidate helpers: …
ljharb Jul 22, 2024
983b88d
[Tests] `no-array-index-key`: actually run valid tests
ljharb Jul 24, 2024
4d99f6e
[Refactor] `display-name`: use `unwrapTSAsExpression`
ljharb Jul 29, 2024
e3927a3
[Refactor] clean up some of the jsdocs
ljharb Jul 29, 2024
8dc0215
[Refactor] hoist functions to module level
ljharb Jul 30, 2024
3b6bacc
[Refactor] general cleanup
ljharb Jul 30, 2024
0170dbe
[Refactor] add `astUtil.isCallExpression` predicate
ljharb Jul 30, 2024
10eb235
[Fix] `jsx-curly-brace-presence`: do not trigger on strings containin…
akulsr0 Aug 8, 2024
d9c7ef1
[Dev Deps] update `@babel/core`, `@babel/eslint-parser`, `aud`
ljharb Aug 9, 2024
a2306e7
[Tests] use `npm audit` instead of `aud`
ljharb Aug 9, 2024
6a36b44
[Fix] super type parameter resolving in newer @typescript-eslint/pars…
hampustagerud Aug 20, 2024
28a33dc
[Fix] `jsx-max-depth`: finding JSX element in newer `@typescript-esli…
hampustagerud Aug 20, 2024
c48cb1f
[New] `no-string-refs`: allow this.refs in > 18.3.0
henryqdineen Aug 27, 2024
0a8092f
[types] add jsdoc type annotations
y-hsgw Apr 9, 2024
5fc0f87
Update CHANGELOG and bump version
ljharb Sep 2, 2024
e538ee9
[Tests] `jsx-curly-brace-presence`: clean up formatting
ljharb Sep 3, 2024
25ae093
[Tests] `jsx-curly-brace-presence`: clean up formatting
ljharb Sep 3, 2024
45ba6bc
[Fix] `jsx-curly-brace-presence`: avoid autofixing attributes with do…
ljharb Sep 3, 2024
cf868f2
[Fix] `jsx-curly-brace-presence`: avoid autofixing attributes with do…
ljharb Sep 3, 2024
4c10849
Update CHANGELOG and bump version
ljharb Sep 3, 2024
5b20fe5
Merge tag 'v7.35.2'
ljharb Sep 3, 2024
6150d40
[meta] update release workflow to prune footnotes
ljharb Sep 3, 2024
d5e3769
[Tests] use `require.resolve` to get absolute paths to parsers
HenryBrown0 Jan 16, 2024
bdc5791
[Docs] `no-danger`: update broken link
lucasrmendonca Sep 9, 2024
07503b7
[Fix] JSX pragma: fail gracefully
ljharb Sep 10, 2024
b8217ed
[New] `jsx-no-literals` Add `elementOverrides` option and the ability…
Pearce-Ropion Aug 30, 2024
ed64b24
[Fix] `jsx-props-no-spreading`: add `explicitSpread` option to schema
ljharb Sep 11, 2024
ceb73fe
[New] add `forward-ref-uses-ref` rule for checking ref parameter
NotWoods Dec 15, 2023
f25251f
Update CHANGELOG and bump version
ljharb Sep 12, 2024
b918f02
[meta] add missing rule link
ljharb Sep 12, 2024
1df23d2
[actions] fix release script
ljharb Sep 12, 2024
a09083b
[Fix] `no-is-mounted`: fix logic in method name check
Mathias-S Sep 12, 2024
99e15e1
[Fix] `jsx-no-literals`: Avoid crashing on valueless boolean props
reosarevok Sep 12, 2024
59ef14c
Update CHANGELOG and bump version
ljharb Sep 12, 2024
9668ee0
[meta] fix release workflow
ljharb Sep 12, 2024
a1273d5
[New] `no-unstable-nested-components`: add `propNamePattern` to suppo…
danreeves Sep 16, 2024
744135b
[readme] flat config example for react 17+
GabenGar Sep 14, 2024
4ecf034
[Dev Deps] update `eslint-plugin-import`, `gfm-footnotes`
ljharb Sep 23, 2024
7f3ac1b
[New] add type generation
voxpelli Sep 23, 2024
95297ed
[New] `no-unescaped-entities`: add suggestions
StyleShit Sep 24, 2024
3073214
[New] `forbid-component-props`: add `allowedForPatterns`/`disallowedF…
Efimenko Aug 21, 2024
0cc5b7a
[meta] fix release workflow
ljharb Sep 27, 2024
ec27e20
Update CHANGELOG and bump version
ljharb Sep 26, 2024
1f95a24
[readme] Fix shared settings link
MgenGlder Sep 28, 2024
63aceff
[Fix] `destructuring-assignment`: fix false negative when using `type…
golopot Sep 29, 2024
63e0b49
[meta] do not npmignore `d.ts` files
ljharb Oct 1, 2024
ae6fb8d
Update CHANGELOG and bump version
ljharb Oct 1, 2024
96d46d5
[Refactor] `destructuring-assignment`: use `getParentStatelessComponent`
golopot Sep 29, 2024
c47fa56
[types] [Fix] ensure the index types are generated
ljharb Oct 2, 2024
5c23573
[Dev Deps] update `@babel/core, `@babel/eslint-parser`, `@babel/plugi…
ljharb Oct 16, 2024
5696f99
[Dev Deps] update `@babel/core`, `@babel/eslint-parser`, `@babel/plug…
ljharb Oct 22, 2024
33db656
[Deps] update `es-iterator-helpers`
ljharb Oct 22, 2024
256cf74
Update CHANGELOG and bump version
ljharb Oct 22, 2024
b244638
[actions] publish action: hopefully clarify failure reasons
ljharb Oct 22, 2024
1c3621a
[Fix] `no-danger`: avoid a crash on a nested component name
ljharb Oct 23, 2024
d1556a3
[eslint] ignore d.ts files
ljharb Oct 23, 2024
4ef92b4
[Tests] `jsx-no-script-url`: Improve tests
radu2147 Nov 4, 2024
e80def4
[Fix] types: correct generated type declaration
ocavue Oct 12, 2024
4bf30c3
[actions] update step-security/harden-runner from v1 to v2
dependabot[bot] Nov 27, 2024
efb2993
[Refactor] some cleanups
ljharb Nov 29, 2024
17e1a84
[Dev Deps] update `@babel/core`
ljharb Nov 29, 2024
d5da0a6
[Deps] update `es-iterator-helpers`
ljharb Nov 29, 2024
b713026
[Fix] `prop-types`: props missing in validation when using generic ty…
rbondoc96 Dec 3, 2024
2c0b10c
[Tests] pin `@typescript-eslint/parser to < 8.18, due to a breaking c…
ljharb Dec 9, 2024
958954d
[Docs] fix broken links:
bastiendmt Oct 16, 2024
233d442
[Dev Deps] update `@babel/preset-react`
ljharb Dec 9, 2024
66ae4c1
[Fix] `no-unknown-property`: support `precedence` prop in react 19
acusti Sep 19, 2024
b4a14f4
[meta] add `directories.test`
ljharb Dec 22, 2024
033ad19
[Deps] update `array.prototype.flatmap`, `es-iterator-helpers`, `obje…
ljharb Dec 23, 2024
ed3b1cf
[Tests] `jsx-uses-vars`, `jsx-uses-react`: fix `no-unused-vars` tests…
ljharb Dec 23, 2024
bc5b9dd
[actions] release workflow needs some new domains
ljharb Dec 23, 2024
244743a
Update CHANGELOG and bump version
ljharb Dec 23, 2024
5c816ed
[actions] publish action: allow additional URL
ljharb Dec 24, 2024
82a196a
[Fix] `no-unknown-property`: support `onBeforeToggle`, `popoverTarget…
acusti Dec 10, 2024
efc021f
[types] fix types of flat configs
ljharb Jan 10, 2025
cfd5edd
[Dev Deps] update `@babel/eslint-parser`
ljharb Jan 12, 2025
e6b5b41
Update CHANGELOG and bump version
ljharb Jan 12, 2025
7eb6ca9
[Docs] `button-has-type`: clean up phrasing
hamirmahal Mar 21, 2025
98a31f8
[Dev Deps] update `@babel/core`, `@babel/eslint-parser`
ljharb Mar 25, 2025
addad46
[Deps] update `object.entries`
ljharb Mar 25, 2025
3fd9b92
[Fix] `no-unknown-property`: allow shadow root attrs on `<template>`
ljharb Mar 25, 2025
90a00b9
[Fix] `prop-types`: support `ComponentPropsWithRef` from a namespace …
corydeppen Dec 29, 2024
60b7316
[Tests] `prop-types`: use proper spacing/semis, button type
ljharb Mar 25, 2025
2428618
[Fix] `jsx-no-constructed-context-values`: detect constructed context…
TildaDares Mar 23, 2025
2f64dea
[Fix] `no-unknown-property`: allow `transform-origin` on `rect`
ljharb Apr 3, 2025
2c98b83
Update CHANGELOG and bump version
ljharb Apr 3, 2025
3a03579
[Refactor] `usedPropTypes`: avoid switch statements
ljharb Aug 29, 2024
fd08120
[Fix] `no-unknown-property`: allow `onLoad` on `body`
DerekStapleton May 5, 2025
dd2e968
[Dev Deps] update `@babel/core`, `@babel/eslint-parser`, `@babel/plug…
ljharb May 7, 2025
f2869fd
[New] `jsx-props-no-multi-spaces`: improve autofix for multi-line
justisb Jun 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .eslint-doc-generatorrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const config = {
['jsx-runtime', '🏃'],
['recommended', '☑️'],
],
ignoreConfig: ['all'],
ignoreConfig: ['all', 'flat'],
urlConfigs: 'https://github.com/jsx-eslint/eslint-plugin-react/#shareable-configs',
};

Expand Down
151 changes: 77 additions & 74 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,82 +1,85 @@
{
"root": true,
"extends": ["airbnb-base", "plugin:eslint-plugin/recommended"],
"plugins": ["eslint-plugin"],
"env": {
"es6": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"jsx": true
},
"sourceType": "script",
},
"ignorePatterns": [
"coverage/",
".nyc_output/",
],
"rules": {
"comma-dangle": [2, "always-multiline"],
"object-shorthand": [2, "always", {
"ignoreConstructors": false,
"avoidQuotes": false, // this is the override vs airbnb
}],
"max-len": [2, 120, {
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreComments": true,
}],
"consistent-return": 0,
"root": true,
"extends": ["airbnb-base", "plugin:eslint-plugin/recommended"],
"plugins": ["eslint-plugin"],
"env": {
"es6": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"jsx": true
},
"sourceType": "script",
},
"ignorePatterns": [
"coverage/",
".nyc_output/",
"test-published-types/",
"tests/fixtures/flat-config/",
"**/*/*.d.ts",
],
"rules": {
"comma-dangle": [2, "always-multiline"],
"object-shorthand": [2, "always", {
"ignoreConstructors": false,
"avoidQuotes": false, // this is the override vs airbnb
}],
"max-len": [2, 140, {
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreComments": true,
}],
"consistent-return": 0,

"prefer-destructuring": [2, { "array": false, "object": false }, { "enforceForRenamedProperties": false }],
"prefer-object-spread": 0, // until node 8 is required
"prefer-rest-params": 0, // until node 6 is required
"prefer-spread": 0, // until node 6 is required
"function-call-argument-newline": 1, // TODO: enable
"function-paren-newline": 0,
"no-plusplus": [2, {"allowForLoopAfterthoughts": true}],
"no-param-reassign": 1,
"no-restricted-syntax": [2, {
"selector": "ObjectPattern",
"message": "Object destructuring is not compatible with Node v4"
}],
"strict": [2, "safe"],
"valid-jsdoc": [2, {
"requireReturn": false,
"requireParamDescription": false,
"requireReturnDescription": false,
}],
"prefer-destructuring": [2, { "array": false, "object": false }, { "enforceForRenamedProperties": false }],
"prefer-object-spread": 0, // until node 8 is required
"prefer-rest-params": 0, // until node 6 is required
"prefer-spread": 0, // until node 6 is required
"function-call-argument-newline": 1, // TODO: enable
"function-paren-newline": 0,
"no-plusplus": [2, {"allowForLoopAfterthoughts": true}],
"no-param-reassign": 1,
"no-restricted-syntax": [2, {
"selector": "ObjectPattern",
"message": "Object destructuring is not compatible with Node v4"
}],
"strict": [2, "safe"],
"valid-jsdoc": [2, {
"requireReturn": false,
"requireParamDescription": false,
"requireReturnDescription": false,
}],

"eslint-plugin/consistent-output": 0,
"eslint-plugin/require-meta-docs-description": [2, { "pattern": "^(Enforce|Require|Disallow)" }],
"eslint-plugin/require-meta-schema": 0,
"eslint-plugin/require-meta-type": 0
"eslint-plugin/consistent-output": 0,
"eslint-plugin/require-meta-docs-description": [2, { "pattern": "^(Enforce|Require|Disallow)" }],
"eslint-plugin/require-meta-schema": 0,
"eslint-plugin/require-meta-type": 0
},
"overrides": [
{
"files": "tests/**",
"rules": {
"no-template-curly-in-string": 1,
},
},
"overrides": [
{
"files": "tests/**",
"rules": {
"no-template-curly-in-string": 1,
},
{
"files": "markdown.config.js",
"rules": {
"no-console": 0,
},
{
"files": "markdown.config.js",
"rules": {
"no-console": 0,
},
},
{
"files": ".github/workflows/*.js",
"parserOptions": {
"ecmaVersion": 2019,
},
{
"files": ".github/workflows/*.js",
"parserOptions": {
"ecmaVersion": 2019,
},
"rules": {
"camelcase": 0,
"no-console": 0,
"no-restricted-syntax": 0,
},
"rules": {
"camelcase": 0,
"no-console": 0,
"no-restricted-syntax": 0,
},
],
},
],
}
67 changes: 63 additions & 4 deletions .github/workflows/node-18+.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
eslint:
- 9
- 8
- 7
- 6
Expand All @@ -37,20 +38,78 @@ jobs:
- 10
- 9
- 8
typescript-eslint:
- 5
- 6
- 7
- 8
exclude:
- eslint: 3
babel-eslint: 10
- eslint: 3
typescript-eslint: 5
- eslint: 4
typescript-eslint: 5
- eslint: 4.14
typescript-eslint: 5
- eslint: 5
typescript-eslint: 5
- eslint: 3
typescript-eslint: 6
- eslint: 4
typescript-eslint: 6
- eslint: 4.14
typescript-eslint: 6
- eslint: 5
typescript-eslint: 6
- eslint: 6
typescript-eslint: 6
- eslint: 9
typescript-eslint: 6
- eslint: 3
typescript-eslint: 7
- eslint: 4
typescript-eslint: 7
- eslint: 4.14
typescript-eslint: 7
- eslint: 5
typescript-eslint: 7
- eslint: 6
typescript-eslint: 7
- eslint: 7
typescript-eslint: 7
- eslint: 9
typescript-eslint: 7
- eslint: 3
typescript-eslint: 8
- eslint: 4
typescript-eslint: 8
- eslint: 4.14
typescript-eslint: 8
- eslint: 5
typescript-eslint: 8
- eslint: 6
typescript-eslint: 8
- eslint: 7
typescript-eslint: 8
- eslint: 9
typescript-eslint: 5
- node-version: 19
typescript-eslint: 7

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
after_install: |
npm install --no-save "eslint@${{ matrix.eslint }}" "@typescript-eslint/parser@5" "babel-eslint@${{ matrix.babel-eslint }}"
npm install --no-save "eslint@${{ matrix.eslint }}" "@typescript-eslint/parser@${{ matrix.typescript-eslint == 8 && 8.17 || matrix.typescript-eslint }}" "babel-eslint@${{ matrix.babel-eslint }}"
env:
NPM_CONFIG_LEGACY_PEER_DEPS: true
NPM_CONFIG_LEGACY_PEER_DEPS: "${{ matrix.typescript-eslint >= 6 && 'false' || 'true' }}"
- run: npx ls-engines
- run: npm run unit-test
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v3.1.5

node:
name: 'node 18+'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/node-minors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,20 @@ jobs:
eslint: 5

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
after_install: |
npm install --no-save "eslint@${{ matrix.eslint }}" "@typescript-eslint/parser@${{ matrix.node-version >= 14 && '5' || (matrix.node-version >= 12 && '4' || (matrix.node-version >= 10 && '4.0' || (matrix.node-version >= 8 && '3' || '2'))) }}" "babel-eslint@${{ matrix.babel-eslint }}"
npm install --no-save "eslint@${{ matrix.eslint }}" "@typescript-eslint/parser@${{ matrix.node-version >= 18 && matrix.eslint >= 8 && '8.17' || (matrix.node-version >= 16 && matrix.eslint >= 7 && '6' || (matrix.node-version >= 14 && '5' || (matrix.node-version >= 12 && '4' || (matrix.node-version >= 10 && '4.0' || (matrix.node-version >= 8 && '3' || '2'))))) }}" "babel-eslint@${{ matrix.babel-eslint }}"
skip-ls-check: ${{ matrix.node-version < 10 && true || false }}
env:
NPM_CONFIG_LEGACY_PEER_DEPS: true
NPM_CONFIG_LEGACY_PEER_DEPS: "${{ matrix.node-version >= 16 && matrix.eslint >= 7 && 'false' || 'true' }}"
- run: npx ls-engines
if: ${{ matrix.node-version >= 12 }}
- run: npm run unit-test
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v3.1.5

node:
name: 'node 4 - 17'
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/node-pretest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ljharb/actions/node/install@main
name: 'nvm install lts/* && npm install'
with:
node-version: 'lts/*'
env:
NPM_CONFIG_LEGACY_PEER_DEPS: true
- run: npm run pretest

posttest:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ljharb/actions/node/install@main
name: 'nvm install lts/* && npm install'
with:
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
outputs:
is-new-version: ${{ steps.cpv.outputs.is-new-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag }}

Expand Down Expand Up @@ -63,7 +63,10 @@ jobs:
const pending = checkSuites.filter(({ status }) => status !== 'completed')

if (pending.length > 0) {
core.setFailed(`Some workflows for ${context.payload.inputs.tag} are still in-progress: ${JSON.stringify(pending)}`);
core.setFailed(`Some workflows for ${context.payload.inputs.tag} are still in-progress`);
pending.forEach(({ pull_requests, ...x }) => {
core.debug(JSON.stringify(x));
});
}

const result = await Promise.all(
Expand Down Expand Up @@ -94,16 +97,17 @@ jobs:
contents: read
id-token: write
steps:
- uses: step-security/harden-runner@v1
- uses: step-security/harden-runner@v2
with:
egress-policy: block
allowed-endpoints: >
github.com:443
nodejs.org:443
prod.api.stepsecurity.io:443
registry.npmjs.org:443
raw.githubusercontent.com:443

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag }}

Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ on: [pull_request_target]

jobs:
_:
name: "Automatic Rebase"

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: ljharb/rebase@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ljharb/actions/.github/workflows/rebase.yml@main
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
Loading
Loading