user762579
user762579

Reputation:

node_acl with ES6

I am trying to use node_acl plugin, as stated in the README

...
const conn = mongoose.connection;

var acl = require('acl');

// Using the mongodb backend
acl = new acl(new acl.mongodbBackend(dbInstance, prefix));

so I wrote

[30] let acl = require('acl');
[31]
[32] acl = new acl(new acl.mongodbBackend(mongoose.db, 'acl'));

[30] let acl = require('acl');
[31]
[32] conn.on('connected', (error) => {
[33]   if (error) throw error;
[34]   acl = new acl(new acl.mongodbBackend(conn.db, 'acl_'));
[35] });

but ESLint is raising 2 errors

  ✖  34:13  A constructor name should not start with a lowercase letter  new-cap
  ✖  34:25  A constructor name should not start with a lowercase letter  new-cap

How should I use it with ES8 ?

thanks for feedback

Upvotes: 0

Views: 148

Answers (0)

Related Questions