Skip to content

Commit

Permalink
chore: configure eslint and prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
satnaing committed Oct 16, 2022
1 parent d6dd818 commit 6fa8990
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"overrides": [],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"ignorePatterns": ["node_modules", "dist"],
"plugins": ["react", "@typescript-eslint", "react-hooks", "prettier"],
"rules": {
"react/react-in-jsx-scope": "off",
"react/no-unescaped-entities": 0,
"react/prop-types": 0,
"camelcase": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": "error",
"no-duplicate-imports": "error",
"linebreak-style": ["warn", "unix"]
},
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"typescript": {}
}
}
}
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ignore everything
/*

# Except these files & folders
!/src
!/.github
!tsconfig.json
!astro.config.mjs
!package.json
!.prettierrc
!.eslintrc.json
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"arrowParens": "avoid",
"semi": true,
"tabWidth": 2,
"printWidth": 80,
"singleQuote": false,
"jsxSingleQuote": false,
"trailingComma": "es5",
"bracketSpacing": true,
"endOfLine": "lf"
}

0 comments on commit 6fa8990

Please sign in to comment.