Merged in feat/sw-2880-prepare-booking-flow-package (pull request #2467)
feat(SW-2880) Prepare booking flow package * Init booking-flow package * Add gitignore * Use booking-flow package * Use design-system Approved-by: Joakim Jäderberg
This commit is contained in:
92
packages/booking-flow/eslint.config.mjs
Normal file
92
packages/booking-flow/eslint.config.mjs
Normal file
@@ -0,0 +1,92 @@
|
||||
import { FlatCompat } from "@eslint/eslintrc"
|
||||
import js from "@eslint/js"
|
||||
import typescriptEslint from "@typescript-eslint/eslint-plugin"
|
||||
import tsParser from "@typescript-eslint/parser"
|
||||
import { defineConfig } from "eslint/config"
|
||||
import simpleImportSort from "eslint-plugin-simple-import-sort"
|
||||
|
||||
const compat = new FlatCompat({
|
||||
recommendedConfig: js.configs.recommended,
|
||||
allConfig: js.configs.all,
|
||||
})
|
||||
|
||||
export default defineConfig([
|
||||
{
|
||||
extends: compat.extends("next/core-web-vitals", "plugin:import/typescript"),
|
||||
plugins: {
|
||||
"simple-import-sort": simpleImportSort,
|
||||
"@typescript-eslint": typescriptEslint,
|
||||
},
|
||||
|
||||
languageOptions: {
|
||||
parser: tsParser,
|
||||
},
|
||||
|
||||
rules: {
|
||||
"no-unused-vars": "off",
|
||||
"react/function-component-definition": "error",
|
||||
"import/no-relative-packages": "error",
|
||||
"simple-import-sort/imports": [
|
||||
"error",
|
||||
{
|
||||
groups: [
|
||||
["^\\u0000"],
|
||||
["^node:"],
|
||||
["^@?\\w"],
|
||||
["^@scandic-hotels/(?!.*\u0000$).*$"],
|
||||
[
|
||||
"^@/constants/?(?!.*\u0000$).*$",
|
||||
"^@/env/?(?!.*\u0000$).*$",
|
||||
"^@/lib/?(?!.*\u0000$).*$",
|
||||
"^@/server/?(?!.*\u0000$).*$",
|
||||
"^@/stores/?(?!.*\u0000$).*$",
|
||||
],
|
||||
["^@/(?!(types|.*\u0000$)).*$"],
|
||||
[
|
||||
"^\\.\\.(?!/?$)",
|
||||
"^\\.\\./?$",
|
||||
"^\\./(?=.*/)(?!/?$)",
|
||||
"^\\.(?!/?$)",
|
||||
"^\\./?$",
|
||||
],
|
||||
["^(?!\\u0000).+\\.s?css$"],
|
||||
["^node:.*\\u0000$", "^@?\\w.*\\u0000$"],
|
||||
[
|
||||
"^@scandichotels/.*\\u0000$",
|
||||
"^@/types/.*",
|
||||
"^@/.*\\u0000$",
|
||||
"^[^.].*\\u0000$",
|
||||
"^\\..*\\u0000$",
|
||||
],
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
"simple-import-sort/exports": "error",
|
||||
"import/first": "error",
|
||||
"import/newline-after-import": "error",
|
||||
|
||||
"import/no-duplicates": [
|
||||
"error",
|
||||
{
|
||||
"prefer-inline": true,
|
||||
},
|
||||
],
|
||||
|
||||
"@typescript-eslint/consistent-type-imports": "error",
|
||||
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
args: "all",
|
||||
argsIgnorePattern: "^_",
|
||||
caughtErrors: "all",
|
||||
caughtErrorsIgnorePattern: "^_",
|
||||
destructuredArrayIgnorePattern: "^_",
|
||||
varsIgnorePattern: "^_",
|
||||
ignoreRestSiblings: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
])
|
||||
Reference in New Issue
Block a user