.eslintrc 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {
  2. // ╔═╗╔═╗╦ ╦╔╗╔╔╦╗┬─┐┌─┐ ┌─┐┬ ┬┌─┐┬─┐┬─┐┬┌┬┐┌─┐
  3. // ║╣ ╚═╗║ ║║║║ ║ ├┬┘│ │ │└┐┌┘├┤ ├┬┘├┬┘│ ││├┤
  4. // o╚═╝╚═╝╩═╝╩╝╚╝ ╩ ┴└─└─┘ └─┘ └┘ └─┘┴└─┴└─┴─┴┘└─┘
  5. // ┌─ ┌─┐┌─┐┬─┐ ┌┐ ┬─┐┌─┐┬ ┬┌─┐┌─┐┬─┐ ┬┌─┐ ┌─┐┌─┐┌─┐┌─┐┌┬┐┌─┐ ─┐
  6. // │ ├┤ │ │├┬┘ ├┴┐├┬┘│ ││││└─┐├┤ ├┬┘ │└─┐ ├─┤└─┐└─┐├┤ │ └─┐ │
  7. // └─ └ └─┘┴└─ └─┘┴└─└─┘└┴┘└─┘└─┘┴└─ └┘└─┘ ┴ ┴└─┘└─┘└─┘ ┴ └─┘ ─┘
  8. // > An .eslintrc configuration override for use in the `assets/` directory.
  9. //
  10. // This extends the top-level .eslintrc file, primarily to change the set of
  11. // supported globals, as well as any other relevant settings. (Since JavaScript
  12. // code in the `assets/` folder is intended for the browser habitat, a different
  13. // set of globals is supported. For example, instead of Node.js/Sails globals
  14. // like `sails` and `process`, you have access to browser globals like `window`.)
  15. //
  16. // (See .eslintrc in the root directory of this Sails app for more context.)
  17. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  18. "extends": [
  19. "../.eslintrc"
  20. ],
  21. "env": {
  22. "browser": true,
  23. "node": false
  24. },
  25. "parserOptions": {
  26. "ecmaVersion": 8
  27. //^ If you are not using a transpiler like Babel, change this to `5`.
  28. },
  29. "globals": {
  30. // Allow any window globals you're relying on here; e.g.
  31. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  32. "SAILS_LOCALS": true,
  33. "io": true,
  34. "Cloud": true,
  35. "parasails": true,
  36. "$": true,
  37. "_": true,
  38. "StripeCheckout": true,
  39. "Stripe": true,
  40. "Vue": true,
  41. "VueRouter": true,
  42. // "moment": true,
  43. // "bowser": true
  44. // ...etc.
  45. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  46. // Make sure backend globals aren't indadvertently tolerated in our client-side JS:
  47. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  48. "sails": false,
  49. "async": false,
  50. "User": false
  51. // ...and any other backend globals (e.g. `"Organization": false`)
  52. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  53. }
  54. }