2022-07-20 10:44:10 +00:00
|
|
|
{
|
|
|
|
"parser": "@typescript-eslint/parser",
|
2022-07-22 16:16:08 +00:00
|
|
|
"parserOptions": {
|
|
|
|
"tsconfigRootDir": "./",
|
|
|
|
"project": ["./tsconfig.json"]
|
|
|
|
},
|
2022-07-20 10:44:10 +00:00
|
|
|
"extends": [
|
|
|
|
"airbnb",
|
|
|
|
"plugin:@typescript-eslint/recommended",
|
|
|
|
"prettier" // prettier *has* to be the last one, to avoid conflicting rules
|
|
|
|
],
|
2022-08-29 17:00:02 +00:00
|
|
|
"ignorePatterns": ["pnpm-lock.yaml", "dist"],
|
2022-07-20 10:44:10 +00:00
|
|
|
"plugins": ["simple-import-sort", "@typescript-eslint"],
|
|
|
|
"rules": {
|
2022-08-25 08:44:45 +00:00
|
|
|
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
|
2022-07-20 10:44:10 +00:00
|
|
|
"quotes": ["error", "double"],
|
|
|
|
"react/react-in-jsx-scope": "off", // next does not require react imports
|
|
|
|
"import/extensions": "off", // file extension not required when importing
|
|
|
|
"react/jsx-filename-extension": "off",
|
2022-07-22 15:53:33 +00:00
|
|
|
"no-restricted-syntax": [
|
|
|
|
"error",
|
|
|
|
{
|
2022-07-22 16:16:08 +00:00
|
|
|
"selector": "ForInStatement",
|
|
|
|
"message": "for ... in disallowed, use for ... of instead"
|
|
|
|
}
|
2022-07-22 15:53:33 +00:00
|
|
|
],
|
|
|
|
|
2022-07-20 10:44:10 +00:00
|
|
|
"no-underscore-dangle": "off",
|
|
|
|
"no-await-in-loop": "off",
|
|
|
|
"react/jsx-props-no-spreading": "off",
|
|
|
|
"react/require-default-props": "off",
|
|
|
|
"simple-import-sort/imports": "warn",
|
|
|
|
"simple-import-sort/exports": "warn",
|
|
|
|
"import/first": "warn",
|
|
|
|
"import/newline-after-import": "warn",
|
|
|
|
"import/no-duplicates": "warn",
|
|
|
|
"no-unused-vars": "off",
|
|
|
|
"@typescript-eslint/no-unused-vars": ["error"],
|
|
|
|
"@typescript-eslint/ban-types": "off",
|
|
|
|
"no-console": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"allow": ["warn", "error", "debug"]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"no-continue": "off",
|
|
|
|
"operator-linebreak": "off",
|
|
|
|
"max-len": "off",
|
|
|
|
"array-callback-return": "off",
|
|
|
|
"implicit-arrow-linebreak": "off",
|
|
|
|
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
|
|
|
|
"@typescript-eslint/no-non-null-assertion": "off",
|
|
|
|
"no-restricted-imports": "off",
|
|
|
|
"no-restricted-exports": "off",
|
|
|
|
"@typescript-eslint/ban-ts-comment": "off",
|
|
|
|
// TO FIX:
|
|
|
|
"import/no-cycle": "off", // pathpidia issue
|
2022-07-22 15:52:02 +00:00
|
|
|
"import/prefer-default-export": "off",
|
|
|
|
"@typescript-eslint/no-misused-promises": ["error"],
|
2022-09-01 10:20:52 +00:00
|
|
|
"@typescript-eslint/no-floating-promises": ["error"]
|
2022-07-20 10:44:10 +00:00
|
|
|
},
|
|
|
|
"settings": {
|
|
|
|
"import/parsers": {
|
|
|
|
"@typescript-eslint/parser": [".ts", ".tsx"]
|
|
|
|
},
|
|
|
|
"import/resolver": {
|
|
|
|
"typescript": {
|
|
|
|
"alwaysTryTypes": true // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|