mirror of
https://github.com/searxng/searxng.git
synced 2025-03-12 23:42:40 +00: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
client/simple
searx/static/themes/simple
34
client/simple/eslint.config.js
Normal file
34
client/simple/eslint.config.js
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
import globals from "globals";
|
||||||
|
import pluginJs from "@eslint/js";
|
||||||
|
|
||||||
|
|
||||||
|
/** @type {import('eslint').Linter.Config[]} */
|
||||||
|
export default [
|
||||||
|
pluginJs.configs.recommended,
|
||||||
|
|
||||||
|
// global "ignores"
|
||||||
|
// https://eslint.org/docs/latest/use/configure/configuration-files#globally-ignoring-files-with-ignores
|
||||||
|
{
|
||||||
|
ignores: ["node_modules/", "dist/"]
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
files: [
|
||||||
|
"**/*.js",
|
||||||
|
],
|
||||||
|
linterOptions: {
|
||||||
|
reportUnusedDisableDirectives: "error",
|
||||||
|
// noInlineConfig: true
|
||||||
|
},
|
||||||
|
languageOptions: {
|
||||||
|
sourceType: "module",
|
||||||
|
globals: {
|
||||||
|
...globals.browser,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
indent: ["error", 2],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
];
|
1242
client/simple/package-lock.json
generated
1242
client/simple/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -4,11 +4,15 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
"fix": "eslint --fix"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^9.19.0",
|
||||||
"copy-webpack-plugin": "^12.0.2",
|
"copy-webpack-plugin": "^12.0.2",
|
||||||
"css-loader": "^7.1.2",
|
"css-loader": "^7.1.2",
|
||||||
|
"eslint": "^9.19.0",
|
||||||
"filemanager-webpack-plugin": "^8.0.0",
|
"filemanager-webpack-plugin": "^8.0.0",
|
||||||
|
"globals": "^15.14.0",
|
||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
"less": "^4.2.2",
|
"less": "^4.2.2",
|
||||||
"less-loader": "^12.2.0",
|
"less-loader": "^12.2.0",
|
||||||
|
|
|
@ -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…
Reference in a new issue