daedalOS/.eslintrc.json
2024-02-05 23:09:29 -08:00

197 lines
6.1 KiB
JSON

{
"extends": [
"airbnb",
"eslint:recommended",
"plugin:@typescript-eslint/strict-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:deprecation/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:jest/recommended",
"plugin:jsx-a11y/recommended",
"plugin:playwright/recommended",
"plugin:promise/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:regexp/recommended",
"plugin:sonarjs/recommended",
"plugin:typescript-sort-keys/recommended",
"plugin:unicorn/recommended",
"prettier",
"next",
"next/core-web-vitals",
"plugin:@next/next/recommended"
],
"plugins": [
"@next/next",
"@typescript-eslint",
"import",
"jest",
"no-relative-import-paths",
"promise",
"react",
"react-hooks-addons",
"regexp",
"sonarjs",
"sort-keys-fix",
"typescript-sort-keys",
"unicorn",
"unused-imports"
],
"rules": {
"@next/next/no-img-element": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/consistent-type-imports": [
"error",
{ "fixStyle": "inline-type-imports", "prefer": "type-imports" }
],
"@typescript-eslint/explicit-function-return-type": [
"error",
{ "allowExpressions": true }
],
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/method-signature-style": "error",
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/no-dynamic-delete": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-invalid-void-type": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-redeclare": "error",
"@typescript-eslint/no-shadow": [
"error",
{
"ignoreFunctionTypeParameterNameValueShadow": false,
"ignoreTypeValueShadow": false
}
],
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"@typescript-eslint/prefer-nullish-coalescing": "off",
"camelcase": "off",
"class-methods-use-this": "off",
"curly": "error",
"import/consistent-type-specifier-style": ["error", "prefer-inline"],
"import/extensions": [
"error",
"ignorePackages",
{ "ts": "never", "tsx": "never" }
],
"import/first": "error",
"import/newline-after-import": "error",
"import/no-cycle": "off",
"import/no-duplicates": ["error", { "prefer-inline": true }],
"import/no-extraneous-dependencies": [
"error",
{ "devDependencies": ["*.config.ts", "e2e/**", "__tests__/**"] }
],
"import/order": ["error", { "newlines-between": "never" }],
"import/prefer-default-export": "off",
"jsx-a11y/label-has-associated-control": [
"error",
{
"required": {
"some": ["id", "nesting"]
}
}
],
"jsx-a11y/no-autofocus": "off",
"no-console": ["error", { "allow": ["info", "error"] }],
"no-constant-binary-expression": "error",
"no-implicit-coercion": "error",
"no-new-wrappers": "error",
"no-plusplus": "off",
"no-relative-import-paths/no-relative-import-paths": "error",
"no-restricted-syntax": [
"error",
"ForInStatement",
"LabeledStatement",
"WithStatement"
],
"no-shadow": ["error", { "hoist": "all" }],
"no-undef-init": "error",
"no-underscore-dangle": "off",
"no-unsafe-optional-chaining": "error",
"playwright/expect-expect": "off",
"playwright/no-conditional-in-test": "off",
"playwright/no-skipped-test": "off",
"promise/always-return": "off",
"promise/catch-or-return": "off",
"promise/no-nesting": "off",
"promise/no-callback-in-promise": "off",
"promise/no-promise-in-callback": "off",
"react/function-component-definition": [
"error",
{ "namedComponents": "arrow-function" }
],
"react/hook-use-state": "error",
"react-hooks/exhaustive-deps": "error",
"react/display-name": "off",
"react/jsx-filename-extension": ["error", { "extensions": [".tsx"] }],
"react/jsx-props-no-spreading": "off",
"react/jsx-sort-props": [
"error",
{
"reservedFirst": true,
"shorthandLast": true
}
],
"react/no-unused-prop-types": "error",
"react/no-unused-state": "error",
"react/require-default-props": "off",
"react/require-optimization": "error",
"react-hooks-addons/no-unused-deps": "warn",
"regexp/no-unused-capturing-group": "error",
"regexp/no-useless-assertions": "error",
"regexp/no-useless-flag": "error",
"regexp/strict": "error",
"sonarjs/cognitive-complexity": "off",
"sonarjs/no-nested-template-literals": "off",
"sort-keys-fix/sort-keys-fix": "error",
"unicorn/filename-case": "off",
"unicorn/import-style": [
"error",
{
"styles": {
"path": {
"named": true
}
}
}
],
"unicorn/no-abusive-eslint-disable": "off",
"unicorn/no-array-for-each": "off",
"unicorn/no-array-reduce": "off",
"unicorn/no-await-expression-member": "off",
"unicorn/no-unused-properties": "error",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-at": "off",
"unicorn/prefer-node-protocol": "off",
"unicorn/prefer-string-replace-all": "off",
"unicorn/prefer-switch": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/switch-case-braces": ["error", "avoid"],
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
]
},
"reportUnusedDisableDirectives": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": true
}
}