Node-Red configuration
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

.eslintrc 3.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. {
  2. "extends": "eslint:recommended",
  3. "env": {
  4. "es6": true,
  5. "node": true,
  6. "browser": true,
  7. "mocha": true
  8. },
  9. "parserOptions": {
  10. "ecmaVersion": 2016
  11. },
  12. "globals": {
  13. "window": false,
  14. "document": false,
  15. "$": false,
  16. "System": false,
  17. "expect": false
  18. },
  19. "rules": {
  20. "accessor-pairs": "error",
  21. "arrow-spacing": "error",
  22. "brace-style": [ "error", "1tbs", { "allowSingleLine": true } ],
  23. "camelcase": [ "error", { "properties": "never" } ],
  24. "comma-spacing": ["error", { "before": false, "after": true }],
  25. // "curly": [ "error", "all" ],
  26. // "dot-notation": "error",
  27. "eol-last": ["error", "always"],
  28. // "eqeqeq": ["error", "always"],
  29. // "indent": ["error", "tab", { "MemberExpression": "off", "SwitchCase": 1, "ObjectExpression": "first" } ],
  30. "key-spacing": [ "error", { "beforeColon": false, "afterColon": true, "mode": "minimum" } ],
  31. "keyword-spacing": [ "error", {} ],
  32. "no-cond-assign": "error",
  33. "no-console": ["off", { "allow": ["warn", "error"] }],
  34. "no-constant-condition": ["error", { "checkLoops": false }],
  35. "no-eval": "error",
  36. "no-fallthrough": "off",
  37. "no-mixed-spaces-and-tabs": "error",
  38. // "no-multiple-empty-lines": "error",
  39. "no-restricted-globals": ["error", "event"],
  40. "no-restricted-syntax": [
  41. "error",
  42. {
  43. "selector": "*:not(ExpressionStatement) > CallExpression[callee.property.name='sort']:not([callee.object.type='CallExpression']):not([callee.object.type='ArrayExpression']):not([callee.object.name='mongoUtil'])",
  44. "message": "Restricted Array Mutation: Use `array.slice().sort(...)` if mutation was not intended, otherwise place on own line."
  45. },
  46. {
  47. "selector": "*:not(ExpressionStatement) > CallExpression[callee.property.name='reverse']:not([callee.object.type='CallExpression']):not([callee.object.type='ArrayExpression'])",
  48. "message": "Restricted Array Mutation: Use `array.slice().reverse(...)` if mutation was not intended, otherwise place on own line."
  49. },
  50. {
  51. "selector": "*:not(ExpressionStatement) > CallExpression[callee.property.name='push']",
  52. "message": "Restricted Array Mutation: `array.push(...)` returns push count, not array reference, place statement on own line."
  53. }
  54. ],
  55. // "no-return-assign": "error",
  56. // "no-trailing-spaces": "error",
  57. "no-undef": "error",
  58. "no-unused-expressions": "error",
  59. "no-unused-vars": ["error", { "vars": "all", "args": "none" }],
  60. // "no-use-before-define": [ "error", { "functions": false } ],
  61. "no-useless-escape": "off",
  62. "no-with": "error",
  63. "padding-line-between-statements": [
  64. "error",
  65. { "blankLine": "always", "prev": "*", "next": "function" }
  66. ],
  67. // "quotes": [ "error", "double", { "allowTemplateLiterals": true, "avoidEscape": true } ],
  68. "semi": [ "error", "always" ],
  69. "space-before-blocks": [ "error", "always" ],
  70. // "space-before-function-paren": [ "error", { "anonymous": "always", "named": "always", "asyncArrow": "always" } ],
  71. // "space-in-parens": [ "error", "never" ],
  72. // "space-infix-ops": "error",
  73. // "space-unary-ops": [ "error", { "nonwords": true, "overrides": {} } ],
  74. // "spaced-comment": [ "error", "always", {"block": {"exceptions": ["*", "!"], "balanced": true}} ]
  75. }
  76. }