formwork/panel/eslint.config.js

41 lines
1.1 KiB
JavaScript
Raw Normal View History

2023-12-03 15:08:58 +01:00
import js from "@eslint/js";
import globals from "globals";
import eslintConfigPrettier from "eslint-config-prettier";
2023-05-20 17:26:37 +02:00
export default [
js.configs.recommended,
{
2023-12-03 15:08:58 +01:00
languageOptions: {
ecmaVersion: 11,
globals: {
2023-05-20 17:26:37 +02:00
...globals.browser,
2023-12-03 15:08:58 +01:00
$: "readonly",
$$: "readonly",
Formwork: "readonly",
2023-05-20 17:26:37 +02:00
},
2023-12-03 15:08:58 +01:00
sourceType: "module",
2023-05-20 17:26:37 +02:00
},
2023-12-03 15:08:58 +01:00
rules: {
"arrow-body-style": ["error", "as-needed"],
curly: ["error", "all"],
eqeqeq: ["error", "always"],
"no-else-return": ["error"],
"no-lonely-if": ["error"],
"no-unneeded-ternary": ["error"],
"no-var": ["error"],
"one-var": [
"error",
{
initialized: "never",
uninitialized: "always",
},
],
"operator-assignment": ["error"],
"prefer-arrow-callback": ["error"],
"prefer-const": ["error"],
"prefer-template": ["error"],
2023-05-20 17:26:37 +02:00
},
2023-12-03 15:08:58 +01:00
},
eslintConfigPrettier,
2023-05-20 17:26:37 +02:00
];