Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

Commit

Permalink
Chore: Update prettier and pin the version (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
mightyiam authored and JamesHenry committed Nov 23, 2017
1 parent 3284af4 commit 12220cc
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 26 deletions.
4 changes: 3 additions & 1 deletion lib/rules/adjacent-overload-signatures.js
Expand Up @@ -88,7 +88,9 @@ module.exports = {
if (index > -1 && lastName !== name) {
context.report({
node: member,
message: `All '${name}' signatures should be adjacent`
message: `All '${
name
}' signatures should be adjacent`
});
} else if (name && index === -1) {
seen.push(name);
Expand Down
10 changes: 6 additions & 4 deletions lib/rules/explicit-member-accessibility.js
Expand Up @@ -36,8 +36,9 @@ module.exports = {
if (!methodDefinition.accessibility) {
context.report({
node: methodDefinition,
message: `Missing accessibility modifier on method definition ${methodDefinition
.key.name}.`
message: `Missing accessibility modifier on method definition ${
methodDefinition.key.name
}.`
});
}
}
Expand All @@ -52,8 +53,9 @@ module.exports = {
if (!classProperty.accessibility) {
context.report({
node: classProperty,
message: `Missing accessibility modifier on class property ${classProperty
.key.name}.`
message: `Missing accessibility modifier on class property ${
classProperty.key.name
}.`
});
}
}
Expand Down
39 changes: 19 additions & 20 deletions lib/rules/member-ordering.js
Expand Up @@ -10,27 +10,26 @@ const util = require("../util");
// Rule Definition
//------------------------------------------------------------------------------

const schemaOptions = [
"field",
"method",
"constructor"
].reduce((options, type) => {
options.push(type);

["public", "protected", "private"].forEach(accessibility => {
options.push(`${accessibility}-${type}`);
if (type !== "constructor") {
["static", "instance"].forEach(scope => {
if (options.indexOf(`${scope}-${type}`) === -1) {
options.push(`${scope}-${type}`);
}
options.push(`${accessibility}-${scope}-${type}`);
});
}
});
const schemaOptions = ["field", "method", "constructor"].reduce(
(options, type) => {
options.push(type);

["public", "protected", "private"].forEach(accessibility => {
options.push(`${accessibility}-${type}`);
if (type !== "constructor") {
["static", "instance"].forEach(scope => {
if (options.indexOf(`${scope}-${type}`) === -1) {
options.push(`${scope}-${type}`);
}
options.push(`${accessibility}-${scope}-${type}`);
});
}
});

return options;
}, []);
return options;
},
[]
);

module.exports = {
meta: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -32,7 +32,7 @@
"husky": "^0.14.3",
"lint-staged": "^4.1.3",
"mocha": "^3.5.3",
"prettier": "^1.6.1",
"prettier": "1.8.2",
"typescript": "~2.5.1",
"typescript-eslint-parser": "^8.0.0"
},
Expand Down

0 comments on commit 12220cc

Please sign in to comment.