Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
eslint-config-pegasus
Advanced tools
Eslint shareable config with personalized defaults.
npm install eslint eslint-config-pegasus --save-dev
See Eslint's Shareable Configs for more information.
import pegasus from 'eslint-config-pegasus';
export default [
pegasus.configs.default, // core config
pegasus.configs.stylistic, // stylistic config
];
Additional rules
import pegasus from 'eslint-config-pegasus';
export default [
pegasus.configs.default, // core
pegasus.configs.node,
];
pegasus.tsConfig
is a re-export of typescript-eslint's config helper.
import pegasus from 'eslint-config-pegasus';
export default [
pegasus.configs.default,
pegasus.configs.node,
...pegasus.tsConfig(pegasus.configs.typescript),
];
// Or
export default pegasus.tsConfig(
pegasus.configs.default,
pegasus.configs.node,
...pegasus.configs.typescript,
);
By default, the following files are matched: **/*.ts
, **/*.mts
, **/*.cts
. To customize this, you can pass the files
option.
import pegasus from 'eslint-config-pegasus';
export default pegasus.tsConfig(
pegasus.configs.default, // core
pegasus.configs.node, // node
{
files: ['**/*.ts', '**/*.tsx'],
extends: pegasus.configs.typescript,
},
);
import pegasus from 'eslint-config-pegasus';
export default pegasus.tsConfig(
pegasus.configs.default,
pegasus.configs.node,
...pegasus.configs.typescriptRecommended,
);
This extendes typescript-eslint/recommended with typechecking
import pegasus from 'eslint-config-pegasus';
export default pegasus.tsConfig(
pegasus.configs.default,
pegasus.configs.node,
...pegasus.configs.typescriptStrict,
);
typescript-strict
includes all base, recommended and stylistic configuration
By default, the projectService
option is enabled in the parser options, which is needed for certain rules which require type information. This might conflict when passing the project
option to the parser.
To override this, you can disable projectService
and specify the project
to the custom tsconfig file.
import pegasus from 'eslint-config-pegasus';
export default pegasus.tsConfig(
pegasus.configs.default, // core
pegasus.configs.node, // node
{
extends: pegasus.configs.typescript,
languageOptions: {
parserOptions: {
projectService: false,
project: './tsconfig.eslint.json',
tsconfigRootDir: import.meta.dirname,
},
},
},
);
See typescript-eslint's docs for more information.
import pegasus from './index.js';
export default [
pegasus.configs.default,
{
...pegasus.configs.react,
files: ['test/fixtures/jsx/*.jsx'],
},
];
import pegasus from 'eslint-config-pegasus';
export default [
pegasus.configs.default, // core
pegasus.configs.browser,
];
FAQs
Eslint shareable config with personalized defaults
The npm package eslint-config-pegasus receives a total of 33 weekly downloads. As such, eslint-config-pegasus popularity was classified as not popular.
We found that eslint-config-pegasus 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.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.