Skip to content

chore: add ESLint setup - #2585

Open
nschonni wants to merge 1 commit into
nodejs:mainfrom
nschonni:eslint-setup
Open

chore: add ESLint setup#2585
nschonni wants to merge 1 commit into
nodejs:mainfrom
nschonni:eslint-setup

Conversation

@nschonni

Copy link
Copy Markdown
Member

Description

Generated the config and ignored the one use that was still flagged inline.

Motivation and Context

Testing Details

Example Output(if appropriate)

Types of changes

  • Documentation
  • Version change (Update, remove or add more Node.js versions)
  • Variant change (Update, remove or add more variants, or versions of variants)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (none of the above)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • All new and existing tests passed.

@MikeMcC399 MikeMcC399 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One non-blocking suggestion.

Comment thread package.json
Comment on lines +11 to +12
"format:javascript": "eslint . --fix",
"format:javascript:check": "eslint .",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"format:javascript": "eslint . --fix",
"format:javascript:check": "eslint .",
"format:javascript": "eslint --fix",
"format:javascript:check": "eslint",

In ESLint 10

You can also omit the file arguments and ESLint will use "."

Optional, non-blocking suggestion.

@MikeMcC399

Copy link
Copy Markdown
Contributor

BTW: Whilst I was looking for a replacement for eclint, I also set up a full ESLint example. I just rebased that and pushed to https://github.com/MikeMcC399/docker-node/tree/migrate/eslint for comparison.

I don't want to suggest this alternative for a PR or merge, since I think the current setup is good enough as it is. It is just a Proof of Concept development to share with you.

I'm OK with adding your PR which just does a base ESLint JS linting without additional plugins like stylistic.

Prettier and @stylistic/eslint-plugin disagree about formatting, so it's not practical to use both on the same files.

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.

2 participants