Skip to content

Commit

Permalink
Add eslint and prettier config (#11)
Browse files Browse the repository at this point in the history
* Add eslint and prettier config

* Shorten lint rule

Co-authored-by: The 1975 <[email protected]>
  • Loading branch information
the1975 and The 1975 authored Sep 1, 2021
1 parent 6148535 commit 679abe2
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 6 deletions.
17 changes: 17 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": ["react-app", "eslint:recommended"],
"ignorePatterns": ["node_modules"],
"rules": {
"no-use-before-define": ["error"],
"no-unused-vars": [
"error",
{
"vars": "all",
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_",
"args": "all",
"ignoreRestSiblings": false
}
]
}
}
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": false,
"singleQuote": true,
"arrowParens": "avoid",
"endOfLine": "auto",
"jsxSingleQuote": false,
"jsxBracketSameLine": true
}
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"editor.formatOnSave": true,
"editor.tabSize": 2,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"javascript.validate.enable": false,
"prettier.configPath": ".prettierrc",
"prettier.prettierPath": "node_modules/prettier",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.alwaysShowStatus": true
}
18 changes: 12 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,9 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"eslint": "^7.32.0",
"prettier": "^2.3.2"
}
}

0 comments on commit 679abe2

Please sign in to comment.