Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/link-check-external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

- name: Upload report artifact
if: failure()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: external-link-report
path: artifacts/external-link-report.*
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/link-check-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:

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

- name: Download all artifacts
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
path: reports
pattern: link-report-*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/link-check-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@48d8f15b2aaa3d255ca5af3eba4870f807ce6b3c # v45
uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v45
with:
files: |
content/**/*.md
Expand Down
73 changes: 73 additions & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import noOnlyTests from 'eslint-plugin-no-only-tests'
import prettierPlugin from 'eslint-plugin-prettier'
import prettier from 'eslint-config-prettier'
import globals from 'globals'
import customRules from 'eslint-plugin-custom-rules'

export default [
{
Expand Down Expand Up @@ -57,6 +58,7 @@ export default [
'@typescript-eslint': tseslint,
'primer-react': primerReact,
'jsx-a11y': jsxA11y,
'custom-rules': customRules,
},
rules: {
// ESLint recommended rules
Expand Down Expand Up @@ -98,6 +100,77 @@ export default [
// Disabled rules to review
'no-console': 'off', // 800+
'@typescript-eslint/no-explicit-any': 'off',

// Custom rules (disabled by default for now)
'custom-rules/use-custom-logger': 'off',
},
},

// Configuration for eslint-rules directory (CommonJS JavaScript files)
{
files: ['src/eslint-rules/**/*.js'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'script',
globals: {
...globals.node,
...globals.commonjs,
...globals.es2020,
},
},
plugins: {
github,
import: importPlugin,
'eslint-comments': eslintComments,
filenames,
'no-only-tests': noOnlyTests,
prettier: prettierPlugin,
},
rules: {
// ESLint recommended rules
...js.configs.recommended.rules,

// GitHub plugin recommended rules
...github.configs.recommended.rules,

// Import plugin error rules
...importPlugin.configs.errors.rules,

// Allow CommonJS in eslint rules
'import/no-commonjs': 'off',

// Overrides
'import/extensions': ['error', { json: 'always' }],
'no-empty': ['error', { allowEmptyCatch: true }],
'prefer-const': ['error', { destructuring: 'all' }],

// Disabled rules
'i18n-text/no-en': 'off',
'filenames/match-regex': 'off',
camelcase: 'off',
'no-console': 'off',
},
},

// Disable custom logger rule for logger implementation itself
{
files: ['src/observability/logger/**/*.{ts,js}'],
rules: {
'custom-rules/use-custom-logger': 'off',
},
},

// Override for scripts, tests, workflows, content-linter, and React files (disable custom logger rule)
{
files: [
'**/scripts/**/*.{ts,js}',
'**/tests/**/*.{ts,js}',
'src/workflows/**/*.{ts,js}',
'src/content-linter/**/*.{ts,js}',
'**/*.{tsx,jsx}',
],
rules: {
'custom-rules/use-custom-logger': 'off',
},
},

Expand Down
Loading
Loading