Haldi.com | Dotfiles for consistent application config.
npm install @haldi/dotfiles![image-dependencies] ![image-minified] ![image-types]
![image-downloads] ![image-shaking]
This package provides all the core pieces required for our ESlint, StyleLint, and Prettier configuration under a single package.
Install via your package manager
``bash
npm i @haldi/dotfiles -D
yarn add @haldi/dotfiles -D
`
All we've really done is provdied an exportable version of some configuration. This allows each application to spread over that object to further customize as needed.
Each set of tools uses the same basic set of steps as seen below.
1. Create a .eslintrc.js in the root of the application.eslintrc.js
1. Paste the code below code into the new
`js
const eslint = require('@haldi/dotfiles/dist/.eslintrc');
module.exports = eslint;
`
1. Create a .prettierrc.js in the root of the application.prettierrc.js
1. Paste the code below code into the new
`js
const prettier = require('@haldi/dotfiles/dist/.prettierrc');
module.exports = prettier;
`
1. Create a .stylelintrc.js in the root of the application.stylelintrc.js
1. Paste the code below code into the new
`js
const stylelint = require('@haldi/dotfiles/dist/.stylelintrc');
module.exports = stylelint;
`
1. Add the GRAPHQL_URL to your .env file in the root of the applicationpackage.json
1. Add the follow scripts to the
`js``
"generate": "cross-env NODE_OPTIONS=\"-r dotenv/config\" npm run generate:types",
"generate:types": "graphql-codegen --config ./node_modules/@haldi/dotfiles/dist/codegen.yml",
[image-dependencies]: https://badgen.net/bundlephobia/dependency-count/@haldi/dotfiles 'Dependencies'
[image-downloads]: https://badgen.net/npm/dt/@haldi/dotfiles 'Downloads'
[image-minified]: https://badgen.net/bundlephobia/minzip/@haldi/dotfiles 'Minified'
[image-shaking]: https://badgen.net/bundlephobia/tree-shaking/@haldi/dotfiles 'Tree Shakeable'
[image-types]: https://badgen.net/npm/types/@haldi/dotfiles 'Types'
[image-dependabot]: https://badgen.net/badge/icon/dependabot?icon=dependabot&label 'Dependabot'