Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ cache:
npm: false
language: node_js
node_js:
- lts/*
- 8.10
- 8
- 10
- 12
- 14
33 changes: 22 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,21 @@
[standard-url]: https://standardjs.com

## Overview

Wrap your own eslint rules in a easy-to-use command line tool and/or a JS module.

## Install
```

```sh
npm install standard-engine
```

## Who is using `standard-engine`?

Here is a list of packages using `standard-engine`. Dive into them for ideas!

- [standard](https://standardjs.com) - JavaScript Standard Style.
- [semistandard](https://github.com/Flet/semistandard) - Its `standard` with semicolons sprinkled on top.
- [semistandard](https://github.com/Flet/semistandard) - Its `standard` with semicolons sprinkled on top.
- [happiness](https://github.com/JedWatson/happiness) - JavaScript Happiness Style (semicolons and tabs)
- [doublestandard](https://github.com/flet/doublestandard) - Require TWO semicolons at the end of every line!
- [strict-standard](https://github.com/denis-sokolov/strict-standard) - Standard Style with strict error checking.
Expand All @@ -30,24 +33,29 @@ Here is a list of packages using `standard-engine`. Dive into them for ideas!
Did you make your own? Create a pull request and we will add it to the README!

## Usage

Create the files below and fill in your own values for `options.js`.

**index.js**
### `index.js`

```js
// programmatic usage
var Linter = require('standard-engine').linter
var opts = require('./options.js')
module.exports = new Linter(opts)
```

**cli.js**
### `cli.js`

```js
#!/usr/bin/env node

var opts = require('../options.js')
require('standard-engine').cli(opts)
```
**options.js**

### `options.js`

```js
var eslint = require('eslint')
var path = require('path')
Expand All @@ -70,14 +78,17 @@ module.exports = {

Additionally an optional `parseOpts()` function can be provided. See below for details.

**eslintrc.json**
Put all your .eslintrc rules in this file. A good practice is to create an [ESLint Shareable Config](http://eslint.org/docs/developer-guide/shareable-configs) and extend it, but its not required:
### `eslintrc.json`

Put all your .eslintrc rules in this file. A good practice is to create an [ESLint Shareable Config](http://eslint.org/docs/developer-guide/shareable-configs) and extend it, but its not required:

```js
{
// pretend that the package eslint-config-pocketlint exists!
"extends": ["pocketlint"]
}
```

Take a look at [eslint-config-standard](https://github.com/feross/eslint-config-standard) as an example, or if you want to extend/mutate `standard`, see [eslint-config-semistandard](https://github.com/flet/eslint-config-semistandard).

## Editor Integrations
Expand Down Expand Up @@ -282,10 +293,10 @@ Modify and return `opts`, or return a new object with the options that are to be

The following options are provided in the `opts` object, and must be on the returned object:

* `ignore`: array of file globs to ignore
* `cwd`: string, the current working directory
* `fix`: boolean, whether to automatically fix problems
* `eslintConfig`: object, the options passed to [ESLint's `CLIEngine`](http://eslint.org/docs/developer-guide/nodejs-api#cliengine)
- `ignore`: array of file globs to ignore
- `cwd`: string, the current working directory
- `fix`: boolean, whether to automatically fix problems
- `eslintConfig`: object, the options passed to [ESLint's `CLIEngine`](http://eslint.org/docs/developer-guide/nodejs-api#cliengine)

## API Usage

Expand Down
56 changes: 24 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,7 @@
{
"name": "standard-engine",
"description": "Wrap your standards in a tortilla and cover it in special sauce.",
"version": "12.0.0",
"author": "Dan Flettre <flettre@gmail.com> (http://twitter.com/flettre/)",
"bugs": {
"url": "https://github.com/flet/standard-engine/issues"
},
"dependencies": {
"deglob": "^4.0.0",
"get-stdin": "^7.0.0",
"minimist": "^1.1.0",
"pkg-conf": "^3.1.0"
},
"devDependencies": {
"babel-eslint": "^10.0.2",
"cross-spawn": "^7.0.0",
"eslint": "*",
"eslint-config-standard": "*",
"eslint-config-standard-jsx": "*",
"eslint-plugin-import": "*",
"eslint-plugin-node": "*",
"eslint-plugin-promise": "*",
"eslint-plugin-react": "*",
"eslint-plugin-standard": "*",
"mkdirp": "^0.5.0",
"standard": "*",
"tape": "^4.0.0"
},
"homepage": "https://github.com/flet/standard-engine",
"description": "Wrap your standards in a tortilla and cover it in special sauce.",
"keywords": [
"JavaScript Standard Style",
"check",
Expand All @@ -53,15 +27,33 @@
"style linter",
"verify"
],
"repository": "standard/standard-engine",
"license": "MIT",
"main": "index.js",
"repository": {
"type": "git",
"url": "git://github.com/flet/standard-engine.git"
},
"author": "Dan Flettre <flettre@gmail.com> (http://twitter.com/flettre/)",
"scripts": {
"test": "standard && tape test/clone.js test/api.js"
},
"dependencies": {
"deglob": "^4.0.1",
"get-stdin": "^7.0.0",
"minimist": "^1.2.5",
"pkg-conf": "^3.1.0"
},
"devDependencies": {
"babel-eslint": "^10.1.0",
"cross-spawn": "^7.0.2",
"eslint": "^6.8.0",
"eslint-config-standard": "^14.1.1",
"eslint-config-standard-jsx": "^8.1.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-standard": "^4.0.1",
"mkdirp": "^0.5.5",
"standard": "^14.3.3",
"tape": "^5.0.0"
},
"engines": {
"node": ">=8.10"
}
Expand Down