Skip to content

Conversation

@hairmare
Copy link
Member

@hairmare hairmare commented Jan 25, 2025

Configure eslint to run against the code. Based on the Next.JS reference configuration. eslint does static testing, it's raison d'être is to ensure that the quality of code matches what can be reasonably expected from a modern next application. This improves the security, readability, and maintainability of the code.

Since the next/ folder was initialized with typescript support, we configure eslint for typescript.

note: A high amount of eslint complaints is expected when initially adopting eslint. Most likely they consist of a ton of low hanging fruit that can be easily auto-fixed.

@hairmare hairmare marked this pull request as draft January 25, 2025 11:20
@hairmare hairmare force-pushed the chore/eslint-configuration branch from 5b88139 to 650fbc6 Compare January 26, 2025 09:45
@hairmare hairmare force-pushed the chore/eslint-configuration branch from 650fbc6 to 4e96a3f Compare February 4, 2025 17:54
@hairmare hairmare force-pushed the chore/eslint-configuration branch from 4e96a3f to c182716 Compare February 16, 2025 09:04
@hairmare hairmare force-pushed the chore/eslint-configuration branch from c182716 to 54fddb3 Compare March 12, 2025 20:20
@hairmare hairmare force-pushed the chore/eslint-configuration branch from 54fddb3 to afcb647 Compare April 19, 2025 15:21
@hairmare hairmare force-pushed the chore/eslint-configuration branch from afcb647 to 41bf8d0 Compare May 28, 2025 20:07
@hairmare hairmare force-pushed the chore/eslint-configuration branch 3 times, most recently from edce36c to 4df5372 Compare October 19, 2025 02:35
@hairmare hairmare force-pushed the chore/eslint-configuration branch from 4df5372 to de2a98b Compare October 28, 2025 22:01
@hairmare hairmare force-pushed the chore/eslint-configuration branch from de2a98b to 7c85f50 Compare November 11, 2025 19:29
@hairmare
Copy link
Member Author

The linter is currently failing (and need fixing before this makes sense):

$ /home/runner/work/website-stack/website-stack/next/node_modules/.bin/next lint --output-file ../next-eslint_report.json --format json
Converting circular structure to JSON
    --> starting at object with constructor 'Object'
    |     property 'configs' -> object with constructor 'Object'
    |     property 'flat' -> object with constructor 'Object'
    |     ...
    |     property 'plugins' -> object with constructor 'Object'
    --- property 'react' closes the circle
Referenced from: /home/runner/work/website-stack/website-stack/next/.eslintrc.json

@hairmare hairmare force-pushed the chore/eslint-configuration branch from 7c85f50 to fc001c5 Compare November 25, 2025 22:51
* Run `next lint` on pull requests
@hairmare hairmare force-pushed the chore/eslint-configuration branch from fc001c5 to 1e0cda5 Compare December 29, 2025 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code scanning with eslint

2 participants