SW-3270 move interactive map to design system or booking flow * wip * wip * merge * wip * add support for locales in design-system * add story for HotelCard * setup alias * . * remove tracking from design-system for hotelcard * pass isUserLoggedIn * export design-system-new-deprecated.css from design-system * Add HotelMarkerByType to Storybook * Add interactive map to Storybook * fix reactintl in vitest * rename env variables * . * fix background colors * add storybook stories for <Link /> * merge * fix tracking for when clicking 'See rooms' in InteractiveMap * Merge branch 'master' of bitbucket.org:scandic-swap/web into SW-3270-move-interactive-map-to-design-system-or-booking-flow * remove deprecated comment Approved-by: Anton Gunnarsson
58 lines
1.7 KiB
JavaScript
58 lines
1.7 KiB
JavaScript
import { defineConfig, globalIgnores } from 'eslint/config'
|
|
import globals from 'globals'
|
|
import tsParser from '@typescript-eslint/parser'
|
|
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
import { FlatCompat } from '@eslint/eslintrc'
|
|
import js from '@eslint/js'
|
|
import importPlugin from 'eslint-plugin-import'
|
|
import formatjs from 'eslint-plugin-formatjs'
|
|
|
|
const compat = new FlatCompat({
|
|
recommendedConfig: js.configs.recommended,
|
|
allConfig: js.configs.all,
|
|
})
|
|
|
|
export default defineConfig([
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
},
|
|
parser: tsParser,
|
|
},
|
|
extends: compat.extends(
|
|
'eslint:recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'plugin:react-hooks/recommended',
|
|
'plugin:storybook/recommended'
|
|
),
|
|
plugins: {
|
|
'react-refresh': reactRefresh,
|
|
import: importPlugin,
|
|
formatjs,
|
|
},
|
|
rules: {
|
|
'import/no-relative-packages': 'error',
|
|
'react-refresh/only-export-components': [
|
|
'warn',
|
|
{
|
|
allowConstantExport: true,
|
|
},
|
|
],
|
|
|
|
'formatjs/enforce-default-message': ['error', 'literal'],
|
|
'formatjs/enforce-placeholders': ['error'],
|
|
'formatjs/enforce-plural-rules': ['error'],
|
|
'formatjs/no-literal-string-in-jsx': ['error'],
|
|
'formatjs/no-multiple-whitespaces': ['error'],
|
|
'formatjs/no-multiple-plurals': ['error'],
|
|
'formatjs/no-invalid-icu': ['error'],
|
|
'formatjs/no-id': ['error'],
|
|
'formatjs/no-complex-selectors': ['error'],
|
|
'formatjs/no-useless-message': ['error'],
|
|
'formatjs/prefer-pound-in-plural': ['error'],
|
|
},
|
|
},
|
|
globalIgnores(['**/dist', '**/.eslintrc.cjs']),
|
|
])
|