Skip to content

Commit

Permalink
feat: add prettierrc file, change eslint config options
Browse files Browse the repository at this point in the history
  • Loading branch information
caribouuuu committed Nov 24, 2020
1 parent da0f143 commit 9665eed
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 10 deletions.
26 changes: 24 additions & 2 deletions client/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"env": {
"browser": true,
"jest": true,
"node": true,
"es2021": true
},
"extends": [
"plugin:react/recommended",
"airbnb"
"airbnb",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
Expand All @@ -22,6 +24,26 @@
"prettier"
],
"rules": {
"prettier/prettier": "error"
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
"prettier/prettier": "error",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error", { "variables": false }],
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
]
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
}
10 changes: 10 additions & 0 deletions client/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"singleQuote": true,
"semi": false,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "all",
"printWidth": 80,
"arrowParens": "always",
"bracketSpacing": true
}
6 changes: 3 additions & 3 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import React from 'react'

const App = () => <>Init</>;
const App = () => <>Init</>

export default App;
export default App
10 changes: 5 additions & 5 deletions client/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import ReactDOM from 'react-dom';
import React from 'react'
import ReactDOM from 'react-dom'

import App from './App';
import App from './App'

const rootElement = document.getElementById('root');
const rootElement = document.getElementById('root')

ReactDOM.render(<App />, rootElement);
ReactDOM.render(<App />, rootElement)

0 comments on commit 9665eed

Please sign in to comment.