Skip to content

Commit

Permalink
feat: add prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Guilherme-NL committed Nov 6, 2023
1 parent dc9af32 commit f3cafdc
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 16 deletions.
28 changes: 14 additions & 14 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
env:
jquery: true
extends:
- plugin:backbone/recommended
plugins:
- react
- backbone
parser: "babel-eslint"
rules:
eqeqeq: 1
backbone/initialize-on-top: 0
backbone/events-on-top: 0
backbone/no-silent: 0
strict: 0
{
"env": { "jquery": true },
"extends": ["plugin:backbone/recommended", "prettier"],
"plugins": ["react", "backbone", "prettier"],
"parser": "babel-eslint",
"rules": {
"eqeqeq": 1,
"backbone/initialize-on-top": 0,
"backbone/events-on-top": 0,
"backbone/no-silent": 0,
"strict": 0,
"prettier/prettier": "error"
}
}
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"arrowParens": "avoid",
"semi": true,
"singleQuote": true
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"coveralls": "jest --coverage --coverageReporters=text-lcov | coveralls",
"lint": "eslint app/assets/javascripts",
"start:test": "rails s -e test -p 5000 & wait-on http://localhost:5000",
"cy:run": "cypress run -P spec/"
"cy:run": "cypress run -P spec/",
"format": "prettier --write 'app/assets/javascripts/**/*.{js,jsx}'"
},
"jest": {
"setupFilesAfterEnv": [
Expand Down Expand Up @@ -121,7 +122,8 @@
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.1",
"es6-promise": "^4.2.8",
"eslint": "^6.8.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-react-app": "^5.0.2",
"eslint-plugin-backbone": "^2.1.1",
"eslint-plugin-flowtype": "^4.5.2",
Expand All @@ -132,6 +134,7 @@
"jest-enzyme": "^7.1.2",
"jest-sinon": "^1.0.1",
"mini-css-extract-plugin": "^0.8.0",
"prettier": "^3.0.3",
"react-addons-test-utils": "^15.6.2",
"react-test-renderer": "^16.12.0",
"sinon": "^7.5.0",
Expand Down

0 comments on commit f3cafdc

Please sign in to comment.