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.
eslint-plugin-disable-autofix
Advanced tools
Disable autofix for ESLint rules without turning them off
Disable autofix for ESLint rules and prevent them from being formatted without having to turn them off.
npm i -D eslint-plugin-disable-autofix
Import and include disable-autofix
in the plugins
object
Add prefix disable-autofix/
to the rule and disable the original
import disableAutofix from 'eslint-plugin-disable-autofix';
export default [
{
plugins: {
'disable-autofix': disableAutofix,
},
rules: {
'prefer-const': 'off',
'disable-autofix/prefer-const': 'warn',
},
},
];
Using 3rd-party Rules
import disableAutofix from 'eslint-plugin-disable-autofix';
import react from 'eslint-plugin-react';
export default [
{
plugins: {
'disable-autofix': disableAutofix,
react,
},
rules: {
'react/jsx-indent': 'off',
'disable-autofix/react/jsx-indent': 'error',
},
},
];
Using Scoped Rules
import disableAutofix from 'eslint-plugin-disable-autofix';
import htmlEslint from '@html-eslint/eslint-plugin';
export default [
{
plugins: {
'disable-autofix': disableAutofix,
'@html-eslint': htmlEslint,
},
rules: {
'@html-eslint/require-closing-tags': 'off',
'disable-autofix/@html-eslint/require-closing-tags': [
'error',
{ selfClosing: 'always' },
],
},
},
];
Include disable-autofix
in the eslintrc
plugins array
Add prefix disable-autofix/
to the rule and disable the original
module.exports = {
plugins: ['disable-autofix'],
rules: {
'prefer-const': 'off',
'disable-autofix/prefer-const': 'warn',
},
};
Using 3rd-party Rules
module.exports = {
plugins: ['disable-autofix', 'react'],
rules: {
'react/jsx-indent': 'off',
'disable-autofix/react/jsx-indent': 'error',
},
};
Using Scoped Rules
module.exports = {
plugins: ['disable-autofix', '@html-eslint'],
rules: {
'@html-eslint/require-closing-tags': 'off',
'disable-autofix/@html-eslint/require-closing-tags': [
'error',
{ selfClosing: 'always' },
],
},
};
FAQs
Disable autofix for ESLint rules without turning them off
The npm package eslint-plugin-disable-autofix receives a total of 23,394 weekly downloads. As such, eslint-plugin-disable-autofix popularity was classified as popular.
We found that eslint-plugin-disable-autofix demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.