diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..43c97e7 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false diff --git a/.travis.yml b/.travis.yml index 00506a9..ad323b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,4 +2,8 @@ cache: npm: false language: node_js node_js: - - lts/* + - 8.10 + - 8 + - 10 + - 12 + - 14 diff --git a/README.md b/README.md index 87a3221..0cb80cf 100644 --- a/README.md +++ b/README.md @@ -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. @@ -30,9 +33,11 @@ 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 @@ -40,14 +45,17 @@ 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') @@ -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 @@ -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 diff --git a/package.json b/package.json index 3d75822..3c27249 100644 --- a/package.json +++ b/package.json @@ -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 (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", @@ -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 (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" }