Skip to content

Commit cd07dd9

Browse files
committed
fix: Update lint:ci to check TypeScript files and add ESLint overrides
- Updated lint:ci command to include .ts and .tsx files (not just .js) - Added ESLint overrides to allow require() in config/build/test files - Added overrides for story files to allow empty functions in examples This fixes the CircleCI lint check failure by properly linting TypeScript files while allowing legitimate CommonJS usage in: - Config files (*.config.ts) - Build scripts (scripts/**) - Test utilities (test-utils/**) - Cypress plugins - Storybook stories Result: 0 errors, 6 warnings (all pre-existing and acceptable) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent eb95f82 commit cd07dd9

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.eslintrc.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,21 @@ module.exports = {
310310
files: ['components/nav.js', 'components/Footer/Footer.js'],
311311
rules: { 'jsx-a11y/anchor-is-valid': 'off' },
312312
},
313+
{
314+
files: [
315+
'*.config.ts',
316+
'scripts/**/*.ts',
317+
'test-utils/**/*.ts',
318+
'test-utils/**/*.tsx',
319+
'cypress/plugins/**/*.ts',
320+
'**/__stories__/**/*.tsx',
321+
'**/__stories__/**/*.ts',
322+
],
323+
rules: {
324+
'@typescript-eslint/no-var-requires': 'off',
325+
'@typescript-eslint/no-empty-function': 'off',
326+
},
327+
},
313328
],
314329
root: true,
315330
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"format": "prettier --write \"**/*\"",
1313
"format:md": "prettier --write \"**/*.md\"",
1414
"lint": "yarn lint:scripts && yarn lint:styles && yarn format:md",
15-
"lint:ci": "yarn eslint \"**/*.js\" && yarn stylelint \"**/*.css\"",
15+
"lint:ci": "yarn eslint \"**/*.{js,jsx,ts,tsx}\" && yarn stylelint \"**/*.css\"",
1616
"lint:scripts": "eslint --fix \"**/*.{js,jsx,ts,tsx}\"",
1717
"lint:styles": "stylelint --fix \"**/*.css\"",
1818
"postbuild": "next-sitemap",

0 commit comments

Comments
 (0)