🐊 Pluggable and configurable JavaScript Linter, code transformer and formatter, drop-in ESLint superpower replacement 💪 with built-in support for js, jsx, typescript, flow, markdown, yaml and json. Write declarative codemods in a simplest possible way 😏
Installations
npm install @putout/plugin-eslint-plugin
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=18
Node Version
20.12.2
NPM Version
10.5.0
Score
40.9
Supply Chain
86.5
Quality
71.8
Maintenance
100
Vulnerability
97.9
License
Releases
Contributors
Languages
JavaScript (99.09%)
TypeScript (0.65%)
HTML (0.17%)
WebAssembly (0.05%)
CSS (0.02%)
Svelte (0.01%)
Developer
Download Statistics
Total Downloads
1,303
Last Day
2
Last Week
14
Last Month
37
Last Year
584
GitHub Statistics
723 Stars
14,761 Commits
40 Forks
10 Watching
46 Branches
24 Contributors
Bundle Size
3.48 kB
Minified
1.11 kB
Minified + Gzipped
Package Meta Information
Latest Version
5.0.0
Package Id
@putout/plugin-eslint-plugin@5.0.0
Unpacked Size
13.82 kB
Size
4.16 kB
File Count
9
NPM Version
10.5.0
Node Version
20.12.2
Publised On
04 May 2024
Total Downloads
Cumulative downloads
Total Downloads
1,303
Last day
0%
2
Compared to previous day
Last week
100%
14
Compared to previous week
Last month
2.8%
37
Compared to previous month
Last year
-18.8%
584
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Peer Dependencies
1
@putout/plugin-eslint-plugin
Find and fix problems in your JavaScript code
(c) eslint.org
🐊Putout plugin helps to automate fixing ESLint plugins.
Install
npm i @putout/plugin-eslint-plugin -D
Rules
- ✅ apply-flat-config-to-rule-tester;
- ✅ convert-context-to-source;
- ✅ convert-require-resolve-to-require;
- ✅ turn-off-schema;
- ✅ update-ecma-version;
Config
1{ 2 "rules": { 3 "eslint-plugin/convert-context-to-source": "on", 4 "eslint-plugin/apply-flat-config-to-rule-tester": "on", 5 "eslint-plugin/convert-require-resolve-to-require": "on", 6 "eslint-plugin/turn-off-schema": "on", 7 "eslint-plugin/update-ecma-version": ["on", { 8 "ecmaVersion": 2024 9 }] 10 } 11}
convert-context-to-source
When ESLint v9.0.0 is released, it will ship with several breaking changes for rule authors. These changes are necessary as part of the work to implement language plugins, which gives ESLint first-class support for linting languages other than JavaScript.
(c) eslint.org
Checkout in 🐊Putout Editor.
❌ Example of incorrect code
1context.parserServices; 2sourceCode.parserServices; 3context.getAncestors(node); 4context.getDeclaredVariables(node); 5context.getScope(); 6context.getCwd(); 7context.getSourceCode(); 8context.markVariableAsUsed(name); 9context.getFilename(); 10context.getPhysicalFilename(); 11const nextNode = context.getNodeByRangeIndex(node.range[1] + 2); 12 13context.getSource(); 14context.getSourceLines(); 15context.getAllComments(); 16context.getComments(); 17context.getCommentsBefore(); 18context.getCommentsAfter(); 19context.getCommentsInside(); 20context.getJSDocComment(); 21context.getFirstToken(); 22context.getFirstTokens(); 23context.getLastToken(); 24context.getLastTokens(); 25context.getTokenAfter(); 26context.getTokenBefore(); 27context.getTokenByRangeStart(); 28context.getTokens(); 29context.getTokensAfter(); 30context.getTokensBefore(); 31context.getTokensBetween(); 32context.parserServices;
✅ Example of correct code
1sourceCode.parserServices; 2sourceCode.parserServices; 3sourceCode.getAncestors(node); 4sourceCode.getDeclaredVariables(node); 5sourceCode.getScope(); 6context.cwd; 7context.sourceCode; 8sourceCode.markVariableAsUsed(name); 9context.filename; 10context.physicalFilename; 11const nextNode = sourceCode.getNodeByRangeIndex(node.range[1] + 2); 12 13sourceCode.getText(); 14sourceCode.getLines(); 15sourceCode.getAllComments(); 16sourceCode.getComments(); 17sourceCode.getCommentsBefore(); 18sourceCode.getCommentsAfter(); 19sourceCode.getCommentsInside(); 20sourceCode.getJSDocComment(); 21sourceCode.getFirstToken(); 22sourceCode.getFirstTokens(); 23sourceCode.getLastToken(); 24sourceCode.getLastTokens(); 25sourceCode.getTokenAfter(); 26sourceCode.getTokenBefore(); 27sourceCode.getTokenByRangeStart(); 28sourceCode.getTokens(); 29sourceCode.getTokensAfter(); 30sourceCode.getTokensBefore(); 31sourceCode.getTokensBetween(); 32sourceCode.parserServices;
apply-flat-config-to-rule-tester
Checkout in 🐊Putout Editor.
❌ Example of incorrect code
1const parserTester = new RuleTester({ 2 parser: require.resolve('@babel/eslint-parser/experimental-worker'), 3 parserOptions: { 4 requireConfigFile: false, 5 babelOptions: { 6 plugins: ['@babel/plugin-syntax-typescript'], 7 }, 8 }, 9});
✅ Example of correct code
1const parserTester = new RuleTester({ 2 parser: require.resolve('@babel/eslint-parser/experimental-worker'), 3 parserOptions: { 4 requireConfigFile: false, 5 babelOptions: { 6 plugins: ['@babel/plugin-syntax-typescript'], 7 }, 8 }, 9});
convert-require-resolve-to-require
Checkout in 🐊Putout Editor.
❌ Example of incorrect code
1const test = new RuleTester({ 2 languageOptions: { 3 parser: require.resolve('@babel/eslint-parser/experimental-worker'), 4 parserOptions: { 5 requireConfigFile: false, 6 babelOptions: { 7 plugins: ['@babel/plugin-syntax-typescript'], 8 }, 9 }, 10 }, 11});
✅ Example of correct code
1const test = new RuleTester({ 2 languageOptions: { 3 parser: require('@babel/eslint-parser/experimental-worker'), 4 parserOptions: { 5 requireConfigFile: false, 6 babelOptions: { 7 plugins: ['@babel/plugin-syntax-typescript'], 8 }, 9 }, 10 }, 11});
turn-off-schema
Checkout in 🐊Putout Editor.
❌ Example of incorrect code
1function getMeta(plugin) { 2 const { 3 type = 'layout', 4 recommended = true, 5 fixable = 'whitespace', 6 } = plugin; 7 8 return { 9 type, 10 docs: { 11 recommended, 12 }, 13 schema: {}, 14 fixable, 15 }; 16}
✅ Example of correct code
1function getMeta(plugin) { 2 const { 3 type = 'layout', 4 recommended = true, 5 fixable = 'whitespace', 6 } = plugin; 7 8 return { 9 type, 10 docs: { 11 recommended, 12 }, 13 schema: false, 14 fixable, 15 }; 16}
update-ecma-version
Checkout in 🐊Putout Editor.
❌ Example of incorrect code
1const ruleTester = new RuleTester({ 2 languageOptions: { 3 parserOptions: { 4 ecmaVersion: 2022, 5 sourceType: 'module', 6 }, 7 }, 8});
✅ Example of correct code
1const ruleTester = new RuleTester({ 2 languageOptions: { 3 parserOptions: { 4 ecmaVersion: 2024, 5 sourceType: 'module', 6 }, 7 }, 8});
License
MIT
No vulnerabilities found.
Reason
30 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 existing vulnerabilities detected
Reason
no binaries found in the repo
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/nodejs-pr.yml:1
- Warn: no topLevel permission defined: .github/workflows/nodejs.yml:1
- Info: no jobLevel write permissions found
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs-pr.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs-pr.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/nodejs-pr.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs-pr.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs-pr.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs-pr.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs-pr.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs-pr.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/nodejs.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/nodejs.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/nodejs.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs.yml/master?enable=pin
- Info: 0 out of 6 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 4 third-party GitHubAction dependencies pinned
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Score
4.8
/10
Last Scanned on 2025-01-27
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 MoreOther packages similar to @putout/plugin-eslint-plugin
@putout/plugin-eslint
🐊Putout plugin for eslint config
putout
🐊 Pluggable and configurable code transformer with built-in ESLint, Babel and support of js, jsx, typescript, flow, markdown, yaml and json
eslint-plugin-putout
ESLint plugin for 🐊Putout
@2chevskii/eslint-plugin-putout
Modified eslint-plugin-putout