.eslintrc 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {
  2. // ╔═╗╔═╗╦ ╦╔╗╔╔╦╗┬─┐┌─┐
  3. // ║╣ ╚═╗║ ║║║║ ║ ├┬┘│
  4. // o╚═╝╚═╝╩═╝╩╝╚╝ ╩ ┴└─└─┘
  5. // A set of basic conventions (similar to .jshintrc) for use within any
  6. // arbitrary JavaScript / Node.js package -- inside or outside Sails.js.
  7. // For the master copy of this file, see the `.eslintrc` template file in
  8. // the `sails-generate` package (https://www.npmjs.com/package/sails-generate.)
  9. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  10. // For more information about any of the rules below, check out the relevant
  11. // reference page on eslint.org. For example, to get details on "no-sequences",
  12. // you would visit `http://eslint.org/docs/rules/no-sequences`.
  13. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  14. "env": {
  15. "node": true
  16. },
  17. "parserOptions": {
  18. "ecmaVersion": 8
  19. },
  20. "rules": {
  21. "callback-return": [2, ["callback", "cb", "next", "done", "proceed"]],
  22. "camelcase": [1, {"properties": "always"}],
  23. "comma-style": [2, "last"],
  24. "curly": [2],
  25. "eqeqeq": [2, "always"],
  26. "eol-last": [1],
  27. "handle-callback-err": [2],
  28. "indent": [1, 2, {"SwitchCase": 1}],
  29. "linebreak-style": [2, "unix"],
  30. "no-dupe-keys": [2],
  31. "no-duplicate-case": [2],
  32. "no-mixed-spaces-and-tabs": [2, "smart-tabs"],
  33. "no-return-assign": [2, "always"],
  34. "no-sequences": [2],
  35. "no-trailing-spaces": [1],
  36. "no-undef": [2],
  37. "no-unexpected-multiline": [1],
  38. "no-unused-vars": [1],
  39. "one-var": [2, "never"],
  40. "quotes": [1, "single", { "avoidEscape": false, "allowTemplateLiterals": true }],
  41. "semi": [2, "always"]
  42. }
  43. }