Port bug 1464007 - Specify the 'html' plugin in .eslintrc.js by default for better editor integration. rs=bustage-fix DONTBUILD
authorGeoff Lankow <geoff@darktrojan.net>
Mon, 24 Jun 2019 12:40:02 +1200
changeset 35930 0b65696ec2396a59b8cc85a601a0baffc0b0a5a0
parent 35929 70cded2918d3b83c273da5a55a72f91ce7b2a442
child 35931 42c2ac13e002495c8061841dfe16de6aba93dff5
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersbustage-fix
bugs1464007
Port bug 1464007 - Specify the 'html' plugin in .eslintrc.js by default for better editor integration. rs=bustage-fix DONTBUILD
.eslintrc.js
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -29,16 +29,17 @@ module.exports = {
   // We would like the same base rules as provided by
   // mozilla/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
   "extends": [
     "plugin:mozilla/recommended",
   ],
 
   // When adding items to this file please check for effects on sub-directories.
   "plugins": [
+    "html",
     "mozilla",
   ],
 
   "rules": {
     "func-names": ["error", "never"],
     "no-multi-spaces": ["error", {
       exceptions: {
         "ArrayExpression": true,
@@ -48,19 +49,19 @@ module.exports = {
       },
       ignoreEOLComments: true,
     }],
     "prettier/prettier": "off",
     "semi-spacing": ["error", {"before": false, "after": true}],
     "space-in-parens": ["error", "never"],
   },
 
-  // The html plugin is enabled via a command line option on eslint. To avoid
-  // bad interactions with the xml preprocessor in eslint-plugin-mozilla, we
-  // turn off processing of the html plugin for .xml files.
+  // To avoid bad interactions of the html plugin with the xml preprocessor in
+  // eslint-plugin-mozilla, we turn off processing of the html plugin for .xml
+  // files.
   "settings": {
     "html/xml-extensions": [ ".xhtml" ],
   },
 
   "overrides": [{
     // eslint-plugin-html handles eol-last slightly different - it applies to
     // each set of script tags, so we turn it off here.
     "files": "**/*.*html",