79 lines
1.9 KiB
JavaScript
79 lines
1.9 KiB
JavaScript
const { rules } = require("eslint-config-prettier");
|
|
|
|
module.exports = {
|
|
parser: "@typescript-eslint/parser",
|
|
plugins: ["@typescript-eslint", "sort-class-members"],
|
|
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
|
|
env: {
|
|
browser: false,
|
|
node: true,
|
|
es6: true,
|
|
},
|
|
parserOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
},
|
|
overrides: [
|
|
{
|
|
files: ["**/__tests__/**/*"],
|
|
env: {
|
|
jest: true,
|
|
},
|
|
},
|
|
],
|
|
rules: {
|
|
"@typescript-eslint/no-explicit-any": "off",
|
|
"@typescript-eslint/no-inferrable-types": "off",
|
|
"@typescript-eslint/no-empty-interface": "off",
|
|
"@typescript-eslint/recommended-requiring-type-checking": "off",
|
|
"@typescript-eslint/no-unused-vars": "warn",
|
|
"lines-between-class-members": ["error", "always", { exceptAfterSingleLine: true }],
|
|
|
|
"sort-class-members/sort-class-members": [
|
|
2,
|
|
{
|
|
order: [
|
|
"[static-properties]",
|
|
"[static-methods]",
|
|
"[conventional-private-properties]",
|
|
"[properties]",
|
|
"constructor",
|
|
"[methods]",
|
|
"[conventional-private-methods]",
|
|
],
|
|
accessorPairPositioning: "getThenSet",
|
|
},
|
|
],
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"warn",
|
|
{ argsIgnorePattern: "^_", varsIgnorePattern: "^T$" },
|
|
],
|
|
"import/no-relative-parent-imports": "error",
|
|
"import/order": [
|
|
"error",
|
|
{
|
|
groups: ["builtin", "external", "internal", ["parent", "sibling", "index"]],
|
|
pathGroups: [
|
|
{
|
|
pattern: "@/**",
|
|
group: "internal",
|
|
},
|
|
],
|
|
pathGroupsExcludedImportTypes: ["builtin"],
|
|
"newlines-between": "always",
|
|
alphabetize: {
|
|
order: "asc",
|
|
caseInsensitive: true,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
settings: {
|
|
"import/resolver": {
|
|
typescript: {
|
|
project,
|
|
},
|
|
},
|
|
},
|
|
};
|