tricoteuses-legifrance/eslint.config.js

45 lines
901 B
JavaScript
Raw Normal View History

2024-11-29 10:10:39 +01:00
import js from "@eslint/js"
import ts from "typescript-eslint"
2024-11-25 18:41:42 +01:00
import svelte from "eslint-plugin-svelte"
2024-11-29 10:10:39 +01:00
import prettier from "eslint-config-prettier"
2024-09-16 11:14:06 +02:00
import globals from "globals"
2024-11-29 10:10:39 +01:00
/** @type {import('eslint').Linter.Config[]} */
export default [
js.configs.recommended,
...ts.configs.recommended,
2024-09-16 11:14:06 +02:00
...svelte.configs["flat/recommended"],
prettier,
...svelte.configs["flat/prettier"],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
files: ["**/*.svelte"],
languageOptions: {
parserOptions: {
2024-11-29 10:10:39 +01:00
parser: ts.parser,
2024-09-16 11:14:06 +02:00
},
},
settings: {
svelte: {
ignoreWarnings: ["no-irregular-whitespace"],
},
},
},
2024-11-25 18:41:42 +01:00
{
2024-11-29 10:10:39 +01:00
files: ["src/scripts/*.ts"],
2024-11-25 18:41:42 +01:00
rules: {
"no-irregular-whitespace": "off",
},
},
2024-09-16 11:14:06 +02:00
{
ignores: ["build/", ".svelte-kit/", "dist/"],
},
2024-11-29 10:10:39 +01:00
]