{"_id":"@econominhas/eslint-config","_rev":"1-f32324b7baf4ecf5fb1d2afbdf632cb3","name":"@econominhas/eslint-config","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@econominhas/eslint-config","version":"1.0.0","license":"Apache-2.0","author":{"name":"Econominhas"},"description":"Econominhas Style Guide","homepage":"https://github.com/econominhas/eslint-config#readme","bugs":{"url":"https://github.com/econominhas/eslint-config/issues"},"repository":{"type":"git","url":"git+https://github.com/econominhas/eslint-config.git"},"packageManager":"^pnpm@8.15.6","publishConfig":{"directory":"dist"},"keywords":["eslint","eslintconfig","econominhas","jest","best-practices","clean-code","solid","dry","kiss","typescript","code-style","config","styleguide","react","nextjs","prettier","tslint"],"peerDependencies":{"eslint":"^8.0.0","prettier":"^3.0.0","typescript":"^5.0.0"},"dependencies":{"@babel/core":"^7.18.13","@babel/eslint-parser":"^7.18.9","@next/eslint-plugin-next":"^14.1.0","@rushstack/eslint-patch":"^1.0.9","@typescript-eslint/eslint-plugin":"^7.0.2","@typescript-eslint/parser":"^7.0.2","eslint-config-prettier":"^9.1.0","eslint-config-standard":"^17.0.0","eslint-import-resolver-node":"^0.3.6","eslint-import-resolver-typescript":"^3.5.0","eslint-plugin-import":"^2.24.2","eslint-plugin-jest":"^27.9.0","eslint-plugin-jest-formatting":"^3.0.0","eslint-plugin-prefer-arrow":"^1.2.3","eslint-plugin-prettier":"^5.1.3","eslint-plugin-react":"^7.31.1","eslint-plugin-react-hooks":"^4.2.1-alpha-4298ddbc5-20211023","eslint-plugin-sonarjs":"^0.24.0"},"devDependencies":{"eslint":"^8.23.0","husky":"^9.0.11","lint-staged":"^15.2.2","prettier":"^3.2.5","typescript":"^5.3.3"},"scripts":{"build":"./scripts/build.sh","format":"eslint . --fix --quiet","lint":"eslint . --quiet","upgrade:dependencies":"pnpm update --latest","lk":"pnpm run build && cd dist && pnpm link --global --dir . && cd ..","ulk":"pnpm unlink && pnpm run lk"},"_id":"@econominhas/eslint-config@1.0.0","_integrity":"sha512-xz2xyEbhsmFTppPXA238Ttqch/srWuTL6R4V5UusdRkPpwNpDn0ZWMrQtZ8ghTrK1TrXEhKc5s4g6ygFlnG/5w==","_resolved":"/tmp/6ad4be18a43cf360c6f9df050d0c4ac2/econominhas-eslint-config-1.0.0.tgz","_from":"file:econominhas-eslint-config-1.0.0.tgz","_nodeVersion":"20.12.0","_npmVersion":"10.5.0","dist":{"integrity":"sha512-xz2xyEbhsmFTppPXA238Ttqch/srWuTL6R4V5UusdRkPpwNpDn0ZWMrQtZ8ghTrK1TrXEhKc5s4g6ygFlnG/5w==","shasum":"c4998ece2b9631b076b3d83a9bf62a292dc062f1","tarball":"https://registry.npmjs.org/@econominhas/eslint-config/-/eslint-config-1.0.0.tgz","fileCount":6,"unpackedSize":34738,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClLjkTteLkb+SqecPjr6KIWTNSsnsyJG/G0X7ld1wQfgIgU2DT1i/z6GQb2Us6T5RivxnZeXeDtgTFXLyQxcp6/3A="}]},"_npmUser":{"name":"henriqueleite42","email":"contact.henriqueleite42@gmail.com"},"directories":{},"maintainers":[{"name":"henriqueleite42","email":"contact.henriqueleite42@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-config_1.0.0_1712092518089_0.9487834349000599"},"_hasShrinkwrap":false},"1.0.1":{"name":"@econominhas/eslint-config","version":"1.0.1","license":"Apache-2.0","author":{"name":"Econominhas"},"description":"Econominhas Style Guide","homepage":"https://github.com/econominhas/eslint-config#readme","bugs":{"url":"https://github.com/econominhas/eslint-config/issues"},"repository":{"type":"git","url":"git+https://github.com/econominhas/eslint-config.git"},"publishConfig":{"directory":"dist"},"keywords":["eslint","eslintconfig","econominhas","jest","best-practices","clean-code","solid","dry","kiss","typescript","code-style","config","styleguide","react","nextjs","prettier","tslint"],"peerDependencies":{"eslint":"^8.0.0","prettier":"^3.0.0","typescript":"^5.0.0"},"dependencies":{"@babel/core":"^7.18.13","@babel/eslint-parser":"^7.18.9","@next/eslint-plugin-next":"^14.1.0","@rushstack/eslint-patch":"^1.0.9","@typescript-eslint/eslint-plugin":"^7.0.2","@typescript-eslint/parser":"^7.0.2","eslint-config-prettier":"^9.1.0","eslint-config-standard":"^17.0.0","eslint-import-resolver-node":"^0.3.6","eslint-import-resolver-typescript":"^3.5.0","eslint-plugin-import":"^2.24.2","eslint-plugin-jest":"^27.9.0","eslint-plugin-jest-formatting":"^3.0.0","eslint-plugin-prefer-arrow":"^1.2.3","eslint-plugin-prettier":"^5.1.3","eslint-plugin-react":"^7.31.1","eslint-plugin-react-hooks":"^4.2.1-alpha-4298ddbc5-20211023","eslint-plugin-sonarjs":"^0.24.0"},"devDependencies":{"eslint":"^8.23.0","husky":"^9.0.11","lint-staged":"^15.2.2","prettier":"^3.2.5","typescript":"^5.3.3"},"scripts":{"build":"./scripts/build.sh","format":"eslint . --fix --quiet","lint":"eslint . --quiet","upgrade:dependencies":"pnpm update --latest","lk":"pnpm run build && cd dist && pnpm link --global --dir . && cd ..","ulk":"pnpm unlink && pnpm run lk"},"_id":"@econominhas/eslint-config@1.0.1","_integrity":"sha512-yuyzOLMxbWxfzp7RzHI7V25ukzGbLIawUHbaqS9kjG5sM+LwsBpdydd0ueZyabznKpPB3MwONkkve5YwQ/ziDw==","_resolved":"/tmp/18913fd4ad31bcd4fdbbbef7166b43c0/econominhas-eslint-config-1.0.1.tgz","_from":"file:econominhas-eslint-config-1.0.1.tgz","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-yuyzOLMxbWxfzp7RzHI7V25ukzGbLIawUHbaqS9kjG5sM+LwsBpdydd0ueZyabznKpPB3MwONkkve5YwQ/ziDw==","shasum":"0cc010dfa50af288c8026c12f1734a524dccc1ef","tarball":"https://registry.npmjs.org/@econominhas/eslint-config/-/eslint-config-1.0.1.tgz","fileCount":6,"unpackedSize":34742,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8OVRGNYxFZKcKofP5kpuyQ1omwZu+v04tvsKz+6M+yAIhAOKyrmfCS/abtShTr3aAEMAmc0Tdylu+5Uy7HBZv15zk"}]},"_npmUser":{"name":"henriqueleite42","email":"contact.henriqueleite42@gmail.com"},"directories":{},"maintainers":[{"name":"henriqueleite42","email":"contact.henriqueleite42@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-config_1.0.1_1714172152095_0.6292182299374414"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-02T21:15:17.987Z","1.0.0":"2024-04-02T21:15:18.297Z","modified":"2024-04-26T22:55:52.487Z","1.0.1":"2024-04-26T22:55:52.261Z"},"maintainers":[{"name":"henriqueleite42","email":"contact.henriqueleite42@gmail.com"}],"description":"Econominhas Style Guide","homepage":"https://github.com/econominhas/eslint-config#readme","keywords":["eslint","eslintconfig","econominhas","jest","best-practices","clean-code","solid","dry","kiss","typescript","code-style","config","styleguide","react","nextjs","prettier","tslint"],"repository":{"type":"git","url":"git+https://github.com/econominhas/eslint-config.git"},"author":{"name":"Econominhas"},"bugs":{"url":"https://github.com/econominhas/eslint-config/issues"},"license":"Apache-2.0","readme":"<div align=\"center\">\n\n<img src=\"https://avatars.githubusercontent.com/u/120692541?s=200&v=4\" width=\"200\" height=\"200\">\n\n# Econominhas - Style Guide\n\n[![Style Guide: Econominhas](https://img.shields.io/badge/style%20guide-ECONOMINHAS-4B00FA?style=for-the-badge)](https://github.com/econominhas/eslint-config)\n[![npm](https://img.shields.io/npm/v/@econominhas/eslint-config.svg?style=for-the-badge&color=CC3534)](https://www.npmjs.com/package/@econominhas/eslint-config)\n[![Downloads](https://img.shields.io/npm/dw/@econominhas/eslint-config.svg?style=for-the-badge)](https://www.npmjs.com/package/@econominhas/eslint-config)\n\n</div>\n\nIn this package, you can find the **Econominhas Style Guide**. We try to keep a clean and consistent code style, with modern features and using best practices.\n\n## Badges\n\n[![plastic](https://img.shields.io/badge/style%20guide-Econominhas-4B00FA?style=plastic)](https://github.com/econominhas/eslint-config)\n\n```md\n[![Style Guide: Econominhas](https://img.shields.io/badge/style%20guide-Econominhas-4B00FA?style=plastic)](https://github.com/econominhas/eslint-config)\n```\n\n[![flat](https://img.shields.io/badge/style%20guide-Econominhas-4B00FA?style=flat)](https://github.com/econominhas/eslint-config)\n\n```md\n[![Style Guide: Econominhas](https://img.shields.io/badge/style%20guide-Econominhas-4B00FA?style=flat)](https://github.com/econominhas/eslint-config)\n```\n\n[![square](https://img.shields.io/badge/style%20guide-Econominhas-4B00FA?style=square)](https://github.com/econominhas/eslint-config)\n\n```md\n[![Style Guide: Econominhas](https://img.shields.io/badge/style%20guide-Econominhas-4B00FA?style=square)](https://github.com/econominhas/eslint-config)\n```\n\n[![for-the-badge](https://img.shields.io/badge/style%20guide-Econominhas-4B00FA?style=for-the-badge)](https://github.com/econominhas/eslint-config)\n\n```md\n[![Style Guide: Econominhas](https://img.shields.io/badge/style%20guide-Econominhas-4B00FA?style=for-the-badge)](https://github.com/econominhas/eslint-config)\n```\n\n## Why use this config?\n\n- Best practices focused in modern features and principles (SOLID, DRY, KISS, Clean Code)\n- Constant maintenance\n- More complete: Includes more features than other configs, like AirBnB\n- Ready-to-go: You don't need any extra config\n- Bye bye prettier: You don't need to be using the prettier extension for VSCode\n\n## Install\n\nThis config needs prettier and eslint to work, as it is only a config and not the real package.\n\n```sh\npnpm add -D @econominhas/eslint-config eslint prettier\n```\n\n**Obs:** If you are using **VSCode**, you may need/want to do some [extra steps](#extra---vscode-tips--tricks).\n\n## Basic Usage\n\n1 - Create a `.eslintrc.js` file in the root of your project\n\n2 - Put the following content inside the file:\n\n```js\nmodule.exports = {\n\troot: true,\n\textends: \"@econominhas\",\n};\n```\n\n3 - Restart VSCode, and it's done!\n\n## Modules\n\n**Alert:** After any change at `.eslintrc.js` file, you should restart VSCode to ensure that it's working properly. This is a limitation of ESLint/VSCode, not our config.\n\n**Alert:** The **common module** must **ALWAYS** be extend, and must **ALWAYS** be the fist one.\n\nThis repository contains the best practices divided by libs, frameworks and tools. The currently existent modules are:\n\n<!--  -->\n<!--  -->\n<!--  -->\n\n<details>\n\n<summary><strong>Common</strong></summary>\n\nThe 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.**\n\n#### Usage\n\nCreate an `.eslintrc.js` file in the root folder of your package and add this content to it:\n\n```js\nmodule.exports = {\n\troot: true,\n\textends: \"@econominhas\",\n};\n```\n\n</details>\n\n<!--  -->\n<!--  -->\n<!--  -->\n\n<details>\n\n<summary><strong>Jest</strong></summary>\n\nSpecific configs to projects that uses Jest.\n\n#### Usage\n\nCreate an `.eslintrc.js` file in the root folder of your package and add this content to it:\n\n```js\n/* eslint-disable @typescript-eslint/no-var-requires */\n/* eslint-disable @typescript-eslint/no-require-imports */\n\nmodule.exports = {\n\troot: true,\n\textends: [\n\t\t\"@econominhas\", // The common module always should be extended!\n\t\t\"@econominhas/eslint-config/jest\",\n\t],\n\tsettings: {\n\t\tjest: {\n\t\t\tversion: require(\"jest/package.json\").version,\n\t\t},\n\t},\n};\n```\n\n</details>\n\n<!--  -->\n<!--  -->\n<!--  -->\n\n<details>\n\n<summary><strong>TypeScript</strong></summary>\n\nSpecific configs for typescript projects.\n\n#### Usage\n\nCreate an `.eslintrc.js` file in the root folder of your package and add this content to it:\n\n```js\nmodule.exports = {\n\troot: true,\n\textends: [\n\t\t\"@econominhas\", // The common module always should be extended!\n\t\t\"@econominhas/eslint-config/typescript\",\n\t],\n};\n```\n\n#### Using another `tsconfig` for linting\n\nBy default, this module uses `tsconfig.json` file for configuring the typescript for the project, but you can use another file specifically for linting.\n\nTo use another file, simply add this to your `.eslintrc.js` file:\n\n```js\n/// .eslintrc.js\nmodule.exports = {\n\t// ...\n\tparserOptions: {\n\t\tproject: \"tsconfig.lint.json\", // <<< Name of the tsconfig file here (Must be in the root folder of the project)\n\t},\n\t// ...\n};\n```\n\n</details>\n\n## Combining Modules\n\nYou can safely combine some modules, like this:\n\n```js\nmodule.exports = {\n\troot: true,\n\textends: [\n\t\t\"@econominhas\", // The common module always should be extended!\n\t\t\"@econominhas/eslint-config/typescript\",\n\t\t\"@econominhas/eslint-config/jest\",\n\t],\n};\n```\n\n## Extra - VSCode Tips & Tricks\n\n### See the errors and warnings\n\n<img src=\"https://dbaeumer.gallerycdn.vsassets.io/extensions/dbaeumer/vscode-eslint/3.0.5/1712051003124/Microsoft.VisualStudio.Services.Icons.Default\" width=\"50\" height=\"50\">\n\n- Go to the VSCode Extensions Store\n- Search for `dbaeumer.vscode-eslint` and install it\n\n### Auto fix (most of) errors and warnings\n\n**Obs:** You need to have the ESLint extension installed.\n\nAdd this to the project's `.vscode/settings.json` file:\n\n```json\n{\n\t// Make ESLint fix all the things that he can on save (like prettier formatting)\n\t\"editor.codeActionsOnSave\": {\n\t\t\"source.fixAll.eslint\": \"always\"\n\t},\n\n\t// Remove formatter to avoid conflicts\n\t\"[javascript]\": {\n\t\t\"editor.defaultFormatter\": null\n\t},\n\t\"[typescript]\": {\n\t\t\"editor.defaultFormatter\": null\n\t},\n\t\"[javascriptreact]\": {\n\t\t\"editor.defaultFormatter\": null\n\t},\n\t\"[typescriptreact]\": {\n\t\t\"editor.defaultFormatter\": null\n\t}\n}\n```\n","readmeFilename":"README.md"}