
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
eslint-config-exzeo
Advanced tools
Eslint v9 requires a new config file known as a flat config. The eslint documentation has a [detailed migration guide](https://eslint.org/docs/latest/use/configure/migration-guide) available for any in-depth issues with migrating, as well as full breaking
Eslint v9 requires a new config file known as a flat config. The eslint documentation has a detailed migration guide available for any in-depth issues with migrating, as well as full breaking changes list.
For services with simple configs and limited ignores, you can delete all .eslintrc.json and .eslintignore files,and replace it with the following and have a working config with all default ignores:
import exzeoBaseConfig from 'eslint-config-exzeo/base';
import exzeoMochaConfig from 'eslint-config-exzeo/mocha';
export default [
exzeoBaseConfig,
exzeoMochaConfig
];
You can get started quickly with a new config by importing the "base" config into an eslint.config.js
file. Importing the base config would look like this:
import exzeoBase from 'eslint-config-exzeo/base';
export default [
exzeoBase
];
.eslintignore
files are deprecated in version 9. Add globally ignored files to the config using a glob. By default, the config ignores node_modules
and **/documentation
.
import exzeoBase from 'eslint-config-exzeo/base';
export default [
exzeoBase,
{ ignores: ['**/dist'] }
];
This package exports mocha specific configs for linting test files. You can specify which files get linted with which config by using a files array and a glob. By default, the mocha config will lint all tests with a file extension of *.test.js
.
import exzeoBaseConfig from 'eslint-config-exzeo/base';
import exzeoMochaConfig from 'eslint-config-exzeo/mocha';
export default [
exzeoBaseConfig,
{
...exzeoMochaConfig,
files: [...exzeoMochaConfig.files, 'test/**/*']
},
];
In most cases, you want to extend the config while leaving it mostly intact, by either adding additional ignores, disabling certain rules per config, or adding additional files. Use the spread operator to extend the config.
import exzeoBaseConfig from 'eslint-config-exzeo/base';
import exzeoMochaConfig from 'eslint-config-exzeo/mocha';
export default [
{
...exzeoBaseConfig,
rules: {
...exzeoBaseConfig.rules, // keep all base rules from config
'thisrulesucks': 'off' // turn off one rule only for files linted by base config
},
ignores: [...exzeoBaseConfig.ignores, 'scripts/**/*'] // ignore scripts dir in addition to the default ignores
},
{
...exzeoMochaConfig,
files: [...exzeoMochaConfig.files, 'stress-test/**/*'] // add an additional directory to apply mocha test linting to
}
];
You can customize rules by adding them to a rules object. Adding rules in a seperate object overrides the rules for all configs above them.
import exzeoBaseConfig from 'eslint-config-exzeo/base';
import exzeoMochaConfig from 'eslint-config-exzeo/mocha';
export default [
exzeoBaseConfig,
exzeoMochaConfig,
{
rules: {
'thisrulesucks': 'off'
}
}
];
There are preset typescript and typescript mocha configs exported from this package. You will need to install the typescript-eslint
package to use the configs. More information about how to set this up is available in the docs for this package. The 'extends' keyword is valid for this config, so you can easily extend using that instead of the spread operator. An example config for ts would look something like this:
import tseslint from 'typescript-eslint'
import exzeoTsConfig from 'eslint-config-exzeo/ts';
import exzeoTsMochaConfig from 'eslint-config-exzeo/ts-mocha';
export default tseslint.config(
...exzeoTsConfig,
{
files: ['test/**/*'], // lint everything in test folder in addition to default
extends: [exzeoTsMochaConfig],
rules: {
'@typescript-eslint/no-unused-vars': 'off' // disable one rule for tests only
},
},
{ ignores: ['dist/**/*', '**/node_modules'] } // global ignores
)
Debug logs for a given file:
npx eslint --debug file.js
Inspect config, includes a gui for examining how your config is built and what different rules/files/and ignores are applied to what:
npx eslint --inspect-config
Print out the config that is being used for a given file:
npx eslint --print-config file.js
Further debugging information available in eslint's documentation
FAQs
Eslint v9 requires a new config file known as a flat config. The eslint documentation has a [detailed migration guide](https://eslint.org/docs/latest/use/configure/migration-guide) available for any in-depth issues with migrating, as well as full breaking
The npm package eslint-config-exzeo receives a total of 304 weekly downloads. As such, eslint-config-exzeo popularity was classified as not popular.
We found that eslint-config-exzeo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.