Skip to content

Commit

Permalink
Added eslint, prettier, husky packages. Installed eslint plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishwanath committed Jun 14, 2023
1 parent 5cd651e commit 6daa436
Show file tree
Hide file tree
Showing 6 changed files with 1,316 additions and 26 deletions.
63 changes: 63 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ["plugin:react/recommended", "plugin:prettier/recommended"],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["react", "spellcheck"],
rules: {
"react/prop-types": "off",
"no-unused-vars": ["error", { vars: "all", args: "after-used", ignoreRestSiblings: false }],
"spellcheck/spell-checker": [
"error",
{
comments: true,
strings: true,
identifiers: true,
templates: true,
lang: "en_US",
skipWords: [
"nodejs",
"faq",
"sdk",
"unassign",
"quickstart",
"Frontend",
"onboarding",
"Workspace",
"axios",
"dotnet",
"golang",
"erlang",
"kotlin",
"cpp",
"pho",
"integrations",
"href",
"dropdown",
"csharp",
"docusaurus",
"Fullstack",
"algolia",
"ecma",
"lang",
],
},
],
"prettier/prettier": [
"off",
{
endOfLine: "auto",
},
],
},
settings: {
react: {
version: "detect",
},
},
};
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": false,
"printWidth": 100,
"tabWidth": 2,
"endOfLine": "auto"
}
6 changes: 6 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"language": "en",
"words": [
"skipwords"
]
}
30 changes: 28 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
"write-heading-ids": "docusaurus write-heading-ids",
"lint": "eslint --ignore-path .gitignore .",
"format": "prettier --ignore-path .gitignore --write \"**/*.{ts,tsx,css,scss,js,mdx}\"",
"prepare": "husky install"
},
"dependencies": {
"@docusaurus/core": "^2.1.0",
Expand Down Expand Up @@ -56,6 +59,29 @@
"got": "^12.1.0"
},
"devDependencies": {
"tailwindcss": "^3.2.4"
"@typescript-eslint/eslint-plugin": "4.22.0",
"cspell": "^6.31.1",
"eslint": "^7.24.0",
"eslint-config-prettier": "^8.2.0",
"eslint-import-resolver-typescript": "^2.4.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-spellcheck": "^0.0.20",
"husky": "^8.0.0",
"prettier": "^2.7.1",
"tailwindcss": "^3.2.4",
"typescript": "*"
},
"lint-staged": {
"**/*.{js,ts,tsx, jsx, ts, mdx}": [
"eslint"
],
"**/*.{js,ts,tsx, jsx, ts, mdx, css, scss}": [
"prettier"
],
"**/*.mdx": [
"cspell"
]
}
}
Loading

0 comments on commit 6daa436

Please sign in to comment.