music2/eslint.config.js
2025-01-26 15:00:34 -05:00

71 lines
2.2 KiB
JavaScript

import globals from "globals"
import pluginJs from "@eslint/js"
import tseslint from "typescript-eslint"
import solid from "eslint-plugin-solid/configs/typescript"
/** @type {import('eslint').Linter.Config[]} */
export default [
{ files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"] },
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
solid,
{
rules: {
"indent": ["error", "tab"],
"brace-style": ["error", "allman"],
"no-tabs": "off",
"quotes": ["error", "double"],
"semi": ["error", "never"],
"semi-spacing": ["error", { "before": false, "after": true }],
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1 }],
// migrated
"prefer-const": "error",
"no-const-assign": "error",
"no-var": "error",
"array-callback-return": "error",
"prefer-template": "error",
"template-curly-spacing": "error",
"no-useless-escape": "error",
"wrap-iife": "error",
"no-loop-func": "error",
"default-param-last": "error",
"space-before-function-paren": ["error", "never"],
"space-before-blocks": "error",
"no-param-reassign": "error",
"function-paren-newline": "error",
"comma-dangle": ["error", "always-multiline"],
"arrow-spacing": "error",
"arrow-parens": "error",
"arrow-body-style": "error",
"no-confusing-arrow": "error",
"implicit-arrow-linebreak": "error",
"no-duplicate-imports": "error",
"object-curly-newline": "error",
"dot-notation": "error",
"one-var": ["error", "never"],
"no-multi-assign": "error",
"no-plusplus": "error",
"operator-linebreak": "error",
"eqeqeq": "error",
"no-case-declarations": "error",
"no-nested-ternary": "error",
"no-unneeded-ternary": "error",
"no-mixed-operators": "error",
"nonblock-statement-body-position": "error",
"keyword-spacing": "error",
"space-infix-ops": "error",
"eol-last": "error",
"newline-per-chained-call": "error",
"no-whitespace-before-property": "error",
"space-in-parens": "error",
"array-bracket-spacing": "error",
"key-spacing": "error",
"no-trailing-spaces": "error",
"comma-style": "error",
"radix": "error",
"no-new-wrappers": "error",
},
},
]