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 CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm run type-check # TypeScript without emitting files
npm test # Vitest unit tests
npx vitest run --coverage # what CI runs: tests plus the coverage gate
npm run check-links # internal docs links
npm run lint # ESLint for src/
npm run lint # ESLint for src/, scripts/ and netlify/
npm run build # production build and doc-sync scripts
```

Expand Down
1 change: 1 addition & 0 deletions changelog.d/changed-lint-scripts-netlify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Run ESLint over `scripts/` and `netlify/` as well as `src/` (`npm run lint`), parse `.mts` files with the TypeScript parser, and allow `console` output in those CLI/serverless entry points (#218).
10 changes: 9 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default [
},
js.configs.recommended,
{
files: ["**/*.{js,jsx,ts,tsx}"],
files: ["**/*.{js,jsx,ts,tsx,mts}"],
languageOptions: {
parser: typescriptEslintParser,
parserOptions: {
Expand Down Expand Up @@ -120,4 +120,12 @@ export default [
"jsx-a11y/no-static-element-interactions": "warn",
},
},
{
// Build/sync scripts and the Netlify function are CLI and serverless
// entry points: console.log is their output channel, not a leftover.
files: ["scripts/**/*.{js,ts}", "netlify/**/*.{js,ts,mts}"],
rules: {
"no-console": "off",
},
},
];
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"prebuild": "(tsx scripts/update-meeting-recordings.ts || echo \"meeting recordings refresh unavailable - using committed data\") && (tsx scripts/sync-hive-docs.ts || echo \"hive docs sync unavailable - using committed content\") && (tsx scripts/sync-sibling-docs.ts || echo \"sibling docs sync unavailable - using committed content\") && tsx scripts/generate-shared-config.ts",
"build": "next build",
"start": "next start",
"lint": "eslint src/",
"lint:fix": "eslint src/ --fix",
"lint": "eslint src/ scripts/ netlify/",
"lint:fix": "eslint src/ scripts/ netlify/ --fix",
"lint:md": "markdownlint-cli2 \"README.md\" \"CONTRIBUTING.md\" \"docs/**/*.{md,mdx}\" \"src/**/*.{md,mdx}\"",
"sync-hive-docs": "tsx scripts/sync-hive-docs.ts",
"check-links": "tsx scripts/check-internal-links.ts",
Expand Down
Loading