Просмотр исходного кода

update eslint-config-weseek and apply import/order rule

Yuki Takei 4 лет назад
Родитель
Сommit
5cb340102a
3 измененных файлов с 26 добавлено и 5 удалено
  1. 21 0
      .eslintrc.js
  2. 1 1
      package.json
  3. 4 4
      yarn.lock

+ 21 - 0
.eslintrc.js

@@ -16,6 +16,27 @@ module.exports = {
   ],
   rules: {
     'import/prefer-default-export': 'off',
+    'import/order': [
+      'warn',
+      {
+        pathGroups: [
+          {
+            pattern: '^/**',
+            group: 'parent',
+            position: 'before',
+          },
+          {
+            pattern: '~/**',
+            group: 'parent',
+            position: 'before',
+          },
+        ],
+        alphabetize: {
+          order: 'asc',
+        },
+        'newlines-between': 'always',
+      },
+    ],
     '@typescript-eslint/no-explicit-any': 'off',
     indent: [
       'error',

+ 1 - 1
package.json

@@ -59,7 +59,7 @@
     "@typescript-eslint/parser": "^4.28.5",
     "cypress": "^9.2.0",
     "eslint": "^7.31.0",
-    "eslint-config-weseek": "^2.0.0",
+    "eslint-config-weseek": "^2.1.0",
     "eslint-import-resolver-typescript": "^2.4.0",
     "eslint-plugin-import": "^2.23.4",
     "eslint-plugin-jest": "^24.3.2",

+ 4 - 4
yarn.lock

@@ -8048,10 +8048,10 @@ eslint-config-airbnb@^17.1.0:
     object.assign "^4.1.0"
     object.entries "^1.0.4"
 
-eslint-config-weseek@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/eslint-config-weseek/-/eslint-config-weseek-2.0.0.tgz#e159949f518f6e8eb28b2b0998fcf887c818b53c"
-  integrity sha512-jUB6YLneBWG6S7qcgPrxikXbSbUWIJaGOvaE8LBV5MHZGGbhdjGg2nFAgpPHTJjAPoUEnEtiSFNq2019cFDhfg==
+eslint-config-weseek@^2.1.0:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/eslint-config-weseek/-/eslint-config-weseek-2.1.0.tgz#3581b8484805ae65edbf4cae32e13b01c8622796"
+  integrity sha512-LDQ5d2TSu90zGH7xrX6XZRL+HQ23L4hPJYIOif4WVLnCSqodrdUd/5PGOKuDzZiUd//WqN42/RhvChO6a4P1JA==
   dependencies:
     eslint-config-airbnb "^17.1.0"