Skip to content

Commit 8b0ae4f

Browse files
New: initial commit
0 parents  commit 8b0ae4f

File tree

8 files changed

+152
-0
lines changed

8 files changed

+152
-0
lines changed

Diff for: .eslintrc.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends:
2+
- not-an-aardvark/node
3+
- plugin:node/recommended
4+
plugins:
5+
- node
6+
root: true
7+
rules:
8+
require-jsdoc: error

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

Diff for: .travis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: node_js
2+
node_js:
3+
- '4'
4+
- '6'
5+
- '7'

Diff for: LICENSE.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
The MIT License (MIT)
2+
=====================
3+
4+
Copyright © 2016 Teddy Katz
5+
6+
Permission is hereby granted, free of charge, to any person
7+
obtaining a copy of this software and associated documentation
8+
files (the “Software”), to deal in the Software without
9+
restriction, including without limitation the rights to use,
10+
copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the
12+
Software is furnished to do so, subject to the following
13+
conditions:
14+
15+
The above copyright notice and this permission notice shall be
16+
included in all copies or substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
19+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25+
OTHER DEALINGS IN THE SOFTWARE.

Diff for: README.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# eslint-plugin-eslint-plugin
2+
3+
An ESLint plugin for linting ESLint plugins
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-eslint-plugin`:
14+
15+
```
16+
$ npm install eslint-plugin-eslint-plugin --save-dev
17+
```
18+
19+
**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-eslint-plugin` globally.
20+
21+
## Usage
22+
23+
Add `eslint-plugin` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
24+
25+
```json
26+
{
27+
"plugins": [
28+
"eslint-plugin"
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+
"eslint-plugin/new-report-api": "error"
40+
}
41+
}
42+
```
43+
44+
## Supported Rules
45+
46+
* None yet

Diff for: lib/index.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* @fileoverview An ESLint plugin for linting ESLint plugins
3+
* @author Teddy Katz
4+
*/
5+
6+
'use strict';
7+
8+
// ------------------------------------------------------------------------------
9+
// Requirements
10+
// ------------------------------------------------------------------------------
11+
12+
const fs = require('fs');
13+
const path = require('path');
14+
15+
// ------------------------------------------------------------------------------
16+
// Plugin Definition
17+
// ------------------------------------------------------------------------------
18+
19+
20+
// import all rules in lib/rules
21+
module.exports.rules = fs
22+
.readdirSync(`${__dirname}/rules`)
23+
.filter(fileName => fileName.endsWith('.js') && /^[^._]/.test(fileName))
24+
.map(fileName => fileName.replace(/\.js$/, ''))
25+
.reduce((rules, ruleName) => Object.assign(rules, { [ruleName]: require(path.join(__dirname, 'rules', ruleName)) }), {});

Diff for: package.json

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "eslint-plugin-eslint-plugin",
3+
"version": "0.0.0",
4+
"description": "An ESLint plugin for linting ESLint plugins",
5+
"author": "Teddy Katz",
6+
"main": "lib/index.js",
7+
"license": "MIT",
8+
"scripts": {
9+
"lint": "eslint .",
10+
"pretest": "npm run lint",
11+
"test": "mocha tests --recursive"
12+
},
13+
"files": [
14+
"lib/"
15+
],
16+
"keywords": [
17+
"eslint",
18+
"eslintplugin",
19+
"eslint-plugin"
20+
],
21+
"repository": {
22+
"type": "git",
23+
"url": "git+https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin.git"
24+
},
25+
"bugs": {
26+
"url": "https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/issues"
27+
},
28+
"homepage": "https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin#readme",
29+
"dependencies": {},
30+
"devDependencies": {
31+
"eslint": "^3.12.1",
32+
"eslint-config-not-an-aardvark": "^2.0.0",
33+
"eslint-plugin-node": "^3.0.5",
34+
"mocha": "^2.4.5"
35+
},
36+
"peerDependencies": {
37+
"eslint": "^3.12.1"
38+
},
39+
"engines": {
40+
"node": ">=4.0.0"
41+
}
42+
}

Diff for: tests/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)