1.0.3 • Published 4 years ago
@hurtigruten/eslint-config v1.0.3
Hurtigruten shared eslint config
How to
Install the config
npm install --D @hurtigruten/eslint-configInstall all needed peer dependencies
npx install-peerdeps --dev @hurtigruten/eslint-configExtend 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.