Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
broccoli-lint-eslint
Advanced tools
Lint JavaScript with ESLint as part of your Broccoli build pipeline.
Most of the test setup and the build configuration is based on sindresorhus/grunt-eslint. The internal validation is heavily inspired by eslint cli.js.
npm install --save broccoli-lint-eslint
broccoli-lint-eslint@5
uses eslint@5
which requires Node.js 6 or above.
If you need support for Node.js 4, you may use broccoli-lint-eslint@4
which
uses eslint@4
and is compatible with Node.js 4:
npm install --save broccoli-lint-eslint@4
var ESLint = require('broccoli-lint-eslint');
var outputNode = ESLint.create(inputNode, options);
inputNode
A Broccoli node
options
{Object}: Options to control how broccoli-lint-eslint
is run.
format
{string|function}: The path, or function reference, to a custom formatter (See eslint/tree/master/lib/formatters for alternatives).
Default: 'eslint/lib/formatters/stylish'
testGenerator
{function(relativePath, errors), returns reporter output string
}: The function used to generate test modules. You can provide a custom function for your client side testing framework of choice.
Default: null
If you provide a string
one of the predefined test generators is used. Currently supported are qunit
and mocha
.
Example usage:
var path = require('path');
function testGenerator(relativePath, errors) {
return "module('" + path.dirname(relativePath) + "');\n";
"test('" + relativePath + "' should pass ESLint', function() {\n" +
" ok(" + passed + ", '" + moduleName + " should pass ESLint." + (errors ? "\\n" + errors : '') + "');\n" +
"});\n";
};
return ESLint.create(inputNode, {
options: {
configFile: this.eslintrc.app + '/eslint.json'
},
testGenerator: testGenerator
});
group
{string|undefined}: Groups the generated ESLint tests into a single file and test suite with the given group name.
Default: undefined
throwOnError
{boolean}: Cause exception error on first violation with error
-level severity.
Default: false
throwOnWarn
{boolean}: Cause exception error on first violation with warn
-level severity.
NOTE: Setting this to true will automatically enable throwOnError
behavior.
Default: false
persist
{boolean}: Persist the state of filter output across restarts
Default: false
console
: {Object}: A custom console object with a log
method for
broccoli-lint-eslint
to use when logging formatter output.
Default: The global console
object
options
{options}: Options native to ESLint CLI. While all options will be passed to the ESLint CLIEngine, these are the ones that broccoli-lint-eslint
makes use of in particular:
configFile
{string}: Path to eslint configuration file.
Default: ./eslintrc
rulePaths
{Array}: Paths to a directory with custom rules. Your custom rules will be used in addition to the built-in ones. Recommended read: Working with Rules.
Default: built-in rules directory
ignore
{boolean}: false
disables use of .eslintignore
, ignorePath
and ignorePattern
Default: true
extensions
{Array}: File extensions to lint. NOTE: If you add Typescript files typescript-eslint-parser
has to be installed and specified as the parser. For more information take a look at the typescript-eslint-parser
Default: ['js']
FAQs
broccoli filter that runs eslint
The npm package broccoli-lint-eslint receives a total of 19,488 weekly downloads. As such, broccoli-lint-eslint popularity was classified as popular.
We found that broccoli-lint-eslint demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.