|
1 |
| -/* |
2 |
| - * File: .eslintrc |
3 |
| - * Project: @xyo-network/sdk-core-nodejs |
4 |
| - * File Created: Friday, 13th November 2020 10:18:05 am |
5 |
| - * Author: XYO Development Team ( [email protected]) |
6 |
| - * ----- |
7 |
| - * Last Modified: Friday, 13th November 2020 2:09:54 pm |
8 |
| - * Modified By: XYO Development Team ( [email protected]>) |
9 |
| - * ----- |
10 |
| - * Copyright 2017 - 2020 XY - The Persistent Company |
11 |
| - */ |
12 |
| - |
13 | 1 | {
|
14 | 2 | "root": true,
|
15 | 3 | "parser": "@typescript-eslint/parser",
|
16 |
| - "ignorePatterns": [ |
17 |
| - "node_modules/", |
18 |
| - "build/", |
19 |
| - "/*.ts", |
20 |
| - "/*.js", |
21 |
| - "src/contracts" |
22 |
| - ], |
| 4 | + "ignorePatterns": ["node_modules/", "build/"], |
23 | 5 | "plugins": [
|
24 | 6 | "@typescript-eslint",
|
25 | 7 | "prettier",
|
26 | 8 | "sort-keys-fix",
|
27 |
| - "sort-export-all", |
| 9 | + "typescript-sort-keys", |
28 | 10 | "json",
|
| 11 | + "workspaces", |
29 | 12 | "import",
|
30 | 13 | "simple-import-sort",
|
31 | 14 | "no-secrets"
|
32 | 15 | ],
|
33 |
| - "parserOptions": { |
34 |
| - "project": "./tsconfig.json" |
35 |
| - }, |
36 | 16 | "extends": [
|
37 | 17 | "eslint:recommended",
|
38 | 18 | "plugin:import/errors",
|
39 | 19 | "plugin:import/warnings",
|
40 | 20 | "plugin:import/typescript",
|
41 | 21 | "plugin:@typescript-eslint/recommended",
|
42 | 22 | "plugin:json/recommended",
|
43 |
| - "plugin:prettier/recommended" |
| 23 | + "plugin:prettier/recommended", |
| 24 | + "plugin:workspaces/recommended" |
44 | 25 | ],
|
| 26 | + "settings": { |
| 27 | + "import/parsers": { |
| 28 | + "@typescript-eslint/parser": [".ts", ".tsx"] |
| 29 | + } |
| 30 | + }, |
45 | 31 | "rules": {
|
46 | 32 | "no-secrets/no-secrets": ["off"],
|
47 | 33 | "workspaces/require-dependency": ["off"],
|
48 |
| - "prettier/prettier": "error", |
49 |
| - "semi": "off", |
50 |
| - "@typescript-eslint/semi": ["error", "never"], |
| 34 | + "prettier/prettier": "warn", |
| 35 | + "semi": ["warn", "never"], |
| 36 | + "@typescript-eslint/semi": ["warn", "never"], |
51 | 37 |
|
52 | 38 | "no-tabs": ["error"],
|
53 | 39 | "@typescript-eslint/member-delimiter-style": [
|
|
63 | 49 | }
|
64 | 50 | }
|
65 | 51 | ],
|
66 |
| - "sort-export-all/sort-export-all": "warn", |
67 | 52 | "require-await": "error",
|
68 |
| - "sort-keys": [ |
69 |
| - "warn", |
70 |
| - "asc", |
71 |
| - { "caseSensitive": true, "natural": false, "minKeys": 2 } |
72 |
| - ], |
| 53 | + "sort-keys": ["warn", "asc", { "caseSensitive": true, "natural": false, "minKeys": 2 }], |
| 54 | + "typescript-sort-keys/interface": "warn", |
| 55 | + "typescript-sort-keys/string-enum": "warn", |
73 | 56 | "sort-keys-fix/sort-keys-fix": "warn",
|
74 | 57 | "no-unused-vars": "off",
|
75 |
| - "@typescript-eslint/no-unused-vars": [ |
76 |
| - "error", |
77 |
| - { "argsIgnorePattern": "^_" } |
78 |
| - ], |
| 58 | + "@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }], |
79 | 59 | "@typescript-eslint/no-explicit-any": "off",
|
80 | 60 | "@typescript-eslint/explicit-module-boundary-types": "off",
|
81 | 61 | "quotes": [2, "single", "avoid-escape"],
|
82 |
| - "max-statements": ["error", 25], |
| 62 | + "max-statements": ["error", 32], |
83 | 63 | "max-depth": ["error", 6],
|
84 | 64 | "complexity": ["error", 20],
|
85 | 65 | "max-lines": ["error", { "max": 512, "skipBlankLines": true }],
|
86 | 66 | "max-nested-callbacks": ["error", 6],
|
87 | 67 | "import/no-named-as-default": ["off"],
|
| 68 | + "import/no-self-import": ["warn"], |
88 | 69 | "import/no-absolute-path": ["warn"],
|
| 70 | + "import/no-internal-modules": [ "off", { |
| 71 | + "allow": [ |
| 72 | + "react-icons/*", |
| 73 | + "*/img/**", |
| 74 | + "source-map-support/*", |
| 75 | + "lodash/*", |
| 76 | + "@material-ui/**", |
| 77 | + "aws-sdk/**", |
| 78 | + "firebase/**", |
| 79 | + "@ethersproject/**", |
| 80 | + "aos/**", |
| 81 | + "filepond*/**", |
| 82 | + "pure-react-carousel/**", |
| 83 | + "mapbox-gl/**", |
| 84 | + "react-share/**", |
| 85 | + "sdk-xyoworld-typechain/**", |
| 86 | + "react-git-info/**", |
| 87 | + "react-player/**" |
| 88 | + ] |
| 89 | + } ], |
89 | 90 | "import/no-restricted-paths": ["warn"],
|
90 | 91 | "import/namespace": ["warn"],
|
91 | 92 | "import/no-cycle": ["warn"],
|
92 | 93 | "import/no-useless-path-segments": ["warn"],
|
93 |
| - "simple-import-sort/sort": ["error"] |
| 94 | + "simple-import-sort/imports": ["warn"], |
| 95 | + "simple-import-sort/exports": ["warn"], |
| 96 | + "workspaces/no-relative-imports": ["off"], |
| 97 | + "workspaces/no-absolute-imports": ["off"] |
94 | 98 | }
|
95 | 99 | }
|
0 commit comments