
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
@ecohead/configs
Advanced tools
A collection of opinionated configuration files for my personal projects
This repository contains opinionated configurations for some tooling of the javascript ecosystem.
To use the minimal configuration, create or update the eslint.config.js file in your project with the following content:
import { defineConfig } from '@ecohead/configs/eslint';
export default defineConfig({
// Your additional configuration here
});
The defineConfig function also accepts as a second argument an array of files to be ignored by eslint in your project.
I provide some built-in configurations that you can use directly in your project, based on my personal preferences. I have disabled some rules that I find too strict or not useful for my use case. You are free to use them all or only some of them.
If you want to include all of them, I export a special variable that contains all the configurations.
import { defineConfig, all } from '@ecohead/configs/eslint';
export default defineConfig([...all]);
@eslint/jsimport { defineConfig, native } from '@ecohead/configs/eslint';
export default defineConfig([...native]);
typescript-eslintimport { defineConfig, typescript } from '@ecohead/configs/eslint';
export default defineConfig([...typescript]);
eslint-plugin-unicornimport { defineConfig, unicorn } from '@ecohead/configs/eslint';
export default defineConfig([...unicorn]);
eslint-plugin-sonarjsimport { defineConfig, sonar } from '@ecohead/configs/eslint';
export default defineConfig([...sonar]);
@eslint-community/eslint-plugin-eslint-commentsimport { defineConfig, comments } from '@ecohead/configs/eslint';
export default defineConfig([...comments]);
eslint-plugin-nimport { defineConfig, node } from '@ecohead/configs/eslint';
export default defineConfig([...node]);
eslint-config-prettierimport { defineConfig, prettier } from '@ecohead/configs/eslint';
export default defineConfig([...prettier]);
eslint-plugin-no-use-extend-nativeimport { defineConfig, noUseExtendNative } from '@ecohead/configs/eslint';
export default defineConfig([...noUseExtendNative]);
eslint-plugin-promiseimport { defineConfig, promise } from '@ecohead/configs/eslint';
export default defineConfig([...promise]);
eslint-plugin-import-ximport { defineConfig, importX } from '@ecohead/configs/eslint';
export default defineConfig([...importX]);
eslint-plugin-tailwindcssimport { defineConfig, tailwindcss } from '@ecohead/configs/eslint';
export default defineConfig([...tailwindcss]);
@adonisjs/eslint-pluginimport { defineConfig, adonis } from '@ecohead/configs/eslint';
export default defineConfig([...adonis]);
@unocss/eslint-configimport { defineConfig, unocss } from '@ecohead/configs/eslint';
export default defineConfig([...unocss]);
The configuration is based mainly for accessibility and readability purposes, which for some part is inherited from this reddit post.
To use the configuration, you can add the following to your prettier.config.js file:
import { definePrettierConfig } from '@ecohead/configs/prettier';
export default definePrettierConfig({
// Your additional configuration here
});
prettier-plugin-packagejsonThis plugin formats the package.json file in a more readable way, using sort-package-json under the hood.
To add a plugin in your configuration, simply add it to the plugins array in the definedPrettierConfig function
after installing it.
The following example shows how to add the prettier-plugin-tailwindcss plugin:
import { definePrettierConfig } from '@ecohead/configs/prettier';
export default definePrettierConfig({
// Your additional configuration here
plugins: [
// ...
'prettier-plugin-tailwindcss',
],
tailwindFunctions: ['clsx', 'cx', 'cva', 'cw', 'twMerge', 'tw'],
});
I export two configurations :
The SCSS configuration is based on the CSS configuration, with some additional rules for SCSS files.
To use the configuration, you can add the following to your stylelint.config.js file:
import { css, scss } from '@ecohead/configs/stylelint';
/** @type {import('stylelint').Config} */
export default {
...css, // or ...scss
// Your additional configuration here
};
The TypeScript configuration is as strict as possible from my point of view. It is inherited in high parts from the astro team's configuration.
I also export a special tsconfig file dedicated to eslint, which enables the noEmit flag.
To use the configuration, you can add the following to your tsconfig.json file:
For the default configuration:
{
"extends": "@ecohead/configs/tsconfig.json",
"compilerOptions": {
// Your additional configuration here
}
}
For the eslint configuration:
{
"extends": "@ecohead/configs/tsconfig.eslint.json",
"compilerOptions": {
// Your additional configuration here
}
}
FAQs
A collection of opinionated configuration files for my personal projects
We found that @ecohead/configs demonstrated a not healthy version release cadence and project activity because the last version was released 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
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.