Skip to content

Use ESLint and Prettier instead of StandardJs#197

Open
KevinNovak wants to merge 1 commit intoevansiroky:masterfrom
KevinNovak:feature/eslint-prettier
Open

Use ESLint and Prettier instead of StandardJs#197
KevinNovak wants to merge 1 commit intoevansiroky:masterfrom
KevinNovak:feature/eslint-prettier

Conversation

@KevinNovak
Copy link

@KevinNovak KevinNovak commented Aug 23, 2025

Installed ESLint and Prettier to replace StandardJs for linting/formatting.

  • Installed eslint
  • Fix linting issues
    • Mostly prefixing unused variables with underscore _ so they get ignored by eslint
    • A few error catch blocks weren't using their caught errors
  • Installed prettier
  • Adjusted prettier rules to match the current style
  • Configured prettier to auto-format files on save when using VSCode
  • Run prettier format on all files
    • Mostly whitespace changes
    • Markdown files show a big change because of prettier's rules
      • - instead of * for unordered lists of items
      • No need to add header characters #### at the end of headers

The following scripts can now be used:

  • npm run format - Check for format issues with prettier
  • npm run format:fix - Auto-format all files
  • npm run lint - Check for lint issues with eslint
  • npm run lint:fix - Auto-fix any possible issues with eslint

@evansiroky
Copy link
Owner

Hi there, thanks for the interest in this repo and library. I have 2 items to note here:

  1. The package.json's test command has been rewritten to simply call node lint-json.js and not call linting or formatting. Therefore, the continuous integration would not check for formatting or linting. It seems like linting and formatting should be called during CI checks.
  2. I am wondering why this change is needed. I have been a bit out of the loop with JavaScript formatting and linting since I haven't regularly done JavaScript for the past 4 years. Has the JavaScript community shifted entirely away from Standard to eslint + prettier? Does the PR accomplish something specific to warrant reformatting hundreds of lines of code and adding 4 config 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