Last active
March 13, 2018 09:22
-
-
Save badsyntax/599f0a5b8d22d18a04eef86280a4e327 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extends": [ | |
"skyscanner", | |
"prettier", | |
"prettier/react" | |
], | |
"env": { | |
"browser": true, | |
"jest": true | |
}, | |
"rules": { | |
"prettier/prettier": "error", | |
"import/no-extraneous-dependencies": [0] | |
}, | |
"plugins": ["prettier"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
semi: true | |
trailingComma: all | |
singleQuote: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' // Problem 1 (prettier - semi) | |
// Problem 2 (prettier - quotes) | |
import STYLES from "./App.scss"; | |
// Problem 3 (prettier - parens) | |
const c = (className) => STYLES[className] || 'UNKNOWN'; | |
// Problem 4 (eslint - arrow-body-style) | |
const App = () => { | |
// Problem 5 (prettier - formatting) | |
return <div className={c('App')}> | |
hello world | |
</div>; | |
}; | |
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"devDependencies": { | |
"eslint-config-prettier": "^2.9.0", | |
"eslint-plugin-prettier": "^2.6.0", | |
"prettier": "^1.11.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment