mirror of
https://github.com/Gabi-Zar/Silk-Fly-Launcher.git
synced 2026-06-15 03:47:11 +02:00
Add eslint
This commit is contained in:
28
eslint.config.js
Normal file
28
eslint.config.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import js from "@eslint/js";
|
||||
import globals from "globals";
|
||||
import { defineConfig } from "eslint/config";
|
||||
import stylistic from "@stylistic/eslint-plugin";
|
||||
|
||||
export default defineConfig([
|
||||
{
|
||||
files: ["**/*.{js,mjs,cjs}"],
|
||||
plugins: { js, "@stylistic": stylistic },
|
||||
extends: ["js/recommended"],
|
||||
languageOptions: { globals: { ...globals.browser, ...globals.node } },
|
||||
rules: {
|
||||
"no-unused-vars": "off",
|
||||
"no-undef": "off",
|
||||
"no-var": "error",
|
||||
"prefer-const": "error",
|
||||
"no-redeclare": "error",
|
||||
"@stylistic/semi": ["error", "always"],
|
||||
"@stylistic/semi-spacing": ["error", { before: false, after: true }],
|
||||
"@stylistic/no-tabs": "error",
|
||||
"@stylistic/no-mixed-spaces-and-tabs": "error",
|
||||
"@stylistic/quotes": ["error", "double"],
|
||||
"@stylistic/object-curly-spacing": ["error", "always"],
|
||||
"@stylistic/key-spacing": ["error", { beforeColon: false, afterColon: true }],
|
||||
"@stylistic/keyword-spacing": ["error", { before: true, after: true }],
|
||||
},
|
||||
},
|
||||
]);
|
||||
Reference in New Issue
Block a user