Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: upgraded code to es6 standard #427

Merged
merged 14 commits into from May 2, 2020
17 changes: 9 additions & 8 deletions .eslintrc.json
Expand Up @@ -7,7 +7,14 @@
"jest": true,
"node": true
},
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"plugins": ["node", "standard", "prettier"],
"extends": [
"eslint:recommended",
"standard",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we decide to go for a standard eslint preset, I think we should try to get rid of as many custom rules as possible. I would be all in for that!

How did you decide which custom rules to keep and which to drop? Are there maybe more rules we can drop?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll see what rules can be safely removed.

"prettier",
"prettier/standard",
"plugin:prettier/recommended"
awwit marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"extends": ["plugin:prettier/recommended"] already takes care of loading the prettier eslint plugin, so it should not be necessary to specify it again in the plugins array, see: https://prettier.io/docs/en/integrating-with-linters.html#recommended-configuration

],
"globals": {
"msCrypto": true
},
Expand All @@ -25,7 +32,6 @@
}
],
"dot-notation": "warn",
"eqeqeq": ["warn", "smart"],
"indent": [
"warn",
2,
Expand All @@ -49,11 +55,7 @@
}
],
"keyword-spacing": "warn",
"no-console": "off",
"no-empty": "off",
"no-multi-spaces": "warn",
"no-redeclare": "off",
"no-restricted-globals": ["warn", "Promise"],
"no-trailing-spaces": "warn",
"no-undef": "error",
"no-unused-vars": [
Expand All @@ -63,9 +65,8 @@
}
],
"one-var": ["warn", "never"],
"no-var": "error",
"padded-blocks": ["warn", "never"],
"react/prop-types": "off",
"react/jsx-no-bind": "off",
"semi": ["warn", "always"]
}
}
2 changes: 1 addition & 1 deletion README_js.md
Expand Up @@ -5,7 +5,7 @@ runmd.onRequire = (path) => {
};

// Shim Date and crypto so generated ids are consistent across doc revisions
runmd.Date.prototype.getTime = () => 1551914748172;
runmd.Date.now = () => 1551914748172;

let seed = 0xdefaced;
require('crypto').randomBytes = function () {
Expand Down