1.0.3 • Published 3 years ago

@hurtigruten/eslint-config v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Hurtigruten shared eslint config

How to

Install the config

npm install --D @hurtigruten/eslint-config

Install all needed peer dependencies

npx install-peerdeps --dev @hurtigruten/eslint-config

Extend the eslint config file

{
  "extends": "@hurtigruten/eslint-config"
}

React

To use with React extend the eslint config with additional rules:

{
  "extends": ["@hurtigruten/eslint-config", "@hurtigruten/eslint-config/react"]
}

Svelte

To use with Svelte extend the eslint config with additional svelte rules:

{
  "extends": ["@hurtigruten/eslint-config", "@hurtigruten/eslint-config/svelte"]
}

Svelte any prop type fix

Svelte doesn't support generic prop types yet and we end up using any quite often, thats why these rules have been disabled:

'@typescript-eslint/no-unsafe-assignment',
'@typescript-eslint/no-unsafe-return',
'@typescript-eslint/no-unsafe-member-access'

:warning: When Svelte will make it possible to set generic types to props and events these should be removed.