@freelensapp/eslint-config
v0.1.0
Published
Lens eslint and prettier configurations
Downloads
3
Readme
Lens Code Style
Note: This package contains Eslint and Prettier configurations, name of package is @freelensapp/eslint-config
just because Eslint has arbitrary requirement (https://eslint.org/docs/latest/extend/shareable-configs).
Usage
- Install
@freelensapp/eslint-config
- Create
.prettierrc
that contains"@freelensapp/eslint-config/prettier"
- Add a
.eslintrc.js
that extends@freelensapp/eslint-config/eslint
, for example:
module.exports = {
extends: "@freelensapp/eslint-config/eslint",
parserOptions: {
project: "./tsconfig.json"
}
};
- Add linting and formatting scripts to
package.json
{
"scripts": {
"lint": "lens-lint",
"lint:fix": "lens-lint --fix"
}
}
- Run
npm run lint
to lint - Run
npm run format
to fix all formatting