mirror of
https://github.com/searxng/searxng.git
synced 2025-08-03 18:42:33 +02:00
[web-client] simple theme: eslint JS source files
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
7a6ea56565
commit
b74496b192
4 changed files with 1066 additions and 282 deletions
|
@ -1,68 +0,0 @@
|
|||
import globals from "globals";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import js from "@eslint/js";
|
||||
import { FlatCompat } from "@eslint/eslintrc";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname,
|
||||
recommendedConfig: js.configs.recommended,
|
||||
allConfig: js.configs.all
|
||||
});
|
||||
|
||||
export default [...compat.extends("eslint:recommended"), {
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
},
|
||||
|
||||
ecmaVersion: 12,
|
||||
sourceType: "commonjs",
|
||||
},
|
||||
|
||||
rules: {
|
||||
indent: ["error", 2],
|
||||
|
||||
"keyword-spacing": ["error", {
|
||||
before: true,
|
||||
after: true,
|
||||
}],
|
||||
|
||||
"no-trailing-spaces": 2,
|
||||
"space-before-function-paren": ["error", "always"],
|
||||
"space-infix-ops": "error",
|
||||
|
||||
"comma-spacing": ["error", {
|
||||
before: false,
|
||||
after: true,
|
||||
}],
|
||||
|
||||
"brace-style": ["error", "1tbs", {
|
||||
allowSingleLine: true,
|
||||
}],
|
||||
|
||||
curly: ["error", "multi-line"],
|
||||
"block-spacing": ["error", "always"],
|
||||
"dot-location": ["error", "property"],
|
||||
|
||||
"key-spacing": ["error", {
|
||||
beforeColon: false,
|
||||
afterColon: true,
|
||||
}],
|
||||
|
||||
"spaced-comment": ["error", "always", {
|
||||
line: {
|
||||
markers: ["*package", "!", "/", ",", "="],
|
||||
},
|
||||
|
||||
block: {
|
||||
balanced: true,
|
||||
markers: ["*package", "!", ",", ":", "::", "flow-include"],
|
||||
exceptions: ["*"],
|
||||
},
|
||||
}],
|
||||
},
|
||||
}];
|
Loading…
Add table
Add a link
Reference in a new issue