{"_id":"@carp-dk/eslint-config","_rev":"1-57f1a3d0aedffb23bb339e2a1c3ff7ce","name":"@carp-dk/eslint-config","description":"Our ESLint config to use across our Javascript and Typescript projects","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@carp-dk/eslint-config","version":"1.0.0","author":{"name":"CACHET"},"license":"MIT","_id":"@carp-dk/eslint-config@1.0.0","maintainers":[{"name":"slimshadyiam","email":"me+npm@aamirfarooq.dev"},{"name":"jakdan99","email":"jakdan99@gmail.com"},{"name":"carp-dk-org","email":"support@carp.dk"}],"homepage":"https://github.com/cph-cachet/eslint-config#readme","bugs":{"url":"https://github.com/cph-cachet/eslint-config/issues"},"dist":{"shasum":"280f02d3dd9c4c443c62f78bb9f0b3438a542ef6","tarball":"https://registry.npmjs.org/@carp-dk/eslint-config/-/eslint-config-1.0.0.tgz","fileCount":4,"integrity":"sha512-DNs55egzh85tXUP8DZ5pDcl2QPqdrOSBpyG6lTk7KvN10FhoPjWoSoGYixUPsROJCCEgov9Beuw/xPHf9QKXjw==","signatures":[{"sig":"MEUCIQDI/eJsDfJkVajcg8UOW6fY5gosayyIa9TFfEKXLhzRPAIgCBsaAMMCI3jWnyq1YbtcB3Gbw0XP9bsb3PCcgza2Pbk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6270},"main":"index.js","gitHead":"8ba82b32a5f57c13610f16d7a1535bea91a2a7df","_npmUser":{"name":"carp-dk-org","email":"support@carp.dk"},"repository":{"url":"git+https://github.com/cph-cachet/eslint-config.git","type":"git"},"_npmVersion":"10.7.0","description":"Our ESLint config to use across our Javascript and Typescript projects","directories":{},"_nodeVersion":"22.1.0","dependencies":{"eslint":"^8.47.0","prettier":"^3.2.4","eslint-plugin-react":"^7.32.2","eslint-config-airbnb":"^19.0.4","eslint-plugin-import":"^2.28.0","eslint-config-prettier":"^8.10.0","eslint-plugin-prettier":"5.0.0-alpha.2","@typescript-eslint/parser":"^5.62.0","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-prefer-arrow":"^1.2.3","eslint-plugin-react-refresh":"^0.3.5","eslint-plugin-unused-imports":"^2.0.0","eslint-config-airbnb-typescript":"^17.1.0","@typescript-eslint/eslint-plugin":"^5.57.1","prettier-plugin-organize-imports":"^3.2.4"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/eslint-config_1.0.0_1718801293420_0.09979684642939057","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@carp-dk/eslint-config","version":"1.1.0","description":"Our ESLint config to use across our Javascript and Typescript projects","main":"index.js","repository":{"type":"git","url":"git+https://github.com/cph-cachet/eslint-config.git"},"author":{"name":"CACHET"},"license":"MIT","bugs":{"url":"https://github.com/cph-cachet/eslint-config/issues"},"devDependencies":{"@typescript-eslint/eslint-plugin":"^7.13.1","@typescript-eslint/parser":"^7.13.1","eslint":"^9.5.0","eslint-config-airbnb":"^19.0.4","eslint-config-airbnb-typescript":"^18.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-import":"^2.29.1","eslint-plugin-prefer-arrow":"^1.2.3","eslint-plugin-prettier":"5.0.0-alpha.2","eslint-plugin-react":"^7.32.2","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.4.7","eslint-plugin-unused-imports":"^4.0.0","prettier":"^3.2.4","prettier-plugin-organize-imports":"^3.2.4"},"peerDependencies":{"@typescript-eslint/eslint-plugin":"^7.13.1","@typescript-eslint/parser":"^7.13.1","eslint":"^9.5.0","eslint-config-airbnb":"^19.0.4","eslint-config-airbnb-typescript":"^18.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-import":"^2.29.1","eslint-plugin-prefer-arrow":"^1.2.3","eslint-plugin-prettier":"5.0.0-alpha.2","eslint-plugin-react":"^7.32.2","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.4.7","eslint-plugin-unused-imports":"^4.0.0","prettier":"^3.2.4","prettier-plugin-organize-imports":"^3.2.4"},"homepage":"https://github.com/cph-cachet/eslint-config#readme","_id":"@carp-dk/eslint-config@1.1.0","gitHead":"375e53bfe44d0eb0cd2330f73eaa368c6af0fa90","_nodeVersion":"22.1.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-vIz9PJZBaSadbe3rO9nTJQoa01c8h9judJv1uVDYjlApienWU8W22Yi8aBJLHil3wI9dFXTPcDvx1yqMpkOo+w==","shasum":"f674c49b25b9d93791f5b3aed92826ac4114b18b","tarball":"https://registry.npmjs.org/@carp-dk/eslint-config/-/eslint-config-1.1.0.tgz","fileCount":5,"unpackedSize":126929,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEP9+PSsr+MWcAgwulH98fhCDmSJtLvd3P8siP9t+O0qAiEA2bnIjaxdroF6aJ3NYcmTrWpfo/H7hSQGssopO/vT5lg="}]},"_npmUser":{"name":"carp-dk-org","email":"support@carp.dk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-config_1.1.0_1718959547791_0.3955425661587306"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-19T12:48:13.307Z","modified":"2024-06-21T08:45:48.164Z","1.0.0":"2024-06-19T12:48:13.609Z","1.1.0":"2024-06-21T08:45:47.958Z"},"maintainers":[{"name":"slimshadyiam","email":"me+npm@aamirfarooq.dev"},{"name":"jakdan99","email":"jakdan99@gmail.com"},{"name":"carp-dk-org","email":"support@carp.dk"}],"author":{"name":"CACHET"},"repository":{"type":"git","url":"git+https://github.com/cph-cachet/eslint-config.git"},"license":"MIT","homepage":"https://github.com/cph-cachet/eslint-config#readme","bugs":{"url":"https://github.com/cph-cachet/eslint-config/issues"},"readme":"# @carp-dk/eslint-config\n\nThis is our ESLint config used across our frontend JavaScript and TypeScript projects, including our React web apps and API wrapper.\n\n## Installation\n\nTo install this package, run the following command:\n\n```sh\nbun i -D @carp-dk/eslint-config\n```\n\n## Usage\nIn your `.eslintrc.js` file, extend our config:\n\n```js\nmodule.exports = {\n parserOptions: {\n    project: './tsconfig.json',\n    sourceType: 'module',\n    ecmaFeatures: {\n      jsx: true,\n    },\n    ecmaVersion: 2020,\n    tsconfigRootDir: __dirname,\n  },\n  extends: '@carp-dk'\n};\n```\n\nMake a `.prettierrc.js` file:\n```js\nexport default [{\n  \"trailingComma\": \"es5\",\n  \"tabWidth\": 2,\n  \"semi\": true,\n  \"singleQuote\": true,\n  \"plugins\": [import.meta.resolve('prettier-plugin-organize-imports')]\n}]\n```\n\n## ESLint Rules Explanation\n\nIn our ESLint configuration, we use several plugins to enforce specific coding standards and practices. Here's a brief explanation of what each plugin does:\n\n- `unused-imports`: This plugin helps to identify any imports that are not being used in the code. It helps to keep the code clean and efficient by removing unnecessary imports.\n\n- `prettier`: This plugin integrates Prettier with ESLint. Prettier is an opinionated code formatter that enforces a consistent style by parsing your code and re-printing it with its own rules.\n\n- `eslint-plugin-prefer-arrow`: This plugin enforces the use of arrow functions over traditional function expressions where possible. Arrow functions provide a more concise syntax and lexically bind the `this` value.\n\n- `react-refresh`: This plugin is used for fast refresh functionality in React applications. It helps to preserve the React state between hot reloads.\n\n- `eslint-plugin-react`: This plugin provides specific linting rules for React and JSX syntax to enforce best practices.\n\n- `eslint-plugin-react-hooks`: This plugin enforces the rules of Hooks. Hooks are a new addition in React that lets you use state and other React features without writing a class.\n\n- `eslint-plugin-react-refresh`: This plugin is used for fast refresh functionality in React applications. It helps to preserve the React state between hot reloads.\n\n- `eslint-plugin-unused-imports`: This plugin helps to identify any imports that are not being used in the code. It helps to keep the code clean and efficient by removing unnecessary imports.\n","readmeFilename":"README.md"}