]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Move xo config to .xo-config.json xmr/xo
authorXhmikosR <xhmikosr@gmail.com>
Wed, 13 Mar 2024 19:57:26 +0000 (21:57 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Wed, 13 Mar 2024 20:11:06 +0000 (22:11 +0200)
.xo-config.json [new file with mode: 0644]
package.json

diff --git a/.xo-config.json b/.xo-config.json
new file mode 100644 (file)
index 0000000..4a5380b
--- /dev/null
@@ -0,0 +1,180 @@
+{
+  "envs": [
+    "browser"
+  ],
+  "semicolon": false,
+  "space": 2,
+  "ignores": [
+    "**/*.min.js",
+    "**/dist/**",
+    "**/vendor/**",
+    "site/layouts/partials/",
+    "site/static/sw.js"
+  ],
+  "rules": {
+    "arrow-body-style": "off",
+    "capitalized-comments": "off",
+    "comma-dangle": [
+      "error",
+      "never"
+    ],
+    "import/extensions": [
+      "error",
+      "ignorePackages",
+      {
+        "js": "always"
+      }
+    ],
+    "logical-assignment-operators": "off",
+    "max-params": [
+      "warn",
+      5
+    ],
+    "multiline-ternary": [
+      "error",
+      "always-multiline"
+    ],
+    "new-cap": [
+      "error",
+      {
+        "properties": false
+      }
+    ],
+    "no-console": "error",
+    "object-curly-spacing": [
+      "error",
+      "always"
+    ],
+    "operator-linebreak": [
+      "error",
+      "after"
+    ],
+    "prefer-object-has-own": "off",
+    "prefer-template": "error",
+    "strict": "error",
+    "unicorn/explicit-length-check": "off",
+    "unicorn/filename-case": "off",
+    "unicorn/no-array-callback-reference": "off",
+    "unicorn/no-array-method-this-argument": "off",
+    "unicorn/no-negated-condition": "off",
+    "unicorn/no-typeof-undefined": "off",
+    "unicorn/no-unused-properties": "error",
+    "unicorn/prefer-array-flat": "off",
+    "unicorn/prefer-dom-node-dataset": "off",
+    "unicorn/prefer-module": "off",
+    "unicorn/prefer-query-selector": "off",
+    "unicorn/prefer-spread": "off",
+    "unicorn/prevent-abbreviations": "off"
+  },
+  "overrides": [
+    {
+      "files": [
+        "build/**"
+      ],
+      "parserOptions": {
+        "sourceType": "module"
+      },
+      "rules": {
+        "no-console": "off",
+        "unicorn/prefer-top-level-await": "off"
+      }
+    },
+    {
+      "files": [
+        "js/**"
+      ],
+      "parserOptions": {
+        "sourceType": "module"
+      }
+    },
+    {
+      "files": [
+        "js/tests/*.js",
+        "js/tests/integration/rollup*.js"
+      ],
+      "parserOptions": {
+        "sourceType": "script"
+      }
+    },
+    {
+      "files": [
+        "js/tests/unit/**"
+      ],
+      "envs": [
+        "jasmine"
+      ],
+      "rules": {
+        "no-console": "off",
+        "unicorn/consistent-function-scoping": "off",
+        "unicorn/no-useless-undefined": "off",
+        "unicorn/prefer-add-event-listener": "off"
+      }
+    },
+    {
+      "files": [
+        "js/tests/visual/**"
+      ],
+      "plugins": [
+        "html"
+      ],
+      "settings": {
+        "html/html-extensions": [
+          ".html"
+        ]
+      },
+      "rules": {
+        "no-console": "off",
+        "no-new": "off",
+        "unicorn/no-array-for-each": "off"
+      }
+    },
+    {
+      "files": [
+        "scss/tests/**"
+      ],
+      "parserOptions": {
+        "sourceType": "script"
+      }
+    },
+    {
+      "files": [
+        "site/**"
+      ],
+      "parserOptions": {
+        "sourceType": "script",
+        "ecmaVersion": 2019
+      },
+      "rules": {
+        "no-new": "off",
+        "strict": [
+          "error",
+          "function"
+        ],
+        "unicorn/no-array-for-each": "off",
+        "unicorn/numeric-separators-style": "off"
+      }
+    },
+    {
+      "files": [
+        "**/*.md"
+      ],
+      "plugins": [
+        "markdown"
+      ],
+      "processor": "markdown/markdown"
+    },
+    {
+      "files": [
+        "**/*.md/*.js",
+        "**/*.md/*.mjs"
+      ],
+      "extends": "plugin:markdown/recommended-legacy",
+      "parserOptions": {
+        "sourceType": "module"
+      },
+      "rules": {
+        "unicorn/prefer-node-protocol": "off"
+      }
+    }
+  ]
+}
index 27005979367f5c676982a414eedb306c972679ae..5bba925f205350220faf260380117e3139d409b0 100644 (file)
     "peerDependencies": {
       "@popperjs/core": "^2.11.8"
     }
-  },
-  "xo": {
-    "envs": [
-      "browser"
-    ],
-    "semicolon": false,
-    "space": 2,
-    "ignores": [
-      "**/*.min.js",
-      "**/dist/**",
-      "**/vendor/**",
-      "site/layouts/partials/",
-      "site/static/sw.js"
-    ],
-    "rules": {
-      "arrow-body-style": "off",
-      "capitalized-comments": "off",
-      "comma-dangle": [
-        "error",
-        "never"
-      ],
-      "import/extensions": [
-        "error",
-        "ignorePackages",
-        {
-          "js": "always"
-        }
-      ],
-      "logical-assignment-operators": "off",
-      "max-params": [
-        "warn",
-        5
-      ],
-      "multiline-ternary": [
-        "error",
-        "always-multiline"
-      ],
-      "new-cap": [
-        "error",
-        {
-          "properties": false
-        }
-      ],
-      "no-console": "error",
-      "object-curly-spacing": [
-        "error",
-        "always"
-      ],
-      "operator-linebreak": [
-        "error",
-        "after"
-      ],
-      "prefer-object-has-own": "off",
-      "prefer-template": "error",
-      "strict": "error",
-      "unicorn/explicit-length-check": "off",
-      "unicorn/filename-case": "off",
-      "unicorn/no-array-callback-reference": "off",
-      "unicorn/no-array-method-this-argument": "off",
-      "unicorn/no-negated-condition": "off",
-      "unicorn/no-typeof-undefined": "off",
-      "unicorn/no-unused-properties": "error",
-      "unicorn/prefer-array-flat": "off",
-      "unicorn/prefer-dom-node-dataset": "off",
-      "unicorn/prefer-module": "off",
-      "unicorn/prefer-query-selector": "off",
-      "unicorn/prefer-spread": "off",
-      "unicorn/prevent-abbreviations": "off"
-    },
-    "overrides": [
-      {
-        "files": [
-          "build/**"
-        ],
-        "parserOptions": {
-          "sourceType": "module"
-        },
-        "rules": {
-          "no-console": "off",
-          "unicorn/prefer-top-level-await": "off"
-        }
-      },
-      {
-        "files": [
-          "js/**"
-        ],
-        "parserOptions": {
-          "sourceType": "module"
-        }
-      },
-      {
-        "files": [
-          "js/tests/*.js",
-          "js/tests/integration/rollup*.js"
-        ],
-        "parserOptions": {
-          "sourceType": "script"
-        }
-      },
-      {
-        "files": [
-          "js/tests/unit/**"
-        ],
-        "envs": [
-          "jasmine"
-        ],
-        "rules": {
-          "no-console": "off",
-          "unicorn/consistent-function-scoping": "off",
-          "unicorn/no-useless-undefined": "off",
-          "unicorn/prefer-add-event-listener": "off"
-        }
-      },
-      {
-        "files": [
-          "js/tests/visual/**"
-        ],
-        "plugins": [
-          "html"
-        ],
-        "settings": {
-          "html/html-extensions": [
-            ".html"
-          ]
-        },
-        "rules": {
-          "no-console": "off",
-          "no-new": "off",
-          "unicorn/no-array-for-each": "off"
-        }
-      },
-      {
-        "files": [
-          "scss/tests/**"
-        ],
-        "parserOptions": {
-          "sourceType": "script"
-        }
-      },
-      {
-        "files": [
-          "site/**"
-        ],
-        "parserOptions": {
-          "sourceType": "script",
-          "ecmaVersion": 2019
-        },
-        "rules": {
-          "no-new": "off",
-          "strict": [
-            "error",
-            "function"
-          ],
-          "unicorn/no-array-for-each": "off",
-          "unicorn/numeric-separators-style": "off"
-        }
-      },
-      {
-        "files": [
-          "**/*.md"
-        ],
-        "plugins": [
-          "markdown"
-        ],
-        "processor": "markdown/markdown"
-      },
-      {
-        "files": [
-          "**/*.md/*.js",
-          "**/*.md/*.mjs"
-        ],
-        "extends": "plugin:markdown/recommended-legacy",
-        "parserOptions": {
-          "sourceType": "module"
-        },
-        "rules": {
-          "unicorn/prefer-node-protocol": "off"
-        }
-      }
-    ]
   }
 }