Skip to content

Commit

Permalink
fix(eslint): fix "@tinkoff/member-ordering" rule failing (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Naumov authored and MarsiBarsi committed Nov 27, 2019
1 parent 7b1fd1d commit a2964c0
Show file tree
Hide file tree
Showing 6 changed files with 3,870 additions and 3,834 deletions.
3 changes: 2 additions & 1 deletion .huskyrc
@@ -1,5 +1,6 @@
{
"hooks": {
"pre-commit": "npm run lint"
"pre-commit": "npm run lint",
"pre-push": "npm run test:ci"
}
}
2 changes: 1 addition & 1 deletion eslint/angular/conventions.js
Expand Up @@ -8,7 +8,7 @@ module.exports = {
'@tinkoff/member-ordering': [
breaking({since: 2}),
{
classes: [
default: [
'private-instance-field',
'private-static-field',
'protected-static-field',
Expand Down
6 changes: 5 additions & 1 deletion eslint/rules/member-ordering.js
Expand Up @@ -165,7 +165,11 @@ module.exports = {
},
defaultOptions,
create(context) {
const options = (context.options && context.options[0]) || defaultOptions[0];
const options = Object.assign(
{},
defaultOptions[0],
context.options ? context.options[0] : null,
);

const sourceCode = context.getSourceCode();
const functionExpressions = [
Expand Down

0 comments on commit a2964c0

Please sign in to comment.