
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@techmmunity/eslint-config
Advanced tools
In this package, you can find the Techmmunity Style Guide. We try to keep a clean and consistent code style, with modern features and using best practices.
This package may not be updated so often, but it not means that it has been abandoned. We do the config in a way to (almost) never have to touch it again, and we only update the package to add new features, what may don't need to happen so often.
[](https://github.com/techmmunity/eslint-config)
[](https://github.com/techmmunity/eslint-config)
[](https://github.com/techmmunity/eslint-config)
[](https://github.com/techmmunity/eslint-config)
yarn add -D @techmmunity/eslint-config eslint prettier
Obs: If you are using VSCode, you may need/want to do some extra steps.
1 - Create a .eslintrc.json file in the root of your project
2 - Put the following content inside the file:
{
"root": true,
"extends": "@techmmunity/eslint-config"
}
3 - Restart the VSCode, and it's done!
We provide an example repository, you can give a look at it, or join our discord community and make some questions!
Alert: After any change at eslintrc.json file, you must restart VSCode.
Alert: The common module must ALWAYS be extend, and must ALWAYS be the fist one.
This repository contains the best practices divided by libs, frameworks and tools. The currently existent modules are:
The common module is the default rules used by every javascript project. It doesn't contains any special config for frameworks, backend, frontend or npm package. You must import this module if you want to use any of the other modules of this package.
Tip: You can see an example project here
Create an .eslintrc.json file in the root folder of your package and add this content to it:
{
"root": true,
"extends": "@techmmunity/eslint-config/common"
}
Specific configs to projects that uses Jest.
Create an .eslintrc.json file in the root folder of your package and add this content to it:
{
"root": true,
"extends": [
"@techmmunity/eslint-config/common", // The common module always should be extended!
"@techmmunity/eslint-config/jest"
]
}
Specific configs to projects that uses NextJs.
Create an .eslintrc.json file in the root folder of your package and add this content to it:
{
"root": true,
"extends": [
"@techmmunity/eslint-config/common", // The common module always should be extended!
"@techmmunity/eslint-config/nextjs"
]
}
Specific configs to projects that uses React.
Create an .eslintrc.json file in the root folder of your package and add this content to it:
{
"root": true,
"extends": [
"@techmmunity/eslint-config/common", // The common module always should be extended!
"@techmmunity/eslint-config/react"
]
}
Specific configs to projects that uses NextJs with TypeScript.
Create an .eslintrc.json file in the root folder of your package and add this content to it:
{
"root": true,
"extends": [
"@techmmunity/eslint-config/common", // The common module always should be extended!
"@techmmunity/eslint-config/ts-nextjs"
]
}
Specific configs to projects that uses React with TypeScript.
Create an .eslintrc.json file in the root folder of your package and add this content to it:
{
"root": true,
"extends": [
"@techmmunity/eslint-config/common", // The common module always should be extended!
"@techmmunity/eslint-config/ts-react"
]
}
Specific configs for typescript projects.
Create an .eslintrc.json file in the root folder of your package and add this content to it:
{
"root": true,
"extends": [
"@techmmunity/eslint-config/common", // The common module always should be extended!
"@techmmunity/eslint-config/typescript"
]
}
You can safely combine some modules, like this:
{
"root": true,
"extends": [
"@techmmunity/eslint-config/common", // The common module always should be extended!
"@techmmunity/eslint-config/typescript",
"@techmmunity/eslint-config/jest"
]
}
But in some cases, where that module is already imported, it will cause a conflict, like in this case:
{
"root": true,
"extends": [
"@techmmunity/eslint-config/common", // The common module always should be extended!
"@techmmunity/eslint-config/nextjs"
]
}
If you are using the VSCode Prettier Extension, you need to disable it, because this package already configs the prettier and uses it under the hood.
To disable Prettier, you just need to add this to your vscode configs:
{
"[javascript]": {
"editor.defaultFormatter": null
},
"[typescript]": {
"editor.defaultFormatter": null
},
"[javascriptreact]": {
"editor.defaultFormatter": null
},
"[typescriptreact]": {
"editor.defaultFormatter": null
}
}
You can access this configs by pressing Ctrl + Shift + P and tipping Preferences: Open Settings (JSON).
Ctrl + Shift + Xdbaeumer.vscode-eslintCtrl + Shift + PPreferences: Open Settings (JSON)// Make ESLint fix all the things that he can on save (like prettier formatting)
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
To test this package:
yarn unlink, but for your first time, you can ignore thisyarn lkyarn link @techmmunity/eslint-configTip: You can use npx eslint . to lint the project automatically
[5.2.4] - 2022-08-27
no-mixed-operators0 in no-magic-numbersFAQs
Techmmunity Style Guide
We found that @techmmunity/eslint-config 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
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.