-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Change log | ||
|
||
## v0.1.0 | ||
|
||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# `@herp-inc/eslint-config-jsx` [![npm](https://img.shields.io/npm/v/@herp-inc/eslint-config-jsx)](https://www.npmjs.com/package/@herp-inc/eslint-config-jsx) | ||
|
||
[ESLint shareable config](https://eslint.org/docs/developer-guide/shareable-configs) for [JSX](https://facebook.github.io/jsx/) environments | ||
|
||
This package is intended to be used along with [`@herp-inc/eslint-config`](https://www.npmjs.com/package/@herp-inc/eslint-config). | ||
|
||
## Installation | ||
|
||
Note that the following packages are peer dependencies of this library, which need to be installed separately. | ||
|
||
| Package | Version | | ||
| -------------------------------------------------------------------------------- | --------- | | ||
| [`eslint`](https://www.npmjs.com/package/eslint) | `8` | | ||
| [`eslint-plugin-jsx-a11y`](https://www.npmjs.com/package/eslint-plugin-jsx-a11y) | `^6.5.0` | | ||
| [`eslint-plugin-react`](https://www.npmjs.com/package/eslint-plugin-react) | `^7.27.0` | | ||
|
||
### Using [npm](https://www.npmjs.com/) | ||
|
||
```sh | ||
$ npm install --save-dev @herp-inc/eslint-config-jsx | ||
``` | ||
|
||
### Using [yarn](https://yarnpkg.com/) | ||
|
||
```sh | ||
$ yarn add --dev @herp-inc/eslint-config-jsx | ||
``` | ||
|
||
## Usage | ||
|
||
Add `@herp-inc/eslint-config-jsx` to the `extends` section of your [ESLint configuration](http://eslint.org/docs/user-guide/configuring). | ||
|
||
```json | ||
{ | ||
"extends": ["@herp-inc"], | ||
"overrides": [ | ||
{ | ||
"extends": ["@herp-inc/eslint-config-jsx"], | ||
"files": ["*.tsx"] | ||
} | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
extends: ['plugin:jsx-a11y/recommended'], | ||
plugins: ['jsx-a11y', 'react'], | ||
rules: { | ||
'react/button-has-type': 'error', | ||
'react/jsx-no-comment-textnodes': 'error', | ||
'react/jsx-no-useless-fragment': 'error', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "@herp-inc/eslint-config-jsx", | ||
"version": "0.1.0", | ||
"description": "ESLint shareable config for JSX environments", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/herp-inc/eslint-config" | ||
}, | ||
"keywords": [ | ||
"eslint", | ||
"eslintconfig", | ||
"jsx" | ||
], | ||
"author": "HERP, Inc.", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/herp-inc/eslint-config/issues" | ||
}, | ||
"homepage": "https://github.com/herp-inc/eslint-config", | ||
"peerDependencies": { | ||
"eslint": "8", | ||
"eslint-plugin-jsx-a11y": "^6.5.0", | ||
"eslint-plugin-react": "^7.27.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"workspaces": [ | ||
"base", | ||
"jest", | ||
"jsx", | ||
"node" | ||
], | ||
"devDependencies": { | ||
|