Skip to content

Commit

Permalink
Integrate prettier in eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
ThiefMaster committed Jun 4, 2019
1 parent a9c4450 commit 081d4e7
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ env:

plugins:
- react-hooks
- prettier

extends:
- 'indico'
- 'indico/babel'
- 'indico/react'
- 'plugin:prettier/recommended'
- 'prettier/babel'
- 'prettier/react'

settings:
# we don't use the webpack resolver because it is SLOW (~1s),
Expand Down Expand Up @@ -45,6 +49,8 @@ rules:
react-hooks/exhaustive-deps:
- warn
- additionalHooks: 'useAsyncEffect'
# avoid conflicts with prettier
import/newline-after-import: off

globals:
Indico: false
Expand Down
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Not actually JavaScript
indico/web/templates/assets

# Generated content
indico/web/static/dist/
12 changes: 12 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
printWidth: 100
tabWidth: 2
useTabs: false
semi: true
singleQuote: true
quoteProps: consistent
jsxSingleQuote: false
trailingComma: es5
bracketSpacing: false
jsxBracketSameLine: false
arrowParens: avoid
endOfLine: lf
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,11 @@
"eslint": "^5.16.0",
"eslint-cli": "^1.1.1",
"eslint-config-indico": "^1.1.0",
"eslint-config-prettier": "^4.3.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-react": "^7.13.0",
"eslint-plugin-react-hooks": "^1.6.0",
"exports-loader": "^0.7.0",
Expand All @@ -117,6 +119,7 @@
"postcss-loader": "^3.0.0",
"postcss-scss": "^2.0.0",
"postcss-url": "^8.0.0",
"prettier": "^1.17.1",
"progress-bar-webpack-plugin": "^1.12.1",
"resolve-url-loader": "^3.1.0",
"sass-lint": "^1.13.1",
Expand Down

0 comments on commit 081d4e7

Please sign in to comment.