Skip to content

Commit

Permalink
Update code styling rules (#713)
Browse files Browse the repository at this point in the history
* Enforce curly braces around conditionals

* Install sort class members + update rules

* Satisfy linting changes

* Add todo

* Add tests for clearChoices

* Update eslint-plugin-prettier to latest

* Resolve conflicts

* Fix linting errors
  • Loading branch information
jshjohnson authored Oct 29, 2019
1 parent 172366d commit 88f63fa
Show file tree
Hide file tree
Showing 15 changed files with 303 additions and 138 deletions.
19 changes: 18 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"plugin:prettier/recommended",
"plugin:compat/recommended"
],
"plugins": ["prettier"],
"plugins": ["prettier", "sort-class-members"],
"env": {
"es6": true,
"browser": true
Expand Down Expand Up @@ -37,6 +37,23 @@
"array": false,
"object": true
}
],
"curly": ["error", "all"],
"newline-before-return": "error",
"sort-class-members/sort-class-members": [
2,
{
"order": [
"[static-properties]",
"[static-methods]",
"[properties]",
"[conventional-private-properties]",
"constructor",
"[methods]",
"[conventional-private-methods]"
],
"accessorPairPositioning": "getThenSet"
}
]
},
"overrides": [
Expand Down
173 changes: 76 additions & 97 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,15 @@
"chai": "^4.2.0",
"csso-cli": "^3.0.0",
"cypress": "3.5.0",
"eslint": "^6.5.1",
"eslint": "^6.6.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-config-prettier": "^6.4.0",
"eslint-config-prettier": "^6.5.0",
"eslint-loader": "^3.0.2",
"eslint-plugin-compat": "3.3.0",
"eslint-plugin-cypress": "^2.7.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-sort-class-members": "^1.6.0",
"express": "^4.16.4",
"husky": "^3.0.9",
"jsdom": "^15.2.0",
Expand Down
Loading

0 comments on commit 88f63fa

Please sign in to comment.