50 lines
1.3 KiB
JavaScript
50 lines
1.3 KiB
JavaScript
// -*- mode: web; -*-
|
|
module.exports = {
|
|
env: {
|
|
browser: true,
|
|
es2021: true,
|
|
},
|
|
extends: [
|
|
"eslint:recommended",
|
|
"plugin:react/recommended",
|
|
"plugin:react/jsx-runtime",
|
|
"plugin:@typescript-eslint/recommended",
|
|
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
|
],
|
|
overrides: [],
|
|
parser: "@typescript-eslint/parser",
|
|
parserOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
project: "./tsconfig.json",
|
|
tsconfigRootDir: __dirname,
|
|
},
|
|
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",
|
|
},
|
|
},
|
|
};
|