Skip to content

Commit da5083c

Browse files
committed
Apply eslint scaffolded files
1 parent 856beea commit da5083c

File tree

4 files changed

+108
-25
lines changed

4 files changed

+108
-25
lines changed

.gitignore

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,9 @@
1-
# Logs
2-
logs
3-
*.log
4-
5-
# Runtime data
6-
pids
7-
*.pid
8-
*.seed
9-
10-
# Directory for instrumented libs generated by jscoverage/JSCover
11-
lib-cov
12-
13-
# Coverage directory used by tools like istanbul
14-
coverage
15-
16-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17-
.grunt
18-
19-
# node-waf configuration
20-
.lock-wscript
21-
22-
# Compiled binary addons (http://nodejs.org/api/addons.html)
23-
build/Release
24-
251
# Dependency directory
262
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
273
node_modules
4+
5+
# IntelliJ
6+
.idea
7+
8+
# OS files
9+
.DS_Store

README.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,51 @@
11
# eslint-plugin-react-props
2-
a collection of plugins for react props
2+
3+
a collection of prop type rules
4+
5+
## Installation
6+
7+
You'll first need to install [ESLint](http://eslint.org):
8+
9+
```
10+
$ npm i eslint --save-dev
11+
```
12+
13+
Next, install `eslint-plugin-react-props`:
14+
15+
```
16+
$ npm install eslint-plugin-react-props --save-dev
17+
```
18+
19+
**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-react-props` globally.
20+
21+
## Usage
22+
23+
Add `react-props` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
24+
25+
```json
26+
{
27+
"plugins": [
28+
"react-props"
29+
]
30+
}
31+
```
32+
33+
34+
Then configure the rules you want to use under the rules section.
35+
36+
```json
37+
{
38+
"rules": {
39+
"react-props/rule-name": 2
40+
}
41+
}
42+
```
43+
44+
## Supported Rules
45+
46+
* Fill in provided rules here
47+
48+
49+
50+
51+

lib/index.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* @fileoverview a collection of prop type rules
3+
* @author Craig
4+
* @copyright 2015 Craig. All rights reserved.
5+
* See LICENSE file in root directory for full license.
6+
*/
7+
"use strict";
8+
9+
//------------------------------------------------------------------------------
10+
// Requirements
11+
//------------------------------------------------------------------------------
12+
13+
var requireIndex = require("requireindex");
14+
15+
//------------------------------------------------------------------------------
16+
// Plugin Definition
17+
//------------------------------------------------------------------------------
18+
19+
20+
// import all rules in lib/rules
21+
module.exports.rules = requireIndex("./rules");
22+
23+
24+

package.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "eslint-plugin-react-props",
3+
"version": "0.0.1",
4+
"description": "a collection of prop type rules",
5+
"keywords": [
6+
"eslint",
7+
"eslintplugin",
8+
"eslint-plugin",
9+
"react",
10+
"props",
11+
"prop-types"
12+
],
13+
"author": "Craig",
14+
"main": "lib/index.js",
15+
"scripts": {
16+
"test": "mocha"
17+
},
18+
"dependencies": {
19+
"requireindex": "~1.1.0"
20+
},
21+
"devDependencies": {
22+
"eslint": "~1.2.0"
23+
},
24+
"engines": {
25+
"node": ">=0.10.0"
26+
},
27+
"license": "ISC"
28+
}

0 commit comments

Comments
 (0)