mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-02 19:11:54 +08:00
testenv: restored eslint
This commit is contained in:
57
testenv/linters/eslintrc.js
Normal file
57
testenv/linters/eslintrc.js
Normal file
@@ -0,0 +1,57 @@
|
||||
const js = require("/usr/lib/node_modules/eslint/node_modules/@eslint/js/src/index.js");
|
||||
const globals = require("/usr/lib/node_modules/eslint/node_modules/@eslint/eslintrc/node_modules/globals/index.js");
|
||||
const parser = require("/usr/lib/node_modules/@babel/eslint-parser/lib/index.cjs");
|
||||
|
||||
module.exports = [
|
||||
js.configs.recommended,
|
||||
|
||||
{
|
||||
files: ["**/*.js"],
|
||||
languageOptions: {
|
||||
globals: globals.browser,
|
||||
ecmaVersion: 2015,
|
||||
parser: parser,
|
||||
parserOptions: {
|
||||
ecmaVersion: 2025,
|
||||
sourceType: "module",
|
||||
allowImportExportEverywhere: true,
|
||||
requireConfigFile: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
rules: {
|
||||
indent: [
|
||||
"error",
|
||||
"tab",
|
||||
{SwitchCase: 1},
|
||||
],
|
||||
"linebreak-style": [
|
||||
"error",
|
||||
"unix",
|
||||
],
|
||||
quotes: [
|
||||
"error",
|
||||
"double",
|
||||
],
|
||||
"quote-props": [
|
||||
"error",
|
||||
"always",
|
||||
],
|
||||
"semi": [
|
||||
"error",
|
||||
"always",
|
||||
],
|
||||
"comma-dangle": [
|
||||
"error",
|
||||
"always-multiline",
|
||||
],
|
||||
"no-unused-vars": [
|
||||
"error",
|
||||
{vars: "local", args: "after-used"},
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
];
|
||||
Reference in New Issue
Block a user