ESLint Configuration Usage
Shared ESLint config to guide a consistent code style across front end development in (and outside!) Amido.
Installation
Our default export contains all of our ESLint rules. The configuration was built based on other open source configuration. To run and use with your project, we must install peer dependencies.
- To start run
npm install --save-dev @amidostacks/eslint-config
to save as a dev dependency - Install peer dependecies with the correct versions:
npx install-peerdeps --dev @amidostacks/eslint-config
Usage
After installing, simply add a .eslintrc
file the following to your project root (at the same level as package.json
):
{
"extends": [
"@amidostacks/eslint-config"
]
}
In your package.json
add a script to run linting:
"scripts": {
"lint": "node_modules/.bin/eslint . -f codeframe"
}
Publishing
For information on how to publish changes to the linting rules, please see Publishing Packages.
Security
We are using the eslint-plugin-security
plugin to help idendity potentuiall security hotspots. See Node Security for more information.