Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retain arguments for rules that are specified #2

Closed
weisjohn opened this issue Nov 17, 2015 · 1 comment
Closed

retain arguments for rules that are specified #2

weisjohn opened this issue Nov 17, 2015 · 1 comment

Comments

@weisjohn
Copy link
Owner

When merging the rules, we should retain the arguments for those values which are replaced. Consider this diff:

$ gdc
diff --git a/.eslintrc b/.eslintrc
index cdfe049..bc96136 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,10 +1,33 @@
 {
     "rules": {
-        "indent": [ 2, 4 ],
-        "quotes": [ 2, "single" ],
-        "linebreak-style": [ 2, "unix" ],
-        "semi": [ 2, "always" ],
-        "comma-dangle": [ 0 ]
+        "indent": [
+            1
+        ],
+        "quotes": [
+            1
+        ],
+        "linebreak-style": [
+            2,
+            "unix"
+        ],
+        "semi": [
+            1
+        ],
+        "comma-dangle": [
+            0
+        ],
+        "no-unused-vars": [
+            1
+        ],
+        "no-console": [
+            1
+        ],
+        "no-undef": [
+            1
+        ],
+        "no-redeclare": [
+            1
+        ]
     },
     "env": {
         "es6": true,
@@ -12,4 +35,4 @@
         "node": true
     },
     "extends": "eslint:recommended"
-}
+}
@weisjohn
Copy link
Owner Author

better, but still ugly:

$ gd
diff --git a/.eslintrc b/.eslintrc
index cdfe049..db9cef6 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,10 +1,36 @@
 {
     "rules": {
-        "indent": [ 2, 4 ],
-        "quotes": [ 2, "single" ],
-        "linebreak-style": [ 2, "unix" ],
-        "semi": [ 2, "always" ],
-        "comma-dangle": [ 0 ]
+        "indent": [
+            1,
+            4
+        ],
+        "quotes": [
+            1,
+            "single"
+        ],
+        "linebreak-style": [
+            2,
+            "unix"
+        ],
+        "semi": [
+            1,
+            "always"
+        ],
+        "comma-dangle": [
+            0
+        ],
+        "no-unused-vars": [
+            1
+        ],
+        "no-console": [
+            1
+        ],
+        "no-undef": [
+            1
+        ],
+        "no-redeclare": [
+            1
+        ]
     },
     "env": {
         "es6": true,
@@ -12,4 +38,4 @@
         "node": true
     },
     "extends": "eslint:recommended"
-}
+}
\ No newline at end of file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant