mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-21 01:01:41 +00:00
As a precursor to #2394, add a bunch of linting rules to try and catch more mistakes/potential code errors/unnecessary code. Add a bunch of rules from https://eslint.vuejs.org/rules/ in the "uncategorized" section that seem useful to have.
53 lines
1.6 KiB
JavaScript
53 lines
1.6 KiB
JavaScript
import pluginVue from "eslint-plugin-vue";
|
|
import { defineConfigWithVueTs, vueTsConfigs } from "@vue/eslint-config-typescript";
|
|
|
|
import skipFormattingConfig from "@vue/eslint-config-prettier/skip-formatting";
|
|
|
|
export default defineConfigWithVueTs(
|
|
pluginVue.configs["flat/recommended-error"],
|
|
vueTsConfigs.recommended,
|
|
skipFormattingConfig,
|
|
{
|
|
ignores: ["**/dist/**", "playwright-report"]
|
|
},
|
|
{
|
|
//extends: ["js/recommended"],
|
|
rules: {
|
|
quotes: ["error", "double"],
|
|
"comma-dangle": ["error", "never"],
|
|
|
|
"comma-spacing": [
|
|
"error",
|
|
{
|
|
before: false,
|
|
after: true
|
|
}
|
|
],
|
|
|
|
semi: ["error", "always"],
|
|
"eol-last": "error",
|
|
eqeqeq: "error",
|
|
"no-useless-concat": "error",
|
|
"object-curly-spacing": ["error", "always"],
|
|
"quote-props": ["error", "as-needed"],
|
|
"no-case-declarations": "off",
|
|
"vue/eqeqeq": "error",
|
|
"vue/no-useless-concat": "error",
|
|
"vue/no-constant-condition": "error",
|
|
"vue/no-empty-pattern": "error",
|
|
"vue/no-undef-directives": "error",
|
|
"vue/no-undef-properties": "error",
|
|
"vue/no-unused-properties": "error",
|
|
"vue/no-unused-refs": "error",
|
|
"vue/no-use-v-else-with-v-for": "error",
|
|
"vue/no-useless-mustaches": "error",
|
|
"vue/no-useless-v-bind": "error",
|
|
"vue/require-default-prop": "off",
|
|
"vue/v-for-delimiter-style": "error",
|
|
"vue/v-on-event-hyphenation": "off",
|
|
"@typescript-eslint/no-explicit-any": "off",
|
|
"vue/valid-v-slot": ["error", { allowModifiers: true }]
|
|
}
|
|
}
|
|
);
|