Browse Source

Partially revert aae5030

As discussed in #370 and announced in the official Eslint-meteor
plugin repository (https://github.com/dferber90/eslint-plugin-meteor),
it is recommended to not use this plugin anymore has the author has it
is currently broken and the author has abandoned it.
Maxime Quandalle 10 năm trước cách đây
mục cha
commit
592aa6d576
5 tập tin đã thay đổi với 32 bổ sung40 xóa
  1. 28 36
      .eslintrc
  2. 1 1
      client/config/blazeHelpers.js
  3. 1 1
      models/attachments.js
  4. 1 1
      models/users.js
  5. 1 1
      sandstorm.js

+ 28 - 36
.eslintrc

@@ -1,11 +1,6 @@
 ecmaFeatures:
   experimentalObjectRestSpread: true
 
-plugins:
-  - meteor
-
-parser: babel-eslint
-
 rules:
   strict: 0
   no-undef: 2
@@ -50,39 +45,25 @@ rules:
   prefer-spread: 2
   prefer-template: 2
 
-  # eslint-plugin-meteor
-  ## Meteor API
-  meteor/globals: 2
-  meteor/core: 2
-  meteor/pubsub: 2
-  meteor/methods: 2
-  meteor/check: 2
-  meteor/connections: 2
-  meteor/collections: 2
-  meteor/session: [2, 'no-equal']
-
-  ## Best practices
-  meteor/no-session: 0
-  meteor/no-zero-timeout: 2
-  meteor/no-blaze-lifecycle-assignment: 2
-
-settings:
-  meteor:
-
-    # Our collections
-    collections:
-      - AccountsTemplates
-      - Activities
-      - Attachments
-      - Boards
-      - CardComments
-      - Cards
-      - Lists
-      - UnsavedEditCollection
-      - Users
-
 globals:
+  # Meteor globals
+  Meteor: false
+  Session: false
+  HTML: false
+  check: false
+  Tracker: false
+  Blaze: false
+  Accounts: false
+  Match: false
+  Mongo: false
+  Random: false
+  ReactiveVar: false
+  Email: false
+  Template: false
+
   # Exported by packages we use
+  '$': false
+  _: false
   autosize: false
   Avatar: true
   Avatars: true
@@ -108,6 +89,17 @@ globals:
   T9n: false
   TAPi18n: false
 
+  # Our collections
+  AccountsTemplates: true
+  Activities: true
+  Attachments: true
+  Boards: true
+  CardComments: true
+  Cards: true
+  Lists: true
+  UnsavedEditCollection: true
+  Users: true
+
   # Our objects
   CSSEvents: true
   EscapeActions: true

+ 1 - 1
client/config/blazeHelpers.js

@@ -14,6 +14,6 @@ Blaze.registerHelper('currentCard', () => {
 
 Blaze.registerHelper('getUser', (userId) => Users.findOne(userId));
 
-UI.registerHelper('concat', function (...args) {
+Blaze.registerHelper('concat', function (...args) {
   return Array.prototype.slice.call(args, 0, -1).join('');
 });

+ 1 - 1
models/attachments.js

@@ -1,4 +1,4 @@
-Attachments = new FS.Collection('attachments', { // eslint-disable-line meteor/collections
+Attachments = new FS.Collection('attachments', {
   stores: [
 
     // XXX Add a new store for cover thumbnails so we don't load big images in

+ 1 - 1
models/users.js

@@ -1,4 +1,4 @@
-Users = Meteor.users; // eslint-disable-line meteor/collections
+Users = Meteor.users;
 
 // Search a user in the complete server database by its name or username. This
 // is used for instance to add a new user to a board.

+ 1 - 1
sandstorm.js

@@ -160,7 +160,7 @@ if (isSandstorm && Meteor.isClient) {
   // sandstorm client to return relative paths instead of absolutes.
   const _absoluteUrl = Meteor.absoluteUrl;
   const _defaultOptions = Meteor.absoluteUrl.defaultOptions;
-  Meteor.absoluteUrl = (path, options) => { // eslint-disable-line meteor/core
+  Meteor.absoluteUrl = (path, options) => {
     const url = _absoluteUrl(path, options);
     return url.replace(/^https?:\/\/127\.0\.0\.1:[0-9]{2,5}/, '');
   };