Skip to content

Instantly share code, notes, and snippets.

@badsyntax
Last active March 13, 2018 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save badsyntax/599f0a5b8d22d18a04eef86280a4e327 to your computer and use it in GitHub Desktop.
Save badsyntax/599f0a5b8d22d18a04eef86280a4e327 to your computer and use it in GitHub Desktop.
{
"extends": [
"skyscanner",
"prettier",
"prettier/react"
],
"env": {
"browser": true,
"jest": true
},
"rules": {
"prettier/prettier": "error",
"import/no-extraneous-dependencies": [0]
},
"plugins": ["prettier"]
}
semi: true
trailingComma: all
singleQuote: true
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;
{
"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