standard
Advanced tools
Comparing version 16.0.4 to 17.1.0
/*! 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 <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 <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> <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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
163558
12
851
0
Yes
9
+ Addedeslint-plugin-n@^15.7.0
+ Addedversion-guard@^1.1.1
+ Added@eslint-community/eslint-utils@4.4.1(transitive)
+ Added@eslint-community/regexpp@4.12.1(transitive)
+ Added@eslint/eslintrc@2.1.4(transitive)
+ Added@eslint/js@8.57.1(transitive)
+ Added@humanwhocodes/config-array@0.13.0(transitive)
+ Added@humanwhocodes/module-importer@1.0.1(transitive)
+ Added@humanwhocodes/object-schema@2.0.3(transitive)
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Added@rtsao/scc@1.1.0(transitive)
+ Added@ungap/structured-clone@1.2.0(transitive)
+ Addedacorn@8.14.0(transitive)
+ Addedargparse@2.0.1(transitive)
+ Addedarray.prototype.findlast@1.2.5(transitive)
+ Addedarray.prototype.findlastindex@1.2.5(transitive)
+ Addedarray.prototype.tosorted@1.1.4(transitive)
+ Addedbuiltins@5.1.0(transitive)
+ Addedes-iterator-helpers@1.2.0(transitive)
+ Addedescape-string-regexp@4.0.0(transitive)
+ Addedeslint@8.57.1(transitive)
+ Addedeslint-config-standard@17.1.0(transitive)
+ Addedeslint-config-standard-jsx@11.0.0(transitive)
+ Addedeslint-plugin-es@4.1.0(transitive)
+ Addedeslint-plugin-import@2.31.0(transitive)
+ Addedeslint-plugin-n@15.7.0(transitive)
+ Addedeslint-plugin-promise@6.6.0(transitive)
+ Addedeslint-plugin-react@7.37.2(transitive)
+ Addedeslint-scope@7.2.2(transitive)
+ Addedeslint-utils@3.0.0(transitive)
+ Addedeslint-visitor-keys@3.4.3(transitive)
+ Addedespree@9.6.1(transitive)
+ Addedfastq@1.17.1(transitive)
+ Addedfind-up@5.0.0(transitive)
+ Addedglob-parent@6.0.2(transitive)
+ Addedglobals@13.24.0(transitive)
+ Addedgraphemer@1.4.0(transitive)
+ Addedis-async-function@2.0.0(transitive)
+ Addedis-finalizationregistry@1.0.2(transitive)
+ Addedis-generator-function@1.0.10(transitive)
+ Addedis-map@2.0.3(transitive)
+ Addedis-path-inside@3.0.3(transitive)
+ Addedis-set@2.0.3(transitive)
+ Addedis-weakmap@2.0.2(transitive)
+ Addedis-weakset@2.0.3(transitive)
+ Addediterator.prototype@1.1.3(transitive)
+ Addedjs-yaml@4.1.0(transitive)
+ Addedlocate-path@6.0.0(transitive)
+ Addedlodash.merge@4.6.2(transitive)
+ Addedobject.groupby@1.0.3(transitive)
+ Addedp-limit@3.1.0(transitive)
+ Addedp-locate@5.0.0(transitive)
+ Addedpath-exists@4.0.0(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedreflect.getprototypeof@1.0.6(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedstandard-engine@15.1.0(transitive)
+ Addedstring.prototype.repeat@1.0.0(transitive)
+ Addedtype-fest@0.20.2(transitive)
+ Addedversion-guard@1.1.3(transitive)
+ Addedwhich-builtin-type@1.1.4(transitive)
+ Addedwhich-collection@1.0.2(transitive)
+ Addedyocto-queue@0.1.0(transitive)
- Removedeslint-plugin-node@~11.1.0
- Removed@babel/code-frame@7.26.2(transitive)
- Removed@babel/helper-validator-identifier@7.25.9(transitive)
- Removed@eslint/eslintrc@0.3.0(transitive)
- Removedacorn@7.4.1(transitive)
- Removedajv@8.17.1(transitive)
- Removedansi-colors@4.1.3(transitive)
- Removedargparse@1.0.10(transitive)
- Removedastral-regex@2.0.0(transitive)
- Removeddebug@2.6.9(transitive)
- Removedemoji-regex@8.0.0(transitive)
- Removedenquirer@2.4.1(transitive)
- Removedeslint@7.18.0(transitive)
- Removedeslint-config-standard@16.0.3(transitive)
- Removedeslint-config-standard-jsx@10.0.0(transitive)
- Removedeslint-plugin-es@3.0.1(transitive)
- Removedeslint-plugin-import@2.24.2(transitive)
- Removedeslint-plugin-node@11.1.0(transitive)
- Removedeslint-plugin-promise@5.1.1(transitive)
- Removedeslint-plugin-react@7.25.3(transitive)
- Removedeslint-scope@5.1.1(transitive)
- Removedespree@7.3.1(transitive)
- Removedesprima@4.0.1(transitive)
- Removedestraverse@4.3.0(transitive)
- Removedfast-uri@3.0.3(transitive)
- Removedfind-up@2.1.0(transitive)
- Removedfunctional-red-black-tree@1.0.1(transitive)
- Removedglob-parent@5.1.2(transitive)
- Removedglobals@12.4.0(transitive)
- Removedhas@1.0.4(transitive)
- Removedhosted-git-info@2.8.9(transitive)
- Removedignore@4.0.6(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedjson-schema-traverse@1.0.0(transitive)
- Removedload-json-file@4.0.0(transitive)
- Removedlocate-path@2.0.0(transitive)
- Removedlodash@4.17.21(transitive)
- Removedlodash.truncate@4.4.2(transitive)
- Removedms@2.0.0(transitive)
- Removednormalize-package-data@2.5.0(transitive)
- Removedobject.hasown@1.1.4(transitive)
- Removedp-limit@1.3.0(transitive)
- Removedp-locate@2.0.0(transitive)
- Removedp-try@1.0.0(transitive)
- Removedpath-type@3.0.0(transitive)
- Removedpicocolors@1.1.1(transitive)
- Removedpify@3.0.0(transitive)
- Removedpkg-up@2.0.0(transitive)
- Removedprogress@2.0.3(transitive)
- Removedread-pkg@3.0.0(transitive)
- Removedread-pkg-up@3.0.0(transitive)
- Removedrequire-from-string@2.0.2(transitive)
- Removedsemver@5.7.2(transitive)
- Removedslice-ansi@4.0.0(transitive)
- Removedspdx-correct@3.2.0(transitive)
- Removedspdx-exceptions@2.5.0(transitive)
- Removedspdx-expression-parse@3.0.1(transitive)
- Removedspdx-license-ids@3.0.20(transitive)
- Removedsprintf-js@1.0.3(transitive)
- Removedstandard-engine@14.0.1(transitive)
- Removedstring-width@4.2.3(transitive)
- Removedtable@6.8.2(transitive)
- Removedtype-fest@0.8.1(transitive)
- Removedv8-compile-cache@2.4.0(transitive)
- Removedvalidate-npm-package-license@3.0.4(transitive)
Updatedeslint@^8.41.0
Updatedeslint-plugin-import@^2.27.5
Updatedeslint-plugin-promise@^6.1.1
Updatedeslint-plugin-react@^7.32.2
Updatedstandard-engine@^15.0.0