mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Merge pull request #12572 from meteor/updating-3.0-with-devel
Updating release 3.0 with eslint rules
This commit is contained in:
@@ -2,9 +2,7 @@ android_bundle/
|
||||
dev_bundle/
|
||||
docs/
|
||||
examples/
|
||||
packages/
|
||||
scripts/
|
||||
tools/
|
||||
!tools/*.js
|
||||
!tools/isobuild/*.js
|
||||
!tools/catalog/*.js
|
||||
|
||||
7307
package-lock.json
generated
7307
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
41
package.json
41
package.json
@@ -13,13 +13,30 @@
|
||||
},
|
||||
"homepage": "https://github.com/meteor/meteor#readme",
|
||||
"devDependencies": {
|
||||
"@quave/eslint-config-quave": "^1.0.3",
|
||||
"@types/node": "^14.17.6"
|
||||
"@babel/core": "^7.21.3",
|
||||
"@babel/eslint-parser": "^7.21.3",
|
||||
"@babel/eslint-plugin": "^7.19.1",
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@types/node": "^14.17.6",
|
||||
"@typescript-eslint/eslint-plugin": "^5.56.0",
|
||||
"@typescript-eslint/parser": "^5.56.0",
|
||||
"eslint": "^8.36.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-config-vazco": "^7.1.0",
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-jsx-a11y": "^6.7.1",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-react": "^7.32.2",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"prettier": "^2.8.6",
|
||||
"typescript": "^4.9.5"
|
||||
},
|
||||
"jshintConfig": {
|
||||
"esversion": 11
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"@quave/quave"
|
||||
],
|
||||
"extends": "vazco",
|
||||
"rules": {
|
||||
"global-require": "off",
|
||||
"no-console": "off",
|
||||
@@ -29,11 +46,21 @@
|
||||
"no-shadow": [
|
||||
"error",
|
||||
{
|
||||
"allow": ["resolve"]
|
||||
"allow": [
|
||||
"resolve"
|
||||
]
|
||||
}
|
||||
],
|
||||
"no-use-before-define": "warn",
|
||||
"import/no-unresolved": "warn"
|
||||
"import/no-unresolved": "warn",
|
||||
"require-await": "error",
|
||||
"space-before-function-paren": ["error",
|
||||
{
|
||||
"anonymous": "never",
|
||||
"named": "never",
|
||||
"asyncArrow": "always"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1240,13 +1240,18 @@ function popCallbackFromArgs(args) {
|
||||
}
|
||||
}
|
||||
|
||||
ASYNC_COLLECTION_METHODS.forEach(methodName => {
|
||||
const methodNameAsync = getAsyncMethodName(methodName);
|
||||
Mongo.Collection.prototype[methodNameAsync] = function(...args) {
|
||||
try {
|
||||
return Promise.resolve(this[methodName](...args));
|
||||
} catch (error) {
|
||||
return Promise.reject(error);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
// XXX: IN Meteor 3.x this code was not working....
|
||||
// It throws an error when trying to call a method on the collection.
|
||||
// the error normally is:
|
||||
// TypeError: this[methodName] is not a function
|
||||
// ASYNC_COLLECTION_METHODS.forEach(methodName => {
|
||||
// const methodNameAsync = getAsyncMethodName(methodName);
|
||||
// Mongo.Collection.prototype[methodNameAsync] = function(...args) {
|
||||
// try {
|
||||
// return Promise.resolve(this[methodName](...args));
|
||||
// } catch (error) {
|
||||
// return Promise.reject(error);
|
||||
// }
|
||||
// };
|
||||
// });
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
module.exports = require('@quave/eslint-config-quave/prettier.config');
|
||||
Reference in New Issue
Block a user