Gathering detailed insights and metrics for eslint-plugin-local
Gathering detailed insights and metrics for eslint-plugin-local
Gathering detailed insights and metrics for eslint-plugin-local
Gathering detailed insights and metrics for eslint-plugin-local
eslint-plugin-local-rules
A plugin for ESLint that allows you to use project-specific rules
eslint-plugin-n8n-local-rules
Plugin for n8n local rules. Based on Clayton Watts's eslint-plugin-local-rules
eslint-plugin-rulesdir
Allows a local ESLint rules directory to be used without a command-line flag
@arnaud-barre/eslint-plugin-local
Add local rules support for @arnaud-barre/eslint-config
module.exports = require('../../.eslintplugin')
npm install eslint-plugin-local
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
14,450,384
Last Day
19,300
Last Week
129,025
Last Month
562,243
Last Year
3,800,355
MIT License
35 Stars
40 Commits
9 Forks
5 Watchers
2 Branches
3 Contributors
Updated on Jan 29, 2025
Latest Version
6.0.0
Package Id
eslint-plugin-local@6.0.0
Unpacked Size
12.27 kB
Size
4.80 kB
File Count
7
NPM Version
10.5.2
Node Version
20.13.1
Published on
Aug 04, 2024
Cumulative downloads
Total Downloads
Last Day
6.1%
19,300
Compared to previous day
Last Week
-4.1%
129,025
Compared to previous week
Last Month
13.1%
562,243
Compared to previous month
Last Year
-4.4%
3,800,355
Compared to previous year
2
1
5
This ESLint plugin allows you to implement a custom ESLint plugin including custom rules in your repository without installing them as a dependency.
Originally inspired by cletusw/eslint-plugin-local-rules.
1npm install --save-dev eslint-plugin-local
The JavaScript file named eslint.local.js or eslint-plugin-local.js or .eslint-plugin-local/index.js must be created at the root of your repository, which the file has the content of an ESLint plugin. The extension .cjs can be used in place of .js in case ES module is not supported. For example:
1module.exports = { 2 rules: { 3 sample: { 4 // Optional 5 meta: { 6 // See https://eslint.org/docs/latest/extend/custom-rules#rule-structure 7 }, 8 9 // Mandatory 10 create: function (context) { 11 // Implementation goes here 12 // See https://eslint.org/docs/latest/extend/custom-rules 13 }, 14 15 // Optional 16 // Unit test can be triggered by `eslint-plugin-local test` command 17 // See https://eslint.org/docs/latest/integrate/nodejs-api#ruletester 18 tests: { 19 valid: [...], 20 invalid: [...], 21 } 22 } 23 } 24}
Then add the plugin to your eslint.config.js file:
1const local = require('eslint-plugin-local') 2 3module.exports = [{ 4 plugins: { 5 local 6 }, 7 rules: { 8 'local/sample': 'error' 9 } 10}]
Additionally, this package provides eslint-plugin-local test
command out of the box, which it scans for tests: { valid: [], invalid: [] }
field in each rule and runs RuleTester
internally.
To make it easy to debug your test cases, wrap one or more test objects inside the global only()
function. Given the example below, only the first test case and every invalid case will be run.
1module.exports = { 2 rules: { 3 sample: { 4 tests: { 5 valid: [ 6 only({ 7 code: 'var foo = 1', 8 }), 9 { 10 code: 'var foo = 2', 11 } 12 ], 13 invalid: only([...]), 14 } 15 } 16 } 17}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
7 existing vulnerabilities detected
Details
Reason
project is archived
Details
Reason
Found 1/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-04-28
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More