{"_id":"@bldr-pkgs/eslint-conf","_rev":"3-e2266fdea4eaedc0d381e538c0d9cdd5","name":"@bldr-pkgs/eslint-conf","dist-tags":{"latest":"1.1.0"},"versions":{"1.1.0":{"name":"@bldr-pkgs/eslint-conf","version":"1.1.0","description":"Boulder's ESLint rules","main":"index.js","repository":{"type":"git","url":"git+https://github.com/boulder/eslint-config.git"},"publishConfig":{"access":"public"},"dependencies":{"@typescript-eslint/eslint-plugin":"^5.36.2","@typescript-eslint/parser":"^5.36.2","eslint-config-airbnb":"^19.0.4","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","prettier":"^2.7.1","typescript":"^4.8.3"},"gitHead":"0b82d55c8064358c62cb9dea74796c3373359b69","bugs":{"url":"https://github.com/boulder/eslint-config/issues"},"homepage":"https://github.com/boulder/eslint-config#readme","_id":"@bldr-pkgs/eslint-conf@1.1.0","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-oKE8WiNiekEdTE9wAmUxcf08D+FYRGTzYhlMcaGaWzrrDWjidcrnk+c8IBRx7rdIbSmQ7+sjGs48A7qjWDYtKQ==","shasum":"62540e98d0f7a8da11fb36617cfc245889c3225a","tarball":"https://registry.npmjs.org/@bldr-pkgs/eslint-conf/-/eslint-conf-1.1.0.tgz","fileCount":6,"unpackedSize":8951,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBsW+oIY0JLtxU/XyXkFLSdXUkhCNdYKTknhDlGjZygOAiAB5OLBY7z3+Wslm6Selx7zgQVprOmfkAQHcTHbhm+pHw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjakkHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoh9A/6A+h0RWpm6A5WkDrKMyoNEldTQ02FVNesFChpU1zmhm/msJ+7\r\nMlqakTOiy23GEvI3sDrElA1b92201XcWXTKu0pdOw5az2CP5YjfL2ca7RTb4\r\n7R5mSd886NTb3r/07l/xqZ46b6cis6JuwtSDi1pmaKMMzu8SkkjgR37Q2/FX\r\nJSClhyFXoYPn+8xbbQX7Nqk/RIsiu8cNFYxnw8A7VNEifJoPn2mRT9sq1mZv\r\np5+9F52GcKP/3p0cYkR3uej6xn+qzMsVIh0c2STl5SVs6gdXoJpxmebzTWG2\r\nWwME/hKGBr9f3otLo//pWAzJL+M33MMIs/2AR5hRAQ6jbJ30dqOHIOMRXj4k\r\ngXwDW2ubuLocTaPp2Pr/RSH9WcMNkf+AS7JxWs1VJ+9/SzbOlAwjORWDqzdR\r\n+Q5wWh1+lJcpbRmOgIUVH1W7fkARrJIw3QAzUaJ12yTdic19621FpG4ABKQM\r\nU3fnEyz1AlAAhvlspPf5GRJKmY2SGHlvhtbMU5mx+FWU2uULGBBKrsBdUl78\r\nfjMh/W65UaGfRcf2w9jt8jJv3GHDxz81UhsBtH24zz5Q38IimZBtldbXD64X\r\n7JFkRjkI8AzLNhBg3vbleDtWGMEN9IgJEp7tLxbGyRLYhUMoNNLFeBBIf1kH\r\nwvqRT/aFhUae7vdYfeMny/1xUpmy2MH/QwI=\r\n=lGjS\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bldr-operations","email":"operations@boulder.se"},"directories":{},"maintainers":[{"name":"bldr-operations","email":"operations@boulder.se"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-conf_1.1.0_1667909895243_0.7263908108126713"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2022-11-08T12:18:15.168Z","1.1.0":"2022-11-08T12:18:15.408Z","modified":"2023-01-04T12:31:42.690Z"},"maintainers":[{"email":"anders@boulder.se","name":"andersroseen"},{"email":"operations@boulder.se","name":"bldr-operations"},{"email":"erik@boulder.se","name":"eekan"}],"description":"Boulder's ESLint rules","homepage":"https://github.com/boulder/eslint-config#readme","repository":{"type":"git","url":"git+https://github.com/boulder/eslint-config.git"},"bugs":{"url":"https://github.com/boulder/eslint-config/issues"},"readme":"# Boulder ESLint configuration\n\nBoulder's ESLint rules for our JS/TS projects. The ruleset is mostly based on [Airbnb's JavaScript Style Guide][airbnb] and [Prettier's opinionated code formatting setup][prettier].\n\n---\n\n## 1. Usage\n\n### 1.A Installation\n\nThis package is published via npm, [but using Github Packages][github_packages]. To add it in a project you need to:\n\n1. add a file called `.npmrc` in the project root folder (same folder as package.json) and add the following:\n\n```bash\n@boulder:registry=https://npm.pkg.github.com/boulder\n```\n\n2. Install the config as one of your project's `devDependencies`. No other ESLint and/or Prettier dependencies are needed (these are included in the our npm package).\n\n```\nnpm install --save-dev @boulder/eslint-config\n```\n\n3. Add linting scripts to your `package.json`.\n\n```json\n  \"scripts\": {\n    // ...other scripts\n    \"eslint\": \"eslint src --ext .js,.jsx,.ts,.tsx\",\n    \"eslint-fix\": \"eslint src --ext .js,.jsx,.ts,.tsx --fix\"\n  }\n```\n\nThese scripts are very useful in combination with the below `vscode` config (which will fix all fixable issues on save):\n\n```json\n  \"editor.codeActionsOnSave\": {\n    \"source.fixAll\": true\n  },\n```\n\n### 1.B Project configuration\n\nThe package includes four different configurations which can be combined depending on specific project needs. These are:\n\n- `@boulder/eslint-config/base`\n- `@boulder/eslint-config/react`\n- `@boulder/eslint-config/typescript`\n- `@boulder/eslint-config/prettier`\n\n#### Base configuration\n\nYou should **always** include the `@boulder/eslint-config/base` config, regardless of project setup.\n\nHence, add an `.eslintrc.json` file with **at least** the following content:\n\n```json\n{\n  \"root\": true,\n  \"extends\": \"@boulder/eslint-config/base\"\n}\n```\n\n#### Other configs\n\nDepending on your project needs (React, TypeScript etc), you can include other configs in the `extends` property. Note that the _order in which you include the configs in the array matter_ – latter configs override rules stated in former configs in case of conflict.\n\n```json\n{\n  \"root\": true,\n  \"extends\": [\n    \"@boulder/eslint-config/react\",\n    \"@boulder/eslint-config/base\",\n    \"@boulder/eslint-config/typescript\",\n    \"@boulder/eslint-config/prettier\"\n  ]\n}\n```\n\nThis is further exemplified in the [`demo/src`](demo/src) folder.\n\n### 1.C Install the ESLint VS Code extension (optional)\n\nThe [VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) uses the installed ESLint library in the workspace folder. It gives immediate visual linting feedback in your files.\n\n## 2. Developing\n\nIt's possible to publish packages locally by running the below command in the root of this project.\n\n```bash\nnpm pack\n```\n\nThe generated `.tgz` file can be used to install the package in another project, _e.g._:\n\n```\nnpm install --save-dev ../eslint-config/boulder-eslint-config-1.0.0.tgz\n```\n\n_It's safe to publish packages locally with `npm pack`_. It doesn't affect the package we have published in the npm registry.\n\n## 3. Publishing\n\nIf changes are made to this package, it should be versioned in accordance with [semver][semver]. That roughly means that:\n\n- if the update includes **major** changes (which means making the API incompatible, such as modifying how the configurations are accessed), run the following command from the `master` branch:\n\n```bash\nnpm version major && npm publish && git push origin master\n```\n\n- if the update includes **minor** changes (which means adding functionality in a backwards compatible manner, such as adding a new rule), run the following command from the `master` branch:\n\n```bash\nnpm version minor && npm publish && git push origin master\n```\n\n- if the update is **a bug fix or smaller changes** (as long as the fixes are backwards compatible), run the following command from the `master` branch:\n\n```bash\nnpm version patch && npm publish && git push origin master\n```\n\n[npm]: https://www.npmjs.com\n[node]: https://nodejs.org\n[eslint]: https://github.com/eslint/eslint\n[airbnb]: https://github.com/airbnb/javascript\n[prettier]: https://prettier.io/\n[github_packages]: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry\n[github_packages_authenticating]: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-to-github-packages\n[semver]: https://semver.org/\n","readmeFilename":"README.md"}