Files
lens/packages/infrastructure/eslint-config
Sebastian Malton 807f98ed1b Persist apiVersion when editing resources in monaco (#4406)
* Persist apiVersion when editing resources in monaco

- Use a new custom k8slens prefixed label

- Means that users aren't surprised when they use lens to update a
  resource to a new apiVersionWithGroup

- Doesn't touch the versions in the stores

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix lint

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* fix: Fix lint issues

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* chore: make lint not bail on failure

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* chore: Run lint:fix on all files

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-04-05 10:56:23 -04:00
..
2023-03-14 11:40:35 -04:00

Lens Code Style

Note: This package contains Eslint and Prettier configurations, name of package is @k8slens/eslint-config just because Eslint has arbitrary requirement (https://eslint.org/docs/latest/extend/shareable-configs).

Usage

  1. Install @k8slens/eslint-config
  2. Create .prettierrc that contains "@k8slens/eslint-config/prettier"
  3. Add a .eslintrc.js that extends @k8slens/eslint-config/eslint, for example:
module.exports = {
  extends: "@k8slens/eslint-config/eslint",
  parserOptions: {
    project: "./tsconfig.json"
  }
};
  1. Add linting and formatting scripts to package.json
{
  "scripts": {
    "lint": "lens-lint",
    "lint:fix": "lens-lint --fix"
  }
}
  1. Run npm run lint to lint
  2. Run npm run format to fix all formatting