Skip to content

Configure ESLint to check JSX files#3913

Merged
aduth merged 2 commits intomasterfrom
aduth-lint-jsx
Jul 14, 2020
Merged

Configure ESLint to check JSX files#3913
aduth merged 2 commits intomasterfrom
aduth-lint-jsx

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Jul 14, 2020

Related: LG-3023, #3903

By default, both ESLint and CodeClimate will only check files with .js file extension. This would prevent legitimate linting errors in .jsx files from being flagged. The changes proposed here reconfigure CodeClimate to check .jsx files, and introduces a new NPM script for linting, which includes JSX file checking.

Why: As a developer, I want linting on my JSX files so that I can be certain of authoring quality code.

Note that with the changes in #3903 to use eslint-config-airbnb instead of eslint-config-airbnb-base, it's expected ESLint should already be configured to handle JSX syntax (see base config source).

See CodeClimate documentation: https://docs.codeclimate.com/docs/eslint#extensions
See ESLint CLI documentation: https://eslint.org/docs/user-guide/command-line-interface#options

aduth added 2 commits July 14, 2020 08:21
**Why**: As a developer, I want linting on my JSX files so that I can be certain of authoring quality code.

See: https://docs.codeclimate.com/docs/eslint#extensions
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

@aduth aduth merged commit aa84920 into master Jul 14, 2020
@aduth aduth deleted the aduth-lint-jsx branch July 14, 2020 17:02
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