浏览代码

chore: nest some prettier rules under ".ts" overrides

Paul Razvan Berg 3 年之前
父节点
当前提交
9188454fe9
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 6 4
      .prettierrc.yml
  2. 0 2
      .solhint.json

+ 6 - 4
.prettierrc.yml

@@ -1,10 +1,6 @@
 arrowParens: avoid
 arrowParens: avoid
 bracketSpacing: true
 bracketSpacing: true
 endOfLine: auto
 endOfLine: auto
-importOrder: ["<THIRD_PARTY_MODULES>", "^[./]"]
-importOrderParserPlugins: ["typescript"]
-importOrderSeparation: true
-importOrderSortSpecifiers: true
 printWidth: 120
 printWidth: 120
 singleQuote: false
 singleQuote: false
 tabWidth: 2
 tabWidth: 2
@@ -15,3 +11,9 @@ overrides:
     options:
     options:
       compiler: "0.8.15"
       compiler: "0.8.15"
       tabWidth: 4
       tabWidth: 4
+  - files: "*.ts"
+    options:
+      importOrder: ["<THIRD_PARTY_MODULES>", "^[./]"]
+      importOrderParserPlugins: ["typescript"]
+      importOrderSeparation: true
+      importOrderSortSpecifiers: true

+ 0 - 2
.solhint.json

@@ -4,8 +4,6 @@
   "rules": {
   "rules": {
     "code-complexity": ["error", 8],
     "code-complexity": ["error", 8],
     "compiler-version": ["error", ">=0.8.4"],
     "compiler-version": ["error", ">=0.8.4"],
-    "const-name-snakecase": "off",
-    "constructor-syntax": "error",
     "func-visibility": ["error", { "ignoreConstructors": true }],
     "func-visibility": ["error", { "ignoreConstructors": true }],
     "max-line-length": ["error", 120],
     "max-line-length": ["error", 120],
     "not-rely-on-time": "off",
     "not-rely-on-time": "off",