2018-06-01 20:09:40 +02:00
|
|
|
module.exports = {
|
2021-09-05 01:09:30 +02:00
|
|
|
env: {
|
|
|
|
browser: true,
|
|
|
|
commonjs: true,
|
|
|
|
es6: false,
|
|
|
|
},
|
2022-05-25 17:43:43 +02:00
|
|
|
extends: [
|
|
|
|
"eslint:recommended",
|
|
|
|
"plugin:@typescript-eslint/recommended",
|
2023-06-27 04:29:44 +02:00
|
|
|
"plugin:react/recommended",
|
|
|
|
"plugin:react-hooks/recommended",
|
2024-11-27 22:56:58 +01:00
|
|
|
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
|
|
|
"plugin:@typescript-eslint/strict",
|
2022-05-25 17:43:43 +02:00
|
|
|
],
|
2021-09-05 01:09:30 +02:00
|
|
|
parser: "@typescript-eslint/parser",
|
|
|
|
parserOptions: {
|
|
|
|
ecmaVersion: 8,
|
|
|
|
sourceType: "module",
|
|
|
|
ecmaFeatures: {
|
|
|
|
experimentalObjectRestSpread: true,
|
2018-06-01 20:09:40 +02:00
|
|
|
},
|
2023-01-08 08:36:55 +01:00
|
|
|
project: ["./tsconfig.json", "./test/tsconfig.json", "./tools/tsconfig.json"],
|
2021-09-05 01:09:30 +02:00
|
|
|
},
|
|
|
|
plugins: ["@typescript-eslint"],
|
|
|
|
rules: {
|
2022-07-28 20:35:55 +02:00
|
|
|
"@typescript-eslint/no-unused-vars": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
argsIgnorePattern: "^__",
|
|
|
|
varsIgnorePattern: "^__",
|
|
|
|
caughtErrorsIgnorePattern: "^__",
|
|
|
|
},
|
|
|
|
],
|
2022-07-19 17:43:10 +02:00
|
|
|
"@typescript-eslint/ban-ts-comment": "off",
|
|
|
|
"@typescript-eslint/no-explicit-any": "off",
|
2023-06-27 04:29:44 +02:00
|
|
|
"react/no-unescaped-entities": "off",
|
2024-11-04 07:35:14 +01:00
|
|
|
"@typescript-eslint/restrict-template-expressions": "off",
|
2024-11-07 08:09:11 +01:00
|
|
|
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
2021-09-05 01:09:30 +02:00
|
|
|
},
|
2023-09-19 18:24:12 +02:00
|
|
|
settings: {
|
|
|
|
react: {
|
|
|
|
version: "detect",
|
|
|
|
},
|
|
|
|
},
|
2024-11-14 17:18:57 +01:00
|
|
|
overrides: [
|
|
|
|
/**
|
|
|
|
* Some enums are subsets of other enums. For example, UniversityLocationName contains locations of 3 universities.
|
|
|
|
* With each member, we refer to the respective LocationName's member instead of using a literal string. This usage
|
|
|
|
* is okay, but it triggers the "prefer-literal-enum-member" rule. This rule is not useful in this case, so we
|
|
|
|
* suppress it in NetscriptDefinitions.d.ts.
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
files: ["src/ScriptEditor/NetscriptDefinitions.d.ts"],
|
|
|
|
rules: {
|
|
|
|
"@typescript-eslint/prefer-literal-enum-member": ["off"],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2021-09-05 01:09:30 +02:00
|
|
|
};
|