Skip to content

Commit

Permalink
feat(react): rename jsx to react
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinspecker committed May 28, 2017
1 parent a9cc5dc commit 437e4c7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ node_modules/
ava.js
esnext.js
index.js
jsx.js
react.js
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ node_modules/
ava.js
esnext.js
index.js
jsx.js
react.js
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,20 @@ Depends on [eslint-plugin-ava](https://github.com/sindresorhus/eslint-plugin-ava
}
```

## JSX usage
## React usage

Dependes on [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react)

```javascript
{
"extends": "dustinspecker/jsx",
"extends": "dustinspecker/react",
"plugins": [
"react"
]
}
```

All options from [ava.js](ava.js), [index.js](index.js), [esnext.js](esnext.js), and [jsx.js](jsx.js) may be overridden in your .eslintrc file.
All options from [ava.js](ava.js), [index.js](index.js), [esnext.js](esnext.js), and [react.js](react.js) may be overridden in your .eslintrc file.

## LICENSE
MIT © [Dustin Specker](https://github.com/dustinspecker)
File renamed without changes.
14 changes: 7 additions & 7 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ava from '../ava'
import config from '../'
import esnext from '../esnext'
import isPlainObj from 'is-plain-obj'
import jsx from '../jsx'
import react from '../react'
import test from 'ava'

test('ava should set up ava plugin', t => {
Expand Down Expand Up @@ -34,14 +34,14 @@ test('esnext should have ecmaFeatures', t => {
t.truthy(isPlainObj(esnext.ecmaFeatures))
})

test('jsx should have browser env', t => {
t.truthy(jsx.env.browser)
test('react should have browser env', t => {
t.truthy(react.env.browser)
})

test('jsx should set up react plugin', t => {
t.truthy(jsx.plugins.indexOf('react') > -1)
test('react should set up react plugin', t => {
t.truthy(react.plugins.indexOf('react') > -1)
})

test('jsx should have jsx ecmaFeature', t => {
t.truthy(jsx.parserOptions.ecmaFeatures.jsx)
test('react should have react ecmaFeature', t => {
t.truthy(react.parserOptions.ecmaFeatures.jsx)
})

0 comments on commit 437e4c7

Please sign in to comment.