venture-ui/.eslintrc.cjs

50 lines
1.3 KiB
JavaScript
Raw Normal View History

2023-02-14 22:26:04 -06:00
// -*- mode: web; -*-
2023-02-13 14:59:00 -06:00
module.exports = {
2023-02-14 22:26:04 -06:00
env: {
browser: true,
es2021: true,
2023-02-13 14:59:00 -06:00
},
2023-02-14 22:26:04 -06:00
extends: [
2023-02-13 14:59:00 -06:00
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:@typescript-eslint/recommended",
2023-02-14 22:26:04 -06:00
"plugin:@typescript-eslint/recommended-requiring-type-checking",
2023-02-13 14:59:00 -06:00
],
2023-02-14 22:26:04 -06:00
overrides: [],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
2023-02-13 14:59:00 -06:00
},
2023-02-14 22:26:04 -06:00
plugins: ["react", "@typescript-eslint"],
// typescript-eslint disables a bunch of rules that tsc would catch, but vite refuses to
// add compiler errors to output, so here we are
rules: {
"constructor-super": "error",
"getter-return": "error",
"no-const-assign": "error",
"no-dupe-args": "error",
"no-dupe-class-members": "error",
"no-dupe-keys": "error",
"no-func-assign": "error",
"no-import-assign": "error",
"no-new-symbol": "error",
"no-obj-calls": "error",
"no-redeclare": "error",
"no-setter-return": "error",
"no-this-before-super": "error",
"no-undef": "error",
"no-unreachable": "error",
"no-unsafe-negation": "error",
"valid-typeof": "error",
},
settings: {
react: {
version: "detect",
2023-02-13 14:59:00 -06:00
},
},
2023-02-14 22:26:04 -06:00
};