Kaynağa Gözat

Merge branch 'eslint-config' into eslint-config-into-nicaea

Mokhtar Naamani 4 yıl önce
ebeveyn
işleme
1b3c8180be
3 değiştirilmiş dosya ile 9 ekleme ve 18 silme
  1. 1 3
      .gitignore
  2. 0 7
      .vscode/settings.json
  3. 8 8
      devops/eslint-config/index.js

+ 1 - 3
.gitignore

@@ -21,9 +21,7 @@ yarn*
 # Vim
 .*.sw*
 
-# Making an exception here to fix eslint plugin issue
-# https://github.com/microsoft/vscode-eslint/issues/455
-# And allow for proper config to fix eslint and formatting on save
+# Visual Studio Code
 .vscode/
 
 # Compiled WASM code

+ 0 - 7
.vscode/settings.json

@@ -1,7 +0,0 @@
-{
-  "editor.formatOnSave": false,
-  "editor.codeActionsOnSave": {
-    "source.fixAll": false,
-    "source.fixAll.eslint": true
-  }
-}

+ 8 - 8
devops/eslint-config/index.js

@@ -25,16 +25,10 @@ module.exports = {
     'plugin:react/recommended',
     // this is only in newer versions of eslint-plugin-react-hooks
     // 'plugin:react-hooks/recommended',
-
-    // Turns off all rules that are unnecessary or might conflict with Prettier.
-    // Allows us to do formatting separately from linting.
-    'prettier',
+    'plugin:prettier/recommended',
     'prettier/@typescript-eslint',
     'prettier/react',
     'prettier/standard',
-    // To Display prettier errors as ESLint errors, enable the following configuration,
-    // And make sure it is the last configuration in the extends array.
-    'plugin:prettier/recommended',
   ],
   settings: {
     react: {
@@ -46,5 +40,11 @@ module.exports = {
     'react-hooks/rules-of-hooks': 'error',
     'react-hooks/exhaustive-deps': 'warn',
   },
-  plugins: ['standard', '@typescript-eslint', 'react', 'react-hooks'],
+  plugins: [
+    'standard',
+    '@typescript-eslint',
+    'react',
+    'react-hooks',
+    'prettier',
+  ],
 }