Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

standard

Package Overview
Dependencies
Maintainers
16
Versions
185
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

standard - npm Package Compare versions

Comparing version 16.0.4 to 17.1.0

bin/cmd.cjs

6

index.js
/*! standard. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
const Linter = require('standard-engine').linter
const opts = require('./options')
import { StandardEngine } from 'standard-engine'
import options from './lib/options.js'
module.exports = new Linter(opts)
export default new StandardEngine(options)
{
"name": "standard",
"description": "JavaScript Standard Style",
"version": "16.0.4",
"version": "17.1.0",
"author": {

@@ -11,4 +11,5 @@ "name": "Feross Aboukhadijeh",

"bin": {
"standard": "bin/cmd.js"
"standard": "bin/cmd.cjs"
},
"type": "module",
"bugs": {

@@ -18,22 +19,23 @@ "url": "https://github.com/standard/standard/issues"

"dependencies": {
"eslint": "~7.18.0",
"eslint-config-standard": "16.0.3",
"eslint-config-standard-jsx": "10.0.0",
"eslint-plugin-import": "~2.24.2",
"eslint-plugin-node": "~11.1.0",
"eslint-plugin-promise": "~5.1.0",
"eslint-plugin-react": "~7.25.1",
"standard-engine": "^14.0.1"
"eslint": "^8.41.0",
"eslint-config-standard": "17.1.0",
"eslint-config-standard-jsx": "^11.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.32.2",
"standard-engine": "^15.0.0",
"version-guard": "^1.1.1"
},
"devDependencies": {
"cross-spawn": "^7.0.3",
"hallmark": "^3.1.0",
"minimist": "^1.2.5",
"hallmark": "^4.2.0",
"minimist": "^1.2.8",
"run-parallel-limit": "^1.1.0",
"run-series": "^1.1.9",
"simple-get": "^4.0.0",
"tape": "^5.3.1"
"simple-get": "^4.0.1",
"tape": "^5.6.3"
},
"engines": {
"node": ">=10.12.0"
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},

@@ -74,3 +76,3 @@ "homepage": "https://standardjs.com",

"test": "npm run test-internal && npm run test-external",
"test-internal": "./bin/cmd.js --verbose && tape test/*.js",
"test-internal": "./bin/cmd.cjs --verbose && tape test/*.js",
"test-external": "tape test/external/*.js",

@@ -77,0 +79,0 @@ "update-authors": "./tools/update-authors.sh && hallmark --fix AUTHORS.md"

@@ -20,3 +20,3 @@ <h1 align="center">

<h5 align="center">
Sponsored by&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://wormhole.app/?utm_medium=sponsorship&utm_source=standard&utm_campaign=feross"><img src="https://cdn.rawgit.com/standard/standard/master/docs/logos/wormhole.png" alt="Wormhole" height=50 valign="middle"></a>
Sponsored by&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://socket.dev"><img src="https://cdn.rawgit.com/standard/standard/master/docs/logos/socket.png" alt="Socket – Supply Chain Dependency Security for JavaScript and npm" height=50 valign="middle"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://wormhole.app/?utm_medium=sponsorship&utm_source=standard&utm_campaign=feross"><img src="https://cdn.rawgit.com/standard/standard/master/docs/logos/wormhole.png" alt="Wormhole" height=50 valign="middle"></a>
</h5>

@@ -187,3 +187,3 @@

| [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/nodesource.png>](https://nodesource.com) | [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/nearform.png>](http://www.nearform.com) | [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/typeform.png>](https://www.typeform.com) | [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/gov-uk.png>](https://gds.blog.gov.uk) |
| [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/socket.png>](https://socket.dev) | [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/nearform.png>](http://www.nearform.com) | [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/typeform.png>](https://www.typeform.com) | [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/gov-uk.png>](https://gds.blog.gov.uk) |
|---|---|---|---|

@@ -212,8 +212,9 @@

| [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/fastify.png>](https://www.fastify.io) | [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/scuttlebutt.png>](https://www.scuttlebutt.nz) | [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/solid.png>](https://solid.inrupt.com) | [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/grab.png>](https://www.grab.com) |
|---|---|---|---|
| [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/jublia.png>](https://jublia.com/) | [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/atom.png>](https://atom.io) | [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/peek.png>](https://www.peek.com) | [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/dotenv.png>](https://www.dotenv.org) |
|---|---|---|---|
| [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/jublia.png>](https://jublia.com/) | [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/atom.png>](https://atom.io) | Your logo here | Your logo here |
| [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/nodesource.png>](https://nodesource.com) | Your Logo Here | | |
|---|---|---|---|

@@ -361,3 +362,3 @@

[bikeshedding]: https://www.freebsd.org/doc/en/books/faq/misc.html#bikeshed-painting
[bikeshedding]: https://docs.freebsd.org/en/books/faq/#bikeshed-painting

@@ -416,10 +417,2 @@ ## But this isn't a real web standard!

To get verbose output (so you can find the particular rule name to ignore), run:
```bash
$ standard --verbose
Error: Use JavaScript Standard Style
routes/error.js:20:36: 'file' was used before it was defined. (no-use-before-define)
```
Disable **all rules** on a specific line:

@@ -601,3 +594,3 @@

full list, check ESLint's
[specifying environments](http://eslint.org/docs/user-guide/configuring.html#specifying-environments)
[specifying environments](https://eslint.org/docs/latest/use/configure/language-options#specifying-environments)
documentation. For a list of what globals are available for these environments,

@@ -712,3 +705,3 @@ check the

Users of pre-commit can simply add `standard` to their `.pre-commit-config.yaml` file, which will automatically fix `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs` and `.cjs` files:
Users of pre-commit can simply add `standard` to their `.pre-commit-config.yaml` file, which will automatically fix `.js`, `.jsx`, `.mjs` and `.cjs` files:
```yaml

@@ -747,3 +740,3 @@ - repo: https://github.com/standard/standard

```bash
$ standard --verbose | snazzy
$ standard | snazzy
```

@@ -760,3 +753,3 @@

### `standard.lintText(text, [opts], callback)`
### `async standard.lintText(text, [opts])`

@@ -767,21 +760,28 @@ Lint the provided source `text`. An `opts` object may be provided:

{
cwd: '', // current working directory (default: process.cwd())
filename: '', // path of the file containing the text being linted (optional, though some eslint plugins require it)
fix: false, // automatically fix problems
globals: [], // custom global variables to declare
plugins: [], // custom eslint plugins
envs: [], // custom eslint environment
parser: '' // custom js parser (e.g. @babel/eslint-parser)
// unique to lintText
filename: '', // path of file containing the text being linted
// common to lintText and lintFiles
cwd: '', // current working directory (default: process.cwd())
fix: false, // automatically fix problems
extensions: [], // file extensions to lint (has sane defaults)
globals: [], // custom global variables to declare
plugins: [], // custom eslint plugins
envs: [], // custom eslint environment
parser: '', // custom js parser (e.g. babel-eslint)
usePackageJson: true, // use options from nearest package.json?
useGitIgnore: true // use file ignore patterns from .gitignore?
}
```
Additional options may be loaded from a `package.json` if it's found for the
current working directory.
All options are optional, though some ESLint plugins require the `filename` option.
The `callback` will be called with an `Error` and `results` object.
Additional options may be loaded from a `package.json` if it's found for the current working directory. See below for further details.
Returns a `Promise` resolving to the `results` or rejected with an `Error`.
The `results` object will contain the following properties:
```js
var results = {
const results = {
results: [

@@ -803,25 +803,30 @@ {

### `results = standard.lintTextSync(text, [opts])`
### `async standard.lintFiles(files, [opts])`
Synchronous version of `standard.lintText()`. If an error occurs, an exception is
thrown. Otherwise, a `results` object is returned.
### `standard.lintFiles(files, [opts], callback)`
Lint the provided `files` globs. An `opts` object may be provided:
```js
var opts = {
ignore: [], // file globs to ignore (has sane defaults)
cwd: '', // current working directory (default: process.cwd())
fix: false, // automatically fix problems
globals: [], // global variables to declare
plugins: [], // eslint plugins
envs: [], // eslint environment
parser: '' // js parser (e.g. @babel/eslint-parser)
{
// unique to lintFiles
ignore: [], // file globs to ignore (has sane defaults)
// common to lintText and lintFiles
cwd: '', // current working directory (default: process.cwd())
fix: false, // automatically fix problems
extensions: [], // file extensions to lint (has sane defaults)
globals: [], // custom global variables to declare
plugins: [], // custom eslint plugins
envs: [], // custom eslint environment
parser: '', // custom js parser (e.g. babel-eslint)
usePackageJson: true, // use options from nearest package.json?
useGitIgnore: true // use file ignore patterns from .gitignore?
}
```
The `callback` will be called with an `Error` and `results` object (same as above).
Additional options may be loaded from a `package.json` if it's found for the current working directory. See below for further details.
Both `ignore` and `files` patterns are resolved relative to the current working directory.
Returns a `Promise` resolving to the `results` or rejected with an `Error` (same as above).
## How do I contribute to StandardJS?

@@ -828,0 +833,0 @@

@@ -1323,3 +1323,3 @@ # JavaScript Standard Style

* No semicolons. (see: [1](http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding), [2](http://inimino.org/%7Einimino/blog/javascript_semicolons), [3](https://www.youtube.com/watch?v=gsfbh17Ax9I))
* No semicolons. (see: [1](http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding), [2](https://web.archive.org/web/20201206065632/http://inimino.org/~inimino/blog/javascript_semicolons), [3](https://www.youtube.com/watch?v=gsfbh17Ax9I))

@@ -1441,3 +1441,3 @@ eslint: [`semi`](http://eslint.org/docs/rules/semi)

[1]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding
[2]: http://inimino.org/~inimino/blog/javascript_semicolons
[2]: https://web.archive.org/web/20201206065632/http://inimino.org/~inimino/blog/javascript_semicolons
[3]: https://www.youtube.com/watch?v=gsfbh17Ax9I

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc