Skip to content

Commit 8f7af85

Browse files
authored
Merge pull request #42612 from github/repo-sync
Repo sync
2 parents be96981 + d087bfe commit 8f7af85

File tree

17 files changed

+890
-43
lines changed

17 files changed

+890
-43
lines changed

.github/workflows/link-check-external.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
4444
- name: Upload report artifact
4545
if: failure()
46-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
46+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
4747
with:
4848
name: external-link-report
4949
path: artifacts/external-link-report.*

.github/workflows/link-check-internal.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090

9191
- name: Upload report artifact
9292
if: always()
93-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
93+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
9494
with:
9595
name: link-report-${{ matrix.version }}-${{ matrix.language }}
9696
path: artifacts/link-report-*.md
@@ -113,7 +113,7 @@ jobs:
113113
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
114114

115115
- name: Download all artifacts
116-
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
116+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
117117
with:
118118
path: reports
119119
pattern: link-report-*

.github/workflows/link-check-on-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737

3838
- name: Get changed files
3939
id: changed-files
40-
uses: tj-actions/changed-files@48d8f15b2aaa3d255ca5af3eba4870f807ce6b3c # v45
40+
uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v45
4141
with:
4242
files: |
4343
content/**/*.md

eslint.config.ts

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import noOnlyTests from 'eslint-plugin-no-only-tests'
1212
import prettierPlugin from 'eslint-plugin-prettier'
1313
import prettier from 'eslint-config-prettier'
1414
import globals from 'globals'
15+
import customRules from 'eslint-plugin-custom-rules'
1516

1617
export default [
1718
{
@@ -57,6 +58,7 @@ export default [
5758
'@typescript-eslint': tseslint,
5859
'primer-react': primerReact,
5960
'jsx-a11y': jsxA11y,
61+
'custom-rules': customRules,
6062
},
6163
rules: {
6264
// ESLint recommended rules
@@ -98,6 +100,77 @@ export default [
98100
// Disabled rules to review
99101
'no-console': 'off', // 800+
100102
'@typescript-eslint/no-explicit-any': 'off',
103+
104+
// Custom rules (disabled by default for now)
105+
'custom-rules/use-custom-logger': 'off',
106+
},
107+
},
108+
109+
// Configuration for eslint-rules directory (CommonJS JavaScript files)
110+
{
111+
files: ['src/eslint-rules/**/*.js'],
112+
languageOptions: {
113+
ecmaVersion: 2022,
114+
sourceType: 'script',
115+
globals: {
116+
...globals.node,
117+
...globals.commonjs,
118+
...globals.es2020,
119+
},
120+
},
121+
plugins: {
122+
github,
123+
import: importPlugin,
124+
'eslint-comments': eslintComments,
125+
filenames,
126+
'no-only-tests': noOnlyTests,
127+
prettier: prettierPlugin,
128+
},
129+
rules: {
130+
// ESLint recommended rules
131+
...js.configs.recommended.rules,
132+
133+
// GitHub plugin recommended rules
134+
...github.configs.recommended.rules,
135+
136+
// Import plugin error rules
137+
...importPlugin.configs.errors.rules,
138+
139+
// Allow CommonJS in eslint rules
140+
'import/no-commonjs': 'off',
141+
142+
// Overrides
143+
'import/extensions': ['error', { json: 'always' }],
144+
'no-empty': ['error', { allowEmptyCatch: true }],
145+
'prefer-const': ['error', { destructuring: 'all' }],
146+
147+
// Disabled rules
148+
'i18n-text/no-en': 'off',
149+
'filenames/match-regex': 'off',
150+
camelcase: 'off',
151+
'no-console': 'off',
152+
},
153+
},
154+
155+
// Disable custom logger rule for logger implementation itself
156+
{
157+
files: ['src/observability/logger/**/*.{ts,js}'],
158+
rules: {
159+
'custom-rules/use-custom-logger': 'off',
160+
},
161+
},
162+
163+
// Override for scripts, tests, workflows, content-linter, and React files (disable custom logger rule)
164+
{
165+
files: [
166+
'**/scripts/**/*.{ts,js}',
167+
'**/tests/**/*.{ts,js}',
168+
'src/workflows/**/*.{ts,js}',
169+
'src/content-linter/**/*.{ts,js}',
170+
'**/*.{tsx,jsx}',
171+
],
172+
rules: {
173+
'custom-rules/use-custom-logger': 'off',
101174
},
102175
},
103176

0 commit comments

Comments
 (0)