rollup-plugin-eslint-bundle
Advanced tools
Comparing version 8.0.0 to 9.0.0
104
package.json
{ | ||
"name": "rollup-plugin-eslint-bundle", | ||
"version": "8.0.0", | ||
"version": "9.0.0", | ||
"description": "Rollup plugin to verify (and fix) bundled code with ESLint", | ||
@@ -26,3 +26,3 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=18" | ||
"node": ">=20" | ||
}, | ||
@@ -41,88 +41,44 @@ "files": [ | ||
"prepublishOnly": "npm run build", | ||
"update-browserslist-db": "npx update-browserslist-db@latest", | ||
"prepare": "husky install" | ||
}, | ||
"prettier": { | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"singleQuote": true, | ||
"semi": false | ||
}, | ||
"ava": { | ||
"verbose": true, | ||
"workerThreads": false, | ||
"files": [ | ||
"./tests/tests.js" | ||
] | ||
}, | ||
"c8": { | ||
"all": true, | ||
"include": [ | ||
"index.js" | ||
], | ||
"reporter": [ | ||
"text", | ||
"lcov" | ||
] | ||
}, | ||
"commitlint": { | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
], | ||
"rules": { | ||
"body-case": [ | ||
2, | ||
"always", | ||
"sentence-case" | ||
], | ||
"subject-case": [ | ||
2, | ||
"always", | ||
"sentence-case" | ||
] | ||
} | ||
}, | ||
"lint-staged": { | ||
"*.js": [ | ||
"eslint --fix" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@ava/babel": "^2.0.0", | ||
"@babel/cli": "^7.21.0", | ||
"@babel/core": "^7.21.0", | ||
"@babel/eslint-parser": "^7.19.1", | ||
"@babel/preset-env": "^7.20.2", | ||
"@commitlint/cli": "^17.4.4", | ||
"@commitlint/config-conventional": "^17.4.4", | ||
"@types/eslint": "^8.21.1", | ||
"ava": "^5.2.0", | ||
"c8": "^7.13.0", | ||
"eslint": "^8.34.0", | ||
"eslint-config-prettier": "^8.6.0", | ||
"@babel/cli": "^7.23.4", | ||
"@babel/core": "^7.23.6", | ||
"@babel/eslint-parser": "^7.23.3", | ||
"@babel/preset-env": "^7.23.6", | ||
"@commitlint/cli": "^18.4.3", | ||
"@commitlint/config-conventional": "^18.4.3", | ||
"@stylistic/eslint-plugin": "^1.5.1", | ||
"@stylistic/eslint-plugin-migrate": "^1.5.1", | ||
"@types/eslint": "^8.44.9", | ||
"ava": "^6.0.1", | ||
"c8": "^8.0.1", | ||
"eslint": "^8.56.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-config-prettier-standard": "^4.0.1", | ||
"eslint-config-standard": "^17.0.0", | ||
"eslint-config-standard": "^17.1.0", | ||
"eslint-plugin-ava": "^14.0.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-jsdoc": "^40.0.0", | ||
"eslint-plugin-n": "^15.6.1", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-jsdoc": "^46.9.1", | ||
"eslint-plugin-n": "^16.4.0", | ||
"eslint-plugin-prettier": "^5.0.1", | ||
"eslint-plugin-promise": "^6.1.1", | ||
"eslint-plugin-unicorn": "^45.0.2", | ||
"eslint-plugin-unicorn": "^49.0.0", | ||
"husky": "^8.0.3", | ||
"lint-staged": "^13.1.2", | ||
"open-cli": "^7.1.0", | ||
"prettier": "^2.8.4", | ||
"prettier-config-standard": "^5.0.0", | ||
"rollup": "^3.17.2", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"typescript": "^4.9.5" | ||
"lint-staged": "^15.2.0", | ||
"open-cli": "^7.2.0", | ||
"prettier": "3.1.1", | ||
"prettier-config-standard": "^7.0.0", | ||
"rollup": "^4.9.1", | ||
"typescript": "^5.3.3" | ||
}, | ||
"dependencies": { | ||
"diff": "^5.1.0", | ||
"magic-string": "^0.30.0" | ||
"magic-string": "^0.30.5" | ||
}, | ||
"peerDependencies": { | ||
"eslint": ">=8.x", | ||
"rollup": "3.x" | ||
"rollup": "4.x" | ||
} | ||
} |
@@ -0,1 +1,3 @@ | ||
[![ru](https://img.shields.io/badge/lang-ru-%23d52b1e)](./README.ru.md) | ||
[![NPM version][npm-image]][npm-url] [![install size](https://packagephobia.com/badge?p=rollup-plugin-eslint-bundle)](https://packagephobia.com/result?p=rollup-plugin-eslint-bundle) ![build](https://github.com/nikolay-borzov/rollup-plugin-eslint-bundle/workflows/CI/badge.svg) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) ![npm type definitions](https://img.shields.io/npm/types/rollup-plugin-eslint-bundle) | ||
@@ -8,9 +10,10 @@ | ||
[rollup]: https://github.com/rollup/rollup | ||
[eslint]: https://github.com/eslint/eslint | ||
[eslint-config]: https://eslint.org/docs/developer-guide/nodejs-api#parameters | ||
🍣 A [Rollup] plugin to lint and fix bundled code with ESLint. | ||
🍣 A [Rollup] plugin to lint and fix bundled code with [ESLint]. | ||
## Requirements | ||
This plugin requires an Node.js v18.x, Rollup v3.x and ESLint v8.x | ||
This plugin requires an Node.js v20.x, Rollup v4.x and ESLint v8.x | ||
@@ -27,4 +30,4 @@ ## Install | ||
// rollup.config.js ESM | ||
import { rollup } from 'rollup'; | ||
import { eslintBundle } from 'rollup-plugin-eslint-bundle'; | ||
import { rollup } from 'rollup' | ||
import { eslintBundle } from 'rollup-plugin-eslint-bundle' | ||
@@ -43,3 +46,3 @@ const root = path.dirname(url.fileURLToPath(import.meta.url)) | ||
throwOnError: true, | ||
formatter: 'compact' | ||
formatter: 'compact', | ||
}), | ||
@@ -52,4 +55,3 @@ ], | ||
}, | ||
}; | ||
} | ||
``` | ||
@@ -59,4 +61,4 @@ | ||
// Rollup JavaScript API | ||
import { rollup } from 'rollup'; | ||
import { eslintBundle } from 'rollup-plugin-eslint-bundle'; | ||
import { rollup } from 'rollup' | ||
import { eslintBundle } from 'rollup-plugin-eslint-bundle' | ||
@@ -74,6 +76,6 @@ // ... | ||
throwOnError: true, | ||
formatter: 'compact' | ||
}) | ||
] | ||
}); | ||
formatter: 'compact', | ||
}), | ||
], | ||
}) | ||
@@ -83,5 +85,5 @@ await bundle.write({ | ||
format: 'es', | ||
}); | ||
}) | ||
await bundle.close(); | ||
await bundle.close() | ||
``` | ||
@@ -91,30 +93,9 @@ | ||
### `eslintOptions` | ||
| | Description | | ||
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `eslintOptions` | [ESLint class options object](https://eslint.org/docs/developer-guide/nodejs-api#parameters) | | ||
| `throwOnWarning` | `boolean` (Default: `false`)<br>If true, will throw an error if any ESLint warnings were found. | | ||
| `throwOnError` | `boolean` (Default: `false`)<br>If true, will throw an error if any ESLint errors were found. | | ||
| `formatter` | `string` (Default: `undefined`)<br>[Value](https://eslint.org/docs/developer-guide/nodejs-api#-eslintloadformatternameorpath) to be passed to `eslint.loadFormatter()` | | ||
[ESLint class options object](https://eslint.org/docs/developer-guide/nodejs-api#parameters). | ||
### `throwOnWarning` | ||
Type: `boolean` | ||
Default: `false` | ||
If true, will throw an error if any warnings were found. | ||
### `throwOnError` | ||
Type: `boolean` | ||
Default: `false` | ||
If true, will throw an error if any errors were found. | ||
### `formatter` | ||
Type: `string` | ||
Default: `undefined` | ||
[Value](https://eslint.org/docs/developer-guide/nodejs-api#-eslintloadformatternameorpath) to be passed to `eslint.loadFormatter()` | ||
## License | ||
@@ -121,0 +102,0 @@ |
Sorry, the diff of this file is not supported yet
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
18045
7
213
100
+ Added@rollup/rollup-android-arm-eabi@4.27.3(transitive)
+ Added@rollup/rollup-android-arm64@4.27.3(transitive)
+ Added@rollup/rollup-darwin-arm64@4.27.3(transitive)
+ Added@rollup/rollup-darwin-x64@4.27.3(transitive)
+ Added@rollup/rollup-freebsd-arm64@4.27.3(transitive)
+ Added@rollup/rollup-freebsd-x64@4.27.3(transitive)
+ Added@rollup/rollup-linux-arm-gnueabihf@4.27.3(transitive)
+ Added@rollup/rollup-linux-arm-musleabihf@4.27.3(transitive)
+ Added@rollup/rollup-linux-arm64-gnu@4.27.3(transitive)
+ Added@rollup/rollup-linux-arm64-musl@4.27.3(transitive)
+ Added@rollup/rollup-linux-powerpc64le-gnu@4.27.3(transitive)
+ Added@rollup/rollup-linux-riscv64-gnu@4.27.3(transitive)
+ Added@rollup/rollup-linux-s390x-gnu@4.27.3(transitive)
+ Added@rollup/rollup-linux-x64-gnu@4.27.3(transitive)
+ Added@rollup/rollup-linux-x64-musl@4.27.3(transitive)
+ Added@rollup/rollup-win32-arm64-msvc@4.27.3(transitive)
+ Added@rollup/rollup-win32-ia32-msvc@4.27.3(transitive)
+ Added@rollup/rollup-win32-x64-msvc@4.27.3(transitive)
+ Addedrollup@4.27.3(transitive)
- Removedrollup@3.29.5(transitive)
Updatedmagic-string@^0.30.5