mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-16 09:25:03 +01:00
add eslint
This commit is contained in:
parent
e951cd5ee1
commit
12fcc4f1bb
11 changed files with 1237 additions and 26 deletions
27
.eslintrc.cjs
Normal file
27
.eslintrc.cjs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* eslint-env node */
|
||||
module.exports = {
|
||||
ignorePatterns: ["/target/**", "/jest.config.js"],
|
||||
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
plugins: ["@typescript-eslint"],
|
||||
root: true,
|
||||
rules: {
|
||||
// Sometimes you just need a `while(true)`.
|
||||
"no-constant-condition": "off",
|
||||
// Typescript already checks problematic fallthrough.
|
||||
// The eslint rule is a bit dumb and also complains about
|
||||
// obvious clear fallthrough like `case "a": case "b"`.
|
||||
"no-fallthrough": "off",
|
||||
// Suppress no-unused-vars with leading underscores.
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"warn",
|
||||
{
|
||||
varsIgnorePattern: "^_",
|
||||
argsIgnorePattern: "^_",
|
||||
},
|
||||
],
|
||||
// `any` is genrally bad, but sometimes it's the nicest solution
|
||||
// Just let me use it without any ceremony.
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue